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UCiDlB,MAAOg3D,iDAAS,+BAATA,GAASC,WAFRd,wCAHD,CACT,CAAEe,QAASC,KAAmBC,SAAUhB,GAAkBiB,OAAO,GACjEC,KAAUC,KAAcp4D,GAAmB03D,GAAaW,MAAgB32D,IAAiB42D,SAJjFC,OAAeC,KAA6CC,MAAyBC,KAAcC,KAAaC,KAAqBC,MAAe/B,GAAkBgC,MAAkBC,OAAeC,MAAoBC,MAAoBC,cAAqB,CAACC,mBAAmB,IAASC,gBAAsBC,MAC5RP,MAAkBI,SC7ClD,MAAMI,GAAwC,IAAIC,MAA2B,6BCYpF,MAAMC,GAAgBn3C,OAAO6tC,SAASuJ,OAClC3tE,kBACF4tE,SAGF,SAASC,KACP,MAAMC,EAAM,IAAIC,eAEhBD,EAAIE,iBAAiB,QAAUpsE,IAC7B8B,QAAQqtB,IAAI,UAAWnvB,EAAG,GAK5BksE,EAAIE,iBAAiB,OAASpsE,IAC5B,IAAIqsE,EAAY7xD,KAAKC,MAAMza,EAAIssE,cAAc/pD,UAC7CnkB,iBAA4BiuE,EAAU/tE,cACtCF,cAAyBiuE,EAAU9tE,WACnCH,cAAyBiuE,EAAUhuE,cACnCkuE,OAAgBnuE,kBAKhBA,cAAyB0tE,GAAgB,OACzChqE,QAAQqtB,IAAI,aAAe/wB,eAC3B0D,QAAQqtB,IAAI,SAAUk9C,GAEtBG,MAAuB,CACrB,CACEnC,QAASuB,GAAWa,SAAU,IACzBJ,MAGNK,gBAAgBvC,IAChBrkE,KAAK,KACA,kBAAmBkgD,WAAa5nD,eAClC4nD,UAAU2mB,cAAcC,SAAS,kBAAiB,GAGrDC,MAAM5nE,GAAOnD,QAAQD,MAAMoD,GAAI,GAGpCinE,EAAIY,KAAK,MAAO,8BAChBZ,EAAIa,KAAK,KACX,CAEAd","names":["environment","production","syncfusionKey","apiBaseUrl","paymentMaxWaitTime","paymentGetCCTStatusInterval","MarketInfoService","http","baseURL","constructor","this","marketIdSubject","BehaviorSubject","marketId$","asObservable","setMarketId","id","next","getMarketId","options","headers","HttpHeaders","getMarketDays","marketId","get","observe","pipe","map","res","body","catchError","handleError","getMarketLogo","getDailyMarketDays","getWeeklyMarketDays","getALLBoothsForLayoutALLRentalTypes","rentalTypesDatesModel","url","post","getMonthlyMarketDays","getParts","getAllBoothsForDailyRentalTypeLayout","partId","selectedMarketDays","getListOfValuesData","getLayoutFonts","getWebRentalSetting","getWebRentalSettingDashboardSetting","getBuildingAreasInLayOut","getImages","getLayoutImages","getMarketDetails","GetEnabledRentalTypesForMarket","getCurrentMarketVendorGeneralSettings","GetAllMarketProducts","Id","RegistrationFee","error","console","Error","errMessage","message","throwError","core","factory","AuthService","isLoggedIn","isLoginAutenticated","localStorage","getItem","UserService","authService","getToken","userData","Token","setItem","clearToken","removeItem","ForgotPassword","email","i0","RentalMenuComponent","route","userService","router","marketInfoService","IsVendorLogin","imageUrl","vendorId","subscriptions","allowRegisterVendor","allowNewVendorBooking","activeRoute","vendorTerm","ngOnInit","params","subscribe","events","event","NavigationEnd","timestamp","Date","getTime","sub","MarketLogoBlobURL","push","VendorRegistration","AllowNewVendorBooking","WebRentalVendorTermText","err","isActiveRoute","includes","changeRentalMenu","pagename","Swal","title","$localize","text","icon","showCancelButton","confirmButtonText","cancelButtonText","then","result","value","navigate","checkVendorLoggedIn","logout","selectors","ctx","HomeComponent","marketName","message1","message2","message3","message4","imageURL1","imageURL2","imageURL3","loaderIcon","Promise","resolve","MarketName","DashboardMessage1","DashboardMessage2","DashboardMessage3","DashboardMessage4","DashboardImageURL1","DashboardImageURL2","DashboardImageURL3","VendorTerm","getFirstVisibleIndex","AllowNewBookings","RentalSettings","RentalTypes","RentalTypesDescription","BoothTerm","EPresetValue","EOperationalReports","EManagementReports","EVendorReports","EEdgeExpressECIType","EOpenEdgeResponseCode","EPaymentModes","EPaymentTransactionType","ECreditCards","EPaymentGateway","EEdgeExpressResultCode","EOpenEdgeSessionStates","MarketInfoAndSettingsFunctionID","MaintainanceFunctionID","SecurityFunctionID","AccountingFunctionID","DashboardFunctionID","OperationsFunctionID","DiscountType","ListOfValues","GeneralService","getCountries","getUSStates","GetVendorTypes","GetSecurityQuestion","getWebrentalMarketRules","VendorService","vendorIdSubject","vendorId$","setVendorId","getVendorId","HttpParams","set","toString","SaveVendor","Vendor","RegisterVendorInfoValidation","GetVendorById","getMarketVendorSettings","getVendorBusinessLicenseSettings","SaveVendorLoginDetail","VendorLoginDetail","mrktId","VendorLoginDetailsValidation","SendRegistrationEmail","GetDiscountPlan","getVendorLoginSecurityQuestion","getVendorLoginInfo","VendorId","UpdateVendor","validatePromoCode","promoCodeDiscountModel","PaymentService","getCCCredentials","getRCMService","request","GetCNPCreditVoid","credential","transId","amount","paymentReturnType","returnReq","Url","QueryPaymentStatusURL","XmlDoc","XWEBID","XWEBTERMINALID","XWEBAUTHKEY","GetPaymentStatus","orderId","openEdgeCardType","cType","replace","toLowerCase","saveVerifoneUnSaved","model","marketId1","GetVerifoneUnSavedDate","verifoneRecordId","GetVerifoneUnSavedCompleteData","replaceXMLEntity","stringValue","trim","length","getCNPService","rqsturl","tempobj","getCNPResponse","credentials","getRCMServiceStatus","sessionId","isCancelRequest","GetTransactionVerifoneOGPayment","TransId","RentalService","SaveDailyRental","rentalData","SaveCombinedMonthlyRentalTransactions","SaveCombinedWeeklyRentalTransactions","SaveWeeklyRentalTransactions","checkRentalExits","rentalDateDetails","getDailyRentals","getDailyOtherRentals","saveMonthlyRental","getOtherRentalItems","rentalDate","getPromoCodeAppliedCountForVendor","PromoCodeId","getWIFIOtherItem","wIFIOtherItemId","getOtherItemsRentalCharges","otherRentalCharges","generateTempRecordNumber","insertDataToTemp","tempData","deleteFromTemp","GetSelectedMonthEndDate","yearMonth","checkAbsenteeVendorForDate","boothNumber","getVendorBalances","getVendorPaymentDetails","accountReceiptId","ComposeEmails","emailData","SendWRPaymentConfirmationEMail","SendWRBookingConfirmationEMail","getRentalSettings","getCustomSettings","getRecordFromTemp","getBoothStatus","boothStatusInput","getProductCategories","getVendorRentalDays","rentalDays","getBoothRentalCombinedMonthlyCharges","boothRentalCharges","getBoothRentalCombinedWeeklyCharges","getBoothRentalWeeklyCharges","getBoothRentalMontlyCharges","getBoothrentalCharges","UpdateVendorResaleInfo","vendorResaleInfo","updateVendorBusinessLicense","vendorBusinesLicInfo","getCombinedMonthlyBookings","getCombinedMonthlyOtherRentals","getMonthlyBookings","getMonthlyOtherRentals","getCombinedWeeklyBookings","getCombinedWeeklyOtherRentals","getWeeklyBookings","getWeeklyOtherRentals","GetVendorProductsById","getBookingFeeById","bookingFeeId","getBookingRenewalFeeById","bookingRenewalFeeId","generatePaymentReceipt","paymentReceiptData","CheckMinimumUnusedCodeCount","RentalType","updateWIFIAccessCodeForRental","wifiData","customCurrencyPipe","currencyPipe","transform","parseFloat","customCurrencyInput","inputValue","target","charCode","which","keyCode","currentCursorPosition","selectionStart","indexOf","pure","SharedDataService","paymentSharedData","dailyRentalSelectedDays","dailyRentalSelectedBooths","rentalType","tempRecordNo","newVendorContactInfo","newVendorLoginDetails","wifiSelectedDay","SuccessTickComponent","FailureCrossComponent","LoaderComponent","PaymentComponent","paymentService","toastr","modalService","vendorService","sanitizer","sharedDataService","paymentGateway","paymentStarted","paymentFailReason","isSaveInCCTResponse","paymentInProgress","isAutoPopulateBillingInfo","paymentTable","currentPayId","hstPayBtnMsg","payModalRef","transactionInitiated","tempCNPRes","paymentProcessing","vendorInfo","showIFrame","facilityCreditCards","selectedDeviceId","cctStatusOrderId","voidOnCancelInitiated","isCancel","EventEmitter","showPage","requestParam","tempCNPPayId","tempCNPAmount","retryTransactionStatusLoader","urlSafe","achUrlSafe","urlSafeAlias","paymentSuccessFul","keyedInTransaction","TransactionType","payStatus","CCAmount","isQDR","PaymentResponse","ClosePaymentPage","paymentCount","tillNowPaid","multiPaymentVoidEmv","openEdgeSub","tenderAmount","changeAmount","voidPayment","ForceCreditReturn","VerifoneId","RefundAmount","MarketId","tempRcmRes","rcmSessionId","rcmResponse","iframe","popUpPayment","openEdgeBillingFields","toasterConfig","closeButton","timeOut","easing","progressBar","positionClass","tapToDismiss","showEasing","hideEasing","showMethod","hideMethod","maxLengthNameOnCard","maxLengthCCBlillingAd","maxLengthCCBlillingZip","initiatedVoidCC","showLoaderMesage","obj","payId","payName","payAmount","payComplete","payNowDisable","payModeId","checkNum","checkDate","bankName","ManualCardNumber","ManualCardExp","ManualCardName","CreditCardType","ManualCardAuthorization","defaultmode","uniqueTransId","payFailed","routingNumber","accountNumber","achManualCardAuthorization","accountType","nameonAccount","getVendorInfo","getCredentials","PaymentGateWay","GatewayDetails","JSON","parse","voidPaymentTransaction","setOpenEdgeMandatory","initiatePaymentRequest","generateIntialCCT","amt","transTypeId","ptId","paymentModeId","payvoid","cardNumber","authCode","voidOrderId","CreditCardNumber","substr","CCTModel","Amount","ResponseCode","ResponseMessage","OrderId","TransactionDateTime","ProcessStatus","Object","assign","isAnyPaymentProcessed","some","ele","callRCM","tempAmount","find","o","RCMURL","undefined","isPaymentCompleted","emvTransactionType","rcmRequest","resultFromRCM","responseData","RcmResponse","RESPONSE","APPROVEDAMOUNT","HOSTRESPONSECODE","RESULT","CARDBRAND","ACCOUNT","EXPMONTH","EXPYEAR","TRANSACTIONID","HOSTRESPONSEDESCRIPTION","ORDERID","processedCC","receiptText","RECEIPTTEXT","entryMethodMatch","match","entryLegendMatch","ACMatch","ATCMatch","AIDMatch","AIDNAMEMatch","TVRMatch","TSIMatch","RespCDMatch","TRNREFNoMatch","VALCODEMatch","tempCCModel","CardType","CARDTYPE","Card","TransactionTypeId","ApprovalCode","APPROVALCODE","PaymentTransactionTypeId","PaymentTransactionType","ReceiptResponse","EntryLegend","EntryMethod","AC","ATC","AID","AIDNAME","TVR","TSI","RespCD","TRNREFNo","VALCODE","gotoPaymentSuccess","RESULTMSG","unsubscribe","warning","setTimeout","openEdgeTransactionStatus","transactionType","initiatingOpenEdgeQueryPaymentRequest","paymentTrnsId","callRetryLogic","jsonResp","RESPONSECODE","STATE","CCModel","MASKEDCARDNUMBER","RESPONSEDESCRIPTION","emit","toFixed","CARDHOLDERNAME","ORIGINALRESPONSEDESCRIPTION","getRCMStatus","reason","saveCCTransactionFailureCase","sessionRes","SessionId","SessionState","t","isEmvVoidInitiated","callOpenEdgeVoid","initiatingVoid","Success","isVoidCompleted","cTypeId","success","cctRes","paymentAmount","DebitOrderId","OpenEdgeTransType","TransactionCardType","paymentTransactionTypeId","response","paymentStatus","transType","cCModel","OfflinePayment","PaymentSuccess","info","TransType","transactinSuccess","cancelRcmRequest","isTransactionSuccess","respose","IsSuccessful","getExpiryMonthValue","expiryMonth","saveInVerifoneUnsaved","callCNP","getHiddenInput","tempId","nativeElement","src","split","pop","hostedpageRequest","processedCNPCC","ORIGINALRESPONSECODE","ORIGINALTRANSACTIONTYPE","PaymentModeId","template","show","class","backdrop","keyboard","objFailure","afterpaymentSuccess","hide","callTransactionComplete","CardNotPresentURL","setCNPvendorInfo","tempOrderId","resultResponse","bypassSecurityTrustResourceUrl","PAYPAGEURL","getOpenEdgeTransactionStatus","count","mandatoryField","Address","substring","firstName","FirstName","middleName","MiddleName","lastName","LastName","address","companyName","CompanyName","city","City","CountryCode","StateCode","onhstPayBtn","val","VendorRegistrationComponent","renderer","formBuilder","generalService","rentalService","customCurrency","showContactInfo","showOnlineAccess","showregisterpayment","btnContact","btnOnlineAccess","btnPayment","IsQDR","verifoneId","countries","VendorForm","maxDate","ProductPriority","VendorProductForm","OnlineAccessForm","countryList","stateList","VendorProductsList","VendorProductsImageList","VendorProductsImageContentList","VendorTypeList","ProductDropDownfields","StateDropDownfields","filterSettings","ignoreCase","filterType","PhoneNumberMask","ZipCodeMask","PhoneEXTMask","SSNMask","VendorGeneralSetting","VId","showStateDropDown","securityQuestions","webRentalSetting","productList","registrationFee","vendorLoginData","validationResponse","DisableRegisterBtn","vendorinfo","paymentData","processPayment","paymentGatewayCredentials","processCreditCardOnline","today","group","Validators","BusAddress","BusCity","BusState","BusTelePhone","BusZipCode","CellPhone","Country","DLExpiryDate","DriverLicenseNumber","ResaleNumber","BusinessLicenseNumber","Email","MarketVendorId","State","VendorSince","VendorType","WorkPhone","TelePhone","ZipCode","SSN","TaxID","VProductId","Priority","ProductId","ProductCategoryId","ProductCategory","ProductName","UserName","Password","control","password","minLength","test","lowerCase","upperCase","specialChar","ConfirmPassword","SecurityQuestion","Answer","registrationPaymentCheck","FormControl","registrationRuleReadCheck","getVendorGeneralSettings","getStates","getSecurityQuestion","getallproducts","getVendorTypes","ngAfterViewInit","setStyle","patchValue","Code","onCountryChange","displayContactInfo","displayOnlineAccess","displayRegisterPayment","IsVendorIdManual","SpecifyVendorID","VendorAddressMandatory","VendAddressMandatory","AllowAbsenteeRefund","BoothStatusRefund","TermForLease","LeaseLabel","DefaultProductEnabled","DefaultProductSelected","Product","ResaleNumberRequired","DaysToSellWithoutResaleNo","DaysSellWithoutResaleNumber","BusinessLicenseNumberReq","BusinessLicenseNumberRequired","DaysToSellWithoutBusinessLicenseNo","DaysSellWithoutBusiLicNumber","AlphaNumericField1Reqd","AlphaNumericField2Reqd","AlphaNumericField1Name","AlphaNumericField2Name","NumericField1Reqd","NumericField2Reqd","NumericField1Name","NumericField2Name","VendorNameFormat","VendorNamingConvention","VendorNameFormatId","VendorNamingConventionId","disable","setValidators","updateValueAndValidity","log","MandatoryFields","mandatoryFields","Number","el","i","ob","IsInActive","CompanyProductId","String","ValidationVendorDetails","TelephoneEXT","BusTelephoneEXT","VendorName","VendorProductImageList","VendorProductImageContentList","VendorProfile","VenTxtPhotoFile","BusinessLicNum","ResaleNum","OnlineAccess","OnlineUserId","OnlinePassword","SecurityQuestionId","SecurityQuestionAnswer","OnlineRegistrationDate","Message","CheckValidations","ChargeVendorRegistration","SaveVendorDetails","SaveVenresponse","GetVerfoneresponse","PaymentOrderId","RentalCharge","SalesTax","SecLevelTax","OtherCharge","PriorBalance","TotalBalanceDue","RentalNotes","CashAmount","CheckAmount","CheckNo","ChangeAmount","CardAmount","DirectDebitAmount","PaymentDone","PaymentDueDate","DiscountAmount","ConvenienceFee","DailyRentalBooth","DailyRentalOtherCharges","OtherItemId","OtherItemName","Description","Quantity","RentalDay","AppliedDiscountModel","SaveDailyRentalResponse","_this","primaryproductchange","args1","product","p","newProduct","parseInt","response1","hasError","ProcessCreditCardOnline","OnVendorRegister","e","preventDefault","Oncancel","VendorLoginComponent","loginForm","loginError","inActive","displayUsernameError","displayPasswordError","confirmMailInput","username","rememberMe","loginUserName","onKeydown","key","validateLogin","checkRememberMe","applyBackground","window","innerWidth","document","gradient","style","backgroundImage","setValue","validateLoginCredentials","valid","EmailLogin","InActive","UserId","sessionStorage","token","html","focusConfirm","showCloseButton","didOpen","popup","querySelector","onkeyup","preConfirm","ngOnDestroy","backgroundColor","RentalLayoutComponent","formbuilder","datePipe","elementRef","diagram","layoutForm","defaultZoomFactor","layoutParts","LayoutData","selectedBoothsFromLayout","CloseLayout","removeBoothCharges","allExistingBuilding","boothShapes","fontName","fontStyle","layoutImages","images","selectedNode","selectedBoothData","allBooths","isDropdownOpen","palettes","connectors","selectedItems","symbolMargin","monthEndDateCache","Map","noboothSelected","snapSettings","constraints","SnapConstraints","tool","BoothNumber","BoothType","blinkingNode","categoryLegend","blinkInterval","selectedPartName","selectedBoothsForRental","tooltip","layoutDiagramFilter","searchBooth","DiagramTools","SelectorConstraints","left","right","top","bottom","clickOutsideDropdown","legendDropDown","dropdownElement","contains","classList","closeCategoryLegend","stopPropagation","toggleDropdown","remove","add","filter","PartId","PartDescription","AddSelectedBoothsToGrid","closeLayoutForm","forEach","date","temp","TempRecordNo","StartDate","EndDate","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","created","args","fitToPage","mode","region","margin","canZoomIn","markSelectedBooths","element","nodeId","getObject","diagramNode","offsetX","offsetY","width","height","shape","type","content","NodeConstraints","BoothDescription","BoothTypeId","weeklyRentalSelectedBooths","weeklyRentalMarketDays","days","selectedDates","startDate","RentStartPeriod","endDate","RentEndPeriod","selectedDayOfWeek","currentDay","getDay","setDate","getDate","monthlyRentalSelectedBooths","monthlyRentalMarketDays","RentalStartDate","RentalEndDate","categoryName","CategoryDescription","color","convertColor","Color","stringify","bindBoothsToLayout","data","boothStatusRecords","item","boothStatus","backColor","Status","ExcludeForWeb","AccountReceiptId","fontColor","tooltipCaption","ProductDescription","ShapeId","Name","fill","strokeColor","BorderColor","strokeWidth","fontSize","FontSize","textWrapping","fontFamily","FontName","annotations","bold","FontStyle","italic","AnnotationConstraints","position","relativeMode","Width","Length","addInfo","allowDrag","name","status","LeftCoordinate","TopCoordinate","rotateAngle","RotateAngle","zoomOptions","zoomFactor","zoomTo","getAllBoothsForLayout","rentalStartDate","rentalDaysLength","rentalStartDateYear","getFullYear","rentalStartDateMonth","getMonth","rentalStartDateYearMonth","RentalYearMonth","MarketDays","forkJoin","boothsList","weeklyRentalStartDate","rentalEndDateYear","weeklyRentalEndDate","rentalEndDateMonth","rentalEndDateYearMonth","marketDays","concat","weeklyRentalFirstDay","FirstDayOfRentalStartWeek","FirstDayOfRentalEndWeek","RentalStartDateYearMonth","RentalEndDateYearMonth","WeeklyCombWeeklyReservationPeriod","MonthlyCombMonthlyReservationPeriod","RentalStartDateWeekDayNumber","AllowVendorVacation","monthlyRentalStartDate","monthlyRentalEndDate","changeLayout","clear","getBuildingForLayout","getImagesForLayout","layoutFonts","BoothShapes","DefaultZoomFactor","colorValue","padStart","nodeMouseOver","innerHTML","boothNo","selectedBooth","nodeClick","properties","mainNodeId","dataFromTemp","boothIndex","findIndex","boothSelectedByOtherUser","BoothNo","rentalDates","rentedBoothDates","endMonth","endMonthDate","endMonthYear","endMonthIndex","getMonthIndex","rentalstartDate","dayOfWeek","selectedDaysOfWeek","combinedMonthlyBookingEndDate","toPromise","MonthEndDateSelected","marketDaysOfTemprecord","marketDay","selectedRentalDates","MarketDay","selectedBoothsForCWRental","currentWeekRentalDates","currentWeekEnd","toDateString","sort","a","b","NoOfMarketDays","StartDateList","currentMonthRentalDates","currentMonthEnd","currentDate","currentYear","currentMonth","currentYearMonth","previousMonth","setMonth","PreviousMonthYearAndMonth","previousMonthEndDate","monthEndDate","getDaysDifference","currentStartMonth","startMonthDate","startMonthYear","startMonthIndex","compareDates","compareCurrentMonthDates","AllRentalDates","selectedBoothsForCMRental","markedNodeId","boothCount","index","splice","getMonthEndingDateFromSetting","rentalYearMonth","_this2","has","date1","date2","start","end","timeDiff","Math","abs","ceil","RentalRenewal","BoothSearch","IsOnline","monthString","monthIndex","month","BuildingId","BuildingBackColor","BuildingBorderColor","BuildingFontSize","BuildingFontNameId","Caption","BuildingFontStyleId","BuildingWidth","BuildingLength","BuildingVerticalDisplay","node","ImagesForLayoutId","ImageId","LayoutImagesId","ImagePath","offset","x","y","ImageWidth","ImageLength","ImageLeftCoordinate","ImageTopCoordinate","source","ImageName","expanded","symbols","layoutZoomInClick","detail","layoutZoomOutClick","flag","searchNodes","nodes","nodeExist","stopBlinking","controls","startBlinking","changeSearchText","setInterval","clearInterval","boothData","BackColor","subscription","$event","DailyrentalOnlineComponent","sunday","monday","isdirty","tuesday","wednesday","thursay","friday","saturday","newVendor","rentalForm","dailyMarketDays","exclusivedates","filteredMarketDays","ResaleOrBusinessHeader","defaultPart","parts","selectedDays","Set","otherItemList","displayOtherChargeByBooth","otherChargeMarketDay","otherItemSearchText","selectedOtherCharges","AllowRentingOtherItems","selectedOtherItems","OtherChargesPeriod","modalAddNewItems","gridOtherRental","gridDailyRental","modalResaleNo","modalDiscountPlans","isFormDirty","isCancelClicked","bookingFormCompleted","rentalBookingData","resaleNoInputRequired","businessLicenseRequired","allAvailableBooths","isboothSelected","defaultPartId","selectedBooths","displayLayout","resaleAndBusiPopupDisable","warnExcessPayment","warnZeroPayment","displaySalesTax","displayCityTax","displayOtherChargeSalesTax","displayOtherChargeCityTax","exemptResale","resaleNo","resaleNoDisplay","businessLicenseDisplay","businessLicenseNumber","businessLicenseExpiryDate","vendorRentalDays","marketDayCountForResale","resaleOptionSelected","DisplayPayDueDate","DisplaySpecificDate","DisplayOptionValue","vendorProducts","defaultProduct","totalRentalCharge","totalOtherRentalCharge","totalSalesTax","totalSecondLeveltax","totalCharge","priorBalance","textWrapSettings","wrapMode","vendorDiscountPlans","disableDiscountAmount","totalDiscountCharge","secondTaxName","marketWeekSunday","marketWeekMonday","marketWeekTuesday","marketWeekWednesday","marketWeekThursday","marketWeekFriday","marketWeekSaturday","marketParts","sortOptions","columns","field","direction","sortOtherItemsOptions","minExpiryDate","getVendorProducts","loadSelectedBooths","vendorBalanceRes","discountPlansRes","Daily","OnlineTransactions","PlanSeqId","PlanId","PlanName","EffectiveFrom","ExpiryDate","DiscountValue","OtherItems","Weekly","Monthly","CombinedWeekly","CombinedMonthly","IsExceedAmount","ExceedAmount","BalanceDue","Notes","QDR","CheckAll","Selected","AutoSelected","DisableDiscount","AppliedDiscount","SalesTaxAmount","SecondLevelTaxAmount","SalesTaxApplied","SecondLevelTaxApplied","SecondLevelTax","getDiscounts","DefaultLayoutPart","getRentalPaymentSettings","openLayoutPopup","refreshAddBooth","getDailyMarkets","openLayout","NewBooth","toggleDaySelection","day","checked","filterDates","dayName","getDayNameFromDate","dateString","toLocaleDateString","weekday","checkboxChanged","srcElement","searchOtherItem","OtherItem","WebRental","OtherItemCharge","OtherItemtotal","othChgBooths","addOtherCharges","WRNewVendorRequest","NewItem","Reference","newItem","otherItemTotal","salesTax","cityTax","CityTax","refresh","modal","display","getBoothsAndItemsForOtherCharges","isDateSelected","isItemSelected","otherItemChecked","setDefaultRentalItem","isNegative","totalValue","finalCharge","masterChargeRecord","otherItemUpdate","select","objNew","scrollTo","validateAndAddSelectedBoothsToGrid","WarnExcessPayment","WarnZeroPayment","DisplayOtherChargesByBooth","RentalTaxable","RentalSecondTaxable","OtherRentalTaxable","OtherRentalSecondTaxable","getColumnByField","visible","SecondTaxName","headerText","secLevelTaxOtherRentHeader","getNextDate","nextDate","noResale","selectedBoothRecord","record","targetDateString","VendorRentalDate","formattedDate","VendorID","addSelectedBoothsToGrid","getDateFromDateTime","updateOtherTotalRent","onCheckNumKeyPress","RentalDate","newbooths","DailyRentalId","Rent","ExemptResale","Resale","LicenseNumber","AddBoothsOnGridOnValidationSucess","addToGrid","closeModalPopup","ExemptResaleNo","ExemptResaleReason","ResaleNo","closeResaleModal","LicenseNameId","LicenseName","deleteSelectedBooth","deleteOtherRentalCharges","oth","disableSavePayment","vendorBalance","discountTotalAmount","totalAmountForDiscount","disc","currentDiscountValue","discountValue","cancelRental","isConfirmed","rentOnlineNextTab","saveRentalWithPayment","bookingReceipt","RentalMethod","ReceiptSettings","PaymentOnly","objSelectedBooth","objSelectedOtherCharge","objDiscountData","OtherCharges","WeeklyrentalOnlineComponent","lines","RentalTaxPercentage","OtherRentalTaxPercentage","RentalSecondTaxPercentage","OtherRentalSecondTaxPercentage","exemptResaleReason","modalWeeklyOtherCharges","gridWeeklyRental","weeklyRentalStartDates","weeklyMarketDays","excludedMarketDays","selectedWeeklyBoothData","isWeeklyboothSelected","weeklyLayoutData","resaleNoOption","ApplyBookingFee","ApplyBookingFeeId","bookingFeeAmount","boothsForOtherCharge","selectedWeeklyBooths","rentalEndDate","otherItemsScreen","otherChargeMarketWeek","updateOtherItem","RentalMonth","MonthlyRentalIds","Recurring","refreshColumns","rentalDatePeriod","OtherItemWeeklyCharge","resFee","reset","RentalStartDays","RentalEndDays","getWeeklyMarkets","selectedWeeklyMarketDays","checkSelectedDates","RentalWeek","uniqueBoothNumbers","WeekOtherRentalId","WeeklyOtherRentalIds","checkMarketDaysSelected","thursday","ExtendRental","excludedDates","exludedDate","apiCalls","of","responses","RentalStartPeriod","RentalEndPeriod","RentalMarketDay","WeeklyRentalId","Reservation","Drop","January","JanRent","February","FebRent","March","MarRent","April","AprRent","May","MayRent","June","JunRent","July","JulRent","August","AugRent","September","SepRent","October","OctRent","November","NovRent","December","DecRent","JanuaryMonthPresent","FebruaryMonthPresent","MarchMonthPresent","AprilMonthPresent","MayMonthPresent","JuneMonthPresent","JulyMonthPresent","AugustMonthPresent","SeptemberMonthPresent","OctoberMonthPresent","NovemberMonthPresent","DecemberMonthPresent","TaxModel","ReturnData","PerDiem","WeeklyRentalOtherCharges","WeeklyRentalBooth","BookingFee","objReturnData","BoothReserved","DoNotRenew","BookingLog","MonthlyrentalOnlineComponent","monthlyMarketDays","selectedMonthlyBooths","MonthlyLayoutData","monthlyRentalStartDates","perDiemRentApplicable","selectedMonthlyBoothData","rentalStartDates","gridMonthlyRental","modalMonthlyOtherCharges","rentalStartMonth","rentalEndMonth","otherChargeMarketMonth","PerDiemRentApplicable","input","OtherItemCombinedMonthlyCharge","RentalMonths","selectedMonthlyMarketDays","checkRentalMonths","startMonth","startYear","PerDiemApplicable","MonthlyRentalId","MktDays","PerDiemRent","PerdiemRent","DisableJanMonth","DisableFebMonth","DisableMarMonth","DisableAprMonth","DisableMayMonth","DisableJunMonth","DisableJulMonth","DisableAugMonth","DisableSepMonth","DisableOctMonth","DisableNovMonth","DisableDecMonth","DiasbleStartDate","extendedBoothIndex","RentalSavedEndDate","DisableStartDate","MonthlyOtherRentalCharges","MonthOtherRentalId","year","YearMonth","extractedYearMonth","MonthlyRentalBooth","otherRentalYear","otherRentalMonth","otherRentalYearMonth","OtherItemMonthlyCharge","CombinedweeklyrentalOnlineComponent","modalAddNewWeeklyBooths","CombinedWeeklyRentalBooth","RentalWeeekStartDate","RentalWeeekEndDate","SelectedRentalDates","isOtherItemChecked","OtherItemCombinedWeeklyCharge","CombinedmonthlyrentalOnlineComponent","CombinedMonthlyBookingEndDate","_this3","resRentalSettings","_this4","resMonthEnd","currentDateYearAndMonth","_this5","nextMonth","nextMonthYearAndMonth","nextMonthEndDate","_this6","vendorBalances","vendorPriorBalance","_this7","true","RentalConfirmationComponent","receiptIframe","modalRef","printReceipt","AccountReceipId","AuthCode","MarketAccountReceiptId","paymentOnly","PaymentAuthorizationNumber","emailRentalReceipts","emailSubject","res1","AccountReceiptID","BaseTemplateID","AttachmentFile","AttachmentFileName","FileType","Subject","WebRentalRequest","NewVendor","emailResponse","goBack","PreviewRentalReceipt","isMobile","navigator","userAgent","base64ToBlob","base64","contentType","byteCharacters","atob","byteArrays","slice","byteNumbers","Array","charCodeAt","byteArray","Uint8Array","Blob","printRentalReceipt","base64String","blob","URL","createObjectURL","saveAs","printJS","printable","onPrintDialogClose","ctx_r109","ctx_r110","ctx_r113","BookingDetailsComponent","RentalTypeText","PromptRenewOther","masterRentChargeforResOtherItems","openConfirmationPage","creditCardAmount","accountReceipId","clickTimeout","rentEndPeriodIndex","applyRenewalFee","paymentAdjustedWithPriorBal","renewalFeeAmount","savePayment","bookingDetailsForm","applyCCCharge","CcfeeinPercentage","AllowPartialPay","actualTotalDue","renewAllBoothsFromGrid","allrentedOtherItems","showDetails","rules","allowCWRentalRenewal","allowCMRentalRenewal","allowOtherItemRenewal","convenienceFee","totalPayment","balanceDue","rentalCharge","otherCharge","discount","additionalCharge","array","initializeRulesArray","valueChanges","emitEvent","calculateBalance","getMarketRulesAndRegulations","rule","isChecked","rulesAndRegualtions","AgreementLinkRequired","AgreementBlobURL","AgreementLinkTextContent","updateArrayDirectly","updatedValue","rulesFormArray","at","rulesArray","ID","Rules","allCheckboxesCheckedValidator","weeklyMarket","getDailyRental","getCombinedMonthlyRental","getCombinedWeeklyRental","getMonthEndDate","inputDate","nextMonthFirstDay","toggleDetails","toggleCMOtherItemsDetails","showOtherItemsDetails","toggleCWBookingDetails","existingBooths","initialStartDate","renewalStartMonth","CurrentRentStartPeriod","CurrentRentEndPeriod","CurrentRent","CurrentSalesTax","CurrentSecondTax","BookingCanExtend","RenewalStartMonth","CMRenewalMonth","RentEndPeriodIndex","rentalStartPeriod","startYearAndMonth","rentalMonthEndDate","dayOfMonth","handleCMEndDateChange","updateRentalRecord","extendCMRental","renewAllBooths","processSelectedBooths","shouldProcessBooth","processBoothRentalDates","updateVendorRentalDays","vendorRentalDaysObj","vendorRentalDaysRes","addVendorRentalDays","checkResaleOrBusinessLicense","extendCMOtherRental","rentalMonthDate","otherItemCharge","renewCMOtherCharges","proceedRenewingOtherCharges","extendCWOtherRental","cuurentWeek","CWRenewalWeek","addDays","rentalWeekDate","rentalStartWeek","addRentalDates","recordExist","calculateEndDate","_this8","handleBusinessLicenseNumber","validateResaleAndBusinessLicense","_this9","_this10","checkBusinessLicenseExpiry","_this11","_this12","nonAvailableBooths","_this13","endDateYearMonth","allRentalDates","currentRentedEndDate","obj1","RentalDates","updateBoothRentDetails","getEndDate","_this14","getPreviousMonthEndDate","previousYear","_this15","filterCurrentMonthDates","sortDates","dates","filterDatesAfterEndDate","currentEndDate","_this16","parseCurrency","updateTotalCharges","_this17","OtherRentalId","CurrentRentalMonth","CurrentOtherItemtotal","CurrentSecLevelTax","totalAmountPaid","weekStartDate","_this18","RentalWeekRecord","RentalWeekDay","renewalStartWeek","CurrentRentalWeek","RenewalStartWeek","renewCWOtherCharges","getDateRange","fetchMarketDays","_this19","CWRentalDateList","_this20","_this21","bindCWReservations","rentalStartDateRecord","rentalEndDateRecord","monthMap","jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec","monthPresence","keys","monthValues","reduce","acc","BlockRenewal","handleCWEndDateChange","_this22","_this23","objCM","subCM","objCombinedWeekly","subCW","voidPaymentResponse","setMinimum","enteredAmount","totalrentalCharge","otherRentalCharge","totalDue","renewalFee","totalAmount","balanceAmount","calculateConvenienceFee","handledblClick","clearTimeout","handleClick","currentValue","currentSelectionLength","selectionEnd","inputElement","setSelectionRange","hasDollarSign","caretPosition","dollarSignIndex","setCurrencyFormat","numberOnly","ApplyCcporcessingFeePercentage","enable","AllowRenewalsCw","AllowRenewalsCm","AllowRenewingOtherItems","MasterChargeForOtherChargeRenewal","extendCWRental","extendRentalRecord","extendRentalStartPeriod","RentAmount","JanRentAmount","FebRentAmount","MarRentAmount","AprRentAmount","MayRentAmount","JunRentAmount","JulRentAmount","AugRentAmount","SepRentAmount","OctRentAmount","NovRentAmount","DecRentAmount","extendedRentalEndDates","_this24","proceedExtendingRental","_this25","_this26","calculateRentalDates","processVendorRentalDays","getSelectedDayOfWeek","_this27","checkResaleAndBusinessLicense","_this28","showModal","promptExpiredBusinessLicense","renewCWAllBooths","promptBusinessLicense","_this29","_this30","_this31","nonAvailableBoothsString","join","updateCMOtherItemRecord","updateCWOtherItemRecord","updateCWRentalRecord","proceedRenewingCWOtherCharges","getActualAmountFromInp","proceedPayment","resaleOptionValidation","ctx_r93","ctx_r94","ctx_r97","BookingDetailsWeeklyMonthlyComponent","MonthlyBookingEndDate","allowWeeklyRentalRenewal","allowMonthlyRentalRenewal","getWeeklyRental","toggleOtherItemsDetails","toggleWeeklyBookingDetails","bindMonthlyRentalData","MonthlyRenewalMonth","handleMonthlyEndDateChange","updateMonthlytherItemRecord","extendMonthlyOtherRental","renewMonthlyOtherCharges","objM","AllowRenewalsMonthly","extendMonthlyRental","WeekDay","handleWeeklyEndDateChange","renewWeeklyAllBooths","renewWeeklyOtherCharges","proceedRenewingWeeklyOtherCharges","updateWeeklyRentalRecord","extendWeeklyRental","extendWeeklyOtherRental","updateWeeklyOtherItemRecord","RentOnlineComponent","showrentOnline","showLoginInfo","showBookings","showReviewRegistration","pageName","currentPassword","btnRentOnline","ContactInfo","btnLoginInfo","btnBookings","btnRegistration","AllowBookingsCw","AllowBookingsWeekly","AllowBookingsCm","AllowBookingsMonthly","AllowBookingsDaily","AllowRenewalsWeekly","defaultRentalTypeSelected","enabledRentalTypes","securityQuestion","showCellPhoneError","showWorkPhoneError","vendorMarketID","anyRentalTypeEnabledForBooking","selected","vendorName","bookingPage","bookingPageRentalType","emailIdsPattern","rentalTypes","contactInfoForm","state","country","postalCode","workPhone","cellPhone","noWhitespaceValidator","onlineLoginForm","onlineUserName","onlinePassword","confirmPassword","securityAnswer","bookingRentalTypes","passwordFieldType","togglePasswordVisibility","bookingpage","rentaltype","MyBookings","getStatesAndCountries","refreshBookingDetails","whitespace","restrictSpace","eve","onKeyUp","phoneControl","invalid","touched","resCountries","resStates","resSecurityQuestion","getVendorInfobyId","saveVendorLoginDetail","checkValidations","validateContactForm","markAsPristine","rentOnline","contactInfo","defaultBookingType","DefaultRentalType","LoginInfo","ReviewRegistration","setDirtyFlag","cancelContactModification","dirty","MarketMapComponent","marketMap","selectedWeekdays","additionalMarketDate","excludedMarketDate","selectedDailyRentalMarketDays","monthlyCMResvPeriod","weeklyCWResvPeriod","changeMarketMap","checkRentalWeeks","rentalTypeChange","viewLayout","weeklyRentalStartDateYear","weeklyRentalStartDateMonth","weeklyRentalEndDateYear","weeklRentalEndDateMonth","weeklyRentalStartDateYearMonth","weeklyRentalEndDateYearMonth","selectedRentalTypes","MaxBookingWeeks","MaxBookingMonths","scrollSettings","horizontalOffset","verticalOffset","NewsService","getActiveNews","NewsComponent","newsService","news","selectedNews","filteredNews","isMoreNews","label","NewsData","getNewsData","openModal","newsData","loadMoreNews","ContactUsService","SubmitContactUs","ContactUs","ContactUsComponent","contactUsService","fb","contactUsForm","firstNum","secondNum","generateCaptcha","phone","subject","comments","captchaResult","onSubmit","validateCaptcha","contactUsFormValue","Phone","submitContactUsForm","resetForm","floor","random","firstNumElement","getElementById","secondNumElement","textContent","validateCaptchaResult","isNaN","ctx_r32","ctx_r33","ctx_r36","VendorPaymentsComponent","operationRentalService","location","displayContract","totalRentalCharges","promoCodeAppliedDiscount","paymentForm","calculateChangeAmount","DisablePayment","displayAmountPaid","thermalPrinting","disablePayBtnAfterSubmit","promoCodeDiscountAmount","wifiOtherItemModel","bookingFeeOtherItemModel","businessLicenseInfo","cancelClick","enablePromoCode","enableWifiCodeChangesUfm","printWIFIAccessCodeInReceipts","WIFIOtherItemRentalChargeId","facilityOtherItemRentalChargeId","otherChargesAutomaticApplicablePeriod","applyOtherChargesAutomatically","paymentDetails","facilityCharge","discounts","additionalCharges","disabled","secondTax","enableWifiCodeChanges","promoCode","getRentalAndCustomSettings","resCustomSettings","PrintWIFIAccessCodeInReceipts","EnableWrpromocode","EnableWifiCodeChangesUfm","getWIFIOtherChargeItem","getFacilityOtherChargeItem","calculateFacilityCharges","calculateTotalBookingFeeAmount","bookingFee","automaticOtherCharge","distinctRentDates","from","toISOString","distinctStartDates","relatedItem","rentalWeekStart","currentWeekStart","uniqueRentDatesArray","distinctRentalYearMonth","totalFacilityCharge","ApplyOtherChargesAutomatically","AutomaticApplicableOtherChargeId","OtherChargesAutomaticApplicablePeriod","applyBookingFee","applyBookingFeeId","applyPromoCodeDiscount","PromoCode","bookingDay","promocodeDiscount","promoCodeUsedCount","AppliedCount","UsageLimit","WebRentalApplicable","IsPublicVendor","numberOnlyForCash","inputChar","fromCharCode","resTokenGen","BusinessLicenseNoRequired","saveBookingDetails","FacilityCharge","checkMinimum","RentalTypeId","objMonthly","subMonthly","objCombinedMonthly","WeekStartDate","objWeekly","subW","ClearPay","cashAmount","checkAmount","directDebitAmount","checkNo","creditCardTypes","cancel","AuthGuard","canActivate","paramMap","NewVendorRentonlineComponent","showPaymentPage","howtoRentSpaceDocURL","rulesAndRegulations","vendorAddressMandatory","openPaymentDetails","resaleNumberRequired","businessLicenseNoRequired","initialFormValues","BusinessLicenseExpiryDate","paymentCancelClick","HowtoRentSpaceDocURL","RulesAndRegulationsAttachmentPDFUrl","paymentInfo","openPaymentPage","routes","path","component","AppRoutingModule","RouterModule","AppComponent","TokenInterceptor","intercept","clone","setHeaders","Authorization","httpRequest","Pragma","Expires","handle","LinkifyPipe","hyperlink","startsWith","AppModule","bootstrap","provide","HTTP_INTERCEPTORS","useClass","multi","DatePipe","CurrencyPipe","BsModalService","imports","GridAllModule","HttpClientModule","BrowserAnimationsModule","CommonModule","FormsModule","ReactiveFormsModule","BrowserModule","DatePickerModule","DiagramModule","DropDownListModule","MaskedTextBoxModule","ToastrModule","preventDuplicates","ModalModule","ComboBoxModule","AppConfig","InjectionToken","requestOrigin","origin","enableProdMode","bootstrapApp","req","XMLHttpRequest","addEventListener","appConfig","currentTarget","registerLicense","__NgCli_bootstrap_1","useValue","bootstrapModule","serviceWorker","register","catch","open","send"],"sourceRoot":"webpack:///","sources":["./src/environments/environment.prod.ts","./src/app/services/MarketInfoService.service.ts","./src/app/services/auth.service.ts","./src/app/services/User.service.ts","./src/app/rental-menu/rental-menu.component.html","./src/app/rental-menu/rental-menu.component.ts","./src/app/rental-menu/home/home.component.html","./src/app/rental-menu/home/home.component.ts","./src/app/Shared/enum.ts","./src/app/services/General.service.ts","./src/app/services/Vendor.service.ts","./src/app/services/paymentService.service.ts","./src/app/services/Rental.service.ts","./src/app/Shared/customCurrency.pipe.ts","./src/app/Shared/SharedData.service.ts","./src/app/Shared/success-tick/success-tick.component.ts","./src/app/Shared/success-tick/success-tick.component.html","./src/app/Shared/failure-cross/failure-cross.component.ts","./src/app/Shared/failure-cross/failure-cross.component.html","./src/app/Shared/loader/loader.component.ts","./src/app/Shared/loader/loader.component.html","./src/app/Shared/payment/payment.component.html","./src/app/Shared/payment/payment.component.ts","./src/app/rental-menu/vendor-registration/vendor-registration.component.html","./src/app/rental-menu/vendor-registration/vendor-registration.component.ts","./src/app/rental-menu/vendor-login/vendor-login.component.html","./src/app/rental-menu/vendor-login/vendor-login.component.ts","./src/app/rental-menu/vendor-login/rent-online/rentallayout-online/rentallayout-online.component.html","./src/app/rental-menu/vendor-login/rent-online/rentallayout-online/rentallayout-online.component.ts","./src/app/rental-menu/vendor-login/rent-online/dailyrental-online/dailyrental-online.component.html","./src/app/rental-menu/vendor-login/rent-online/dailyrental-online/dailyrental-online.component.ts","./src/app/rental-menu/vendor-login/rent-online/weeklyrental-online/weeklyrental-online.component.html","./src/app/rental-menu/vendor-login/rent-online/weeklyrental-online/weeklyrental-online.component.ts","./src/app/rental-menu/vendor-login/rent-online/monthlyrental-online/monthlyrental-online.component.html","./src/app/rental-menu/vendor-login/rent-online/monthlyrental-online/monthlyrental-online.component.ts","./src/app/rental-menu/vendor-login/rent-online/combinedweeklyrental-online/combinedweeklyrental-online.component.html","./src/app/rental-menu/vendor-login/rent-online/combinedweeklyrental-online/combinedweeklyrental-online.component.ts","./src/app/rental-menu/vendor-login/rent-online/combinedmonthlyrental-online/combinedmonthlyrental-online.component.html","./src/app/rental-menu/vendor-login/rent-online/combinedmonthlyrental-online/combinedmonthlyrental-online.component.ts","./src/app/rental-menu/vendor-login/rent-online/rental-confirmation/rental-confirmation.component.html","./src/app/rental-menu/vendor-login/rent-online/rental-confirmation/rental-confirmation.component.ts","./src/app/rental-menu/vendor-login/rent-online/booking-details/booking-details.component.html","./src/app/rental-menu/vendor-login/rent-online/booking-details/booking-details.component.ts","./src/app/rental-menu/vendor-login/rent-online/booking-details-weekly-monthly/booking-details-weekly-monthly.component.html","./src/app/rental-menu/vendor-login/rent-online/booking-details-weekly-monthly/booking-details-weekly-monthly.component.ts","./src/app/rental-menu/vendor-login/rent-online/rent-online.component.html","./src/app/rental-menu/vendor-login/rent-online/rent-online.component.ts","./src/app/rental-menu/market-map/market-map.component.html","./src/app/rental-menu/market-map/market-map.component.ts","./src/app/services/News.service.ts","./src/app/rental-menu/news/news.component.html","./src/app/rental-menu/news/news.component.ts","./src/app/services/ContactUs.service.ts","./src/app/rental-menu/contact-us/contact-us.component.html","./src/app/rental-menu/contact-us/contact-us.component.ts","./src/app/Shared/vendor-Payment-details/vendor-payments.component.html","./src/app/Shared/vendor-Payment-details/vendor-payments.component.ts","./src/app/auth/auth.guard.ts","./src/app/rental-menu/vendor-login/rent-online/new-vendor-rentonline/new-vendor-rentonline.component.html","./src/app/rental-menu/vendor-login/rent-online/new-vendor-rentonline/new-vendor-rentonline.component.ts","./src/app/app-routing.module.ts","./src/app/app.component.ts","./src/app/app.component.html","./src/app/Shared/token.interceptor.ts","./src/app/Shared/LinkifyPipe.pipe.ts","./src/app/app.module.ts","./src/app/Shared/app-config.inject.ts","./src/main.ts"],"sourcesContent":["export const environment = {\r\n production: \"{production}\",\r\n syncfusionKey: \"{syncfusionKey}\",\r\n apiBaseUrl: \"{apiBaseUrl}\",\r\n paymentMaxWaitTime: 2,\r\n paymentGetCCTStatusInterval: 10\r\n};\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpErrorResponse, HttpParams } from '@angular/common/http';\r\nimport { BehaviorSubject,Observable, of, throwError } from 'rxjs';\r\nimport { map, catchError } from 'rxjs/operators';\r\nimport { environment } from 'src/environments/environment';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\n\r\nexport class MarketInfoService {\r\n private baseURL: string;\r\n constructor(private http: HttpClient) {\r\n this.baseURL = environment.apiBaseUrl;\r\n }\r\n\r\n private marketIdSubject = new BehaviorSubject(null);\r\n marketId$ = this.marketIdSubject.asObservable();\r\n\r\n setMarketId(id: any) {\r\n this.marketIdSubject.next(id);\r\n }\r\n\r\n getMarketId() {\r\n return this.marketIdSubject.asObservable();\r\n }\r\n\r\n public options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n\r\n getMarketDays(marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/MarketInfo/GetMarketDays?marketId=` + marketId,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const marketDays = res.body as any;\r\n return marketDays;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getMarketLogo(marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/MarketInfo/GetMarketLogo?marketId=` + marketId,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const marketLogo= res.body as any[];\r\n return marketLogo;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n\r\n getDailyMarketDays(marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/MarketInfo/GetDailyMarketDays?marketId=` + marketId,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const marketdays = res.body as any;\r\n return marketdays;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getWeeklyMarketDays(marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/MarketInfo/GetWeeklyMarketDays?marketId=` + marketId,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const marketdays = res.body as any;\r\n return marketdays;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getALLBoothsForLayoutALLRentalTypes(marketId, rentalTypesDatesModel): Observable {\r\n const url = `${this.baseURL}/MarketInfo/GetALLBoothsForLayoutALLRentalTypes?marketId=` + marketId\r\n return this.http.post(url, rentalTypesDatesModel, this.options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any;\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getMonthlyMarketDays(marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/MarketInfo/GetMonthlyMarketDays?marketId=` + marketId,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const marketdays = res.body as any;\r\n return marketdays;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getParts(marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/MarketInfo/GetParts?marketId=` + marketId,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const parts = res.body as any;\r\n return parts;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getAllBoothsForDailyRentalTypeLayout(marketId,partId, selectedMarketDays): Observable {\r\n const url = `${this.baseURL}/MarketInfo/GetAllBoothsForDailyRentalTypeLayout?partId=${partId}&marketId=${marketId}`\r\n return this.http.post(url, selectedMarketDays, this.options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any;\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getListOfValuesData(): Observable { \r\n return this.http.get(\r\n `${this.baseURL}/MarketInfo/GetListOfValuesData`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const result = res.body as any;\r\n return result;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getLayoutFonts(marketId){\r\n return this.http.get(\r\n `${this.baseURL}/MarketInfo/GetLayoutFonts?marketId=` + marketId,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const result = res.body as any;\r\n return result;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getWebRentalSetting(marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/MarketInfo/GetWebRentalSetting?marketId=` + marketId,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const parts = res.body as any;\r\n return parts;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getWebRentalSettingDashboardSetting(marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/MarketInfo/GetWebRentalSettingDashboardSetting?marketId=` + marketId,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getBuildingAreasInLayOut(partId,marketId){\r\n return this.http.get(\r\n `${this.baseURL}/MarketInfo/GetBuildingAreasInLayOut?partId=${partId}&marketId=` + marketId,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const result = res.body as any;\r\n return result;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getImages(){\r\n return this.http.get(\r\n `${this.baseURL}/MarketInfo/GetImagesForLayout`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const result = res.body as any;\r\n return result;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getLayoutImages(partId, marketId) {\r\n return this.http.get(\r\n `${this.baseURL}/MarketInfo/GetLayoutImages?partId=${partId}&marketId=` + marketId,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const result = res.body as any;\r\n return result;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getMarketDetails(marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/MarketInfo/GetMarketDetails?marketId=` + marketId,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const marketDetails = res.body as any;\r\n return marketDetails;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n GetEnabledRentalTypesForMarket(marketId: number): Observable {\r\n return this.http.get(`${this.baseURL}/MarketInfo/GetEnabledRentalTypesForMarket?marketId=${marketId}`)\r\n .pipe(\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getCurrentMarketVendorGeneralSettings(marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/General/getCurrentMarketVendorGeneralSettings?marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const generalSettings = res.body as any;\r\n return generalSettings;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n GetAllMarketProducts(Id): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Vendor/GetAllMarketProducts?marketId=${Id}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n\r\n const result = res.body as any;\r\n return result;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n RegistrationFee(Id): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/MarketInfo/GetRegistrationFee?marketId=${Id}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n\r\n const result = res.body as any;\r\n return result;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n private handleError(error: HttpErrorResponse) {\r\n console.error('server error:', error);\r\n if (error.error instanceof Error) {\r\n const errMessage = error.error.message;\r\n // this.appinsights.logEvent(errMessage);\r\n return throwError(errMessage);\r\n }\r\n return throwError(error || 'Node.js server error');\r\n }\r\n} ","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\n\r\nexport class AuthService {\r\n public isLoggedIn;\r\n\r\n isLoginAutenticated(){\r\n const token=localStorage.getItem('token');\r\n if (token) {\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpErrorResponse, HttpParams } from '@angular/common/http';\r\nimport { Observable, of, throwError } from 'rxjs';\r\nimport { map, catchError } from 'rxjs/operators';\r\nimport { environment } from 'src/environments/environment';\r\nimport { AuthService } from './auth.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\n\r\nexport class UserService {\r\n private baseURL: string;\r\n constructor(private http: HttpClient,\r\n private authService: AuthService\r\n ) {\r\n this.baseURL = environment.apiBaseUrl;\r\n }\r\n\r\n public options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n\r\n getToken(userData): Observable {\r\n const url = `${this.baseURL}/user`;\r\n return this.http.post(url, userData, this.options)\r\n .pipe(\r\n map(res => {\r\n if (res.Token) {\r\n this.authService.isLoggedIn = true;\r\n localStorage.setItem('token', res.Token);\r\n return res;\r\n }\r\n else {\r\n this.authService.isLoggedIn = false;\r\n }\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n clearToken(): void {\r\n localStorage.removeItem('token');\r\n this.authService.isLoggedIn = false;\r\n }\r\n\r\n ForgotPassword(marketId, email): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/user/VendorWRLoginForgotPassword?marketId=${marketId}`\r\n return this.http.post(url, { email }, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n private handleError(error: HttpErrorResponse) {\r\n console.error('server error:', error);\r\n if (error.error instanceof Error) {\r\n const errMessage = error.error.message;\r\n // this.appinsights.logEvent(errMessage);\r\n return throwError(errMessage);\r\n }\r\n return throwError(error || 'Node.js server error');\r\n }\r\n} ","
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n   \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n   \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n   \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n   \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n   \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n   \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n   \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n   \r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';\r\nimport { ChangeDetectorRef } from '@angular/core';\r\nimport { ActivatedRoute, NavigationEnd, Params, Router } from '@angular/router';\r\nimport { MarketInfoService } from '../services/MarketInfoService.service';\r\nimport { Subscription } from 'rxjs';\r\nimport { UserService } from '../services/User.service';\r\nimport Swal from 'sweetalert2';\r\n\r\n@Component({\r\n selector: 'app-rental-menu',\r\n templateUrl: './rental-menu.component.html',\r\n styleUrls: ['./rental-menu.component.scss']\r\n})\r\nexport class RentalMenuComponent implements OnInit{\r\n @Input() IsVendorLogin;\r\n marketId;\r\n imageUrl= \"\";\r\n vendorId=0;\r\n private subscriptions: Subscription[] = [];\r\n allowRegisterVendor = false;\r\n allowNewVendorBooking = false;\r\n activeRoute: string = '';\r\n vendorTerm = \"Vendor\";\r\n \r\n constructor(\r\n private route: ActivatedRoute,\r\n private userService:UserService,\r\n private router:Router,\r\n private marketInfoService:MarketInfoService,) {}\r\n\r\n ngOnInit(): void {\r\n this.route.params.subscribe((params: Params) => {\r\n this.marketId = params['marketId'];\r\n });\r\n this.getWebRentalSetting();\r\n this.getMarketLogo(); \r\n this.router.events.subscribe((event) => {\r\n if (event instanceof NavigationEnd) {\r\n this.activeRoute = this.router.url;\r\n }\r\n }); \r\n } \r\n\r\n getMarketLogo() {\r\n const timestamp = new Date().getTime();\r\n const sub = this.marketInfoService.getMarketLogo(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.imageUrl = res.MarketLogoBlobURL + `?timestamp=${timestamp}`;\r\n }\r\n else {\r\n this.imageUrl = '../../../assets/images/NoImage.jpg'\r\n }\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getWebRentalSetting(){\r\n const sub = this.marketInfoService.getWebRentalSetting(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.allowRegisterVendor =res.VendorRegistration;\r\n this.allowNewVendorBooking = res.AllowNewVendorBooking;\r\n this.vendorTerm = res.WebRentalVendorTermText; \r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n isActiveRoute(route: string): boolean {\r\n return this.router.url.includes(route);\r\n }\r\n\r\n changeRentalMenu(pagename) {\r\n var token = localStorage.getItem('token');\r\n if (token && this.router.url.includes(\"rent-online\")) {\r\n if(pagename == \"login\"){\r\n return false;\r\n }\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Navigating to other page will log you out from the application. Are you sure you want to logout?`,\r\n icon: 'warning',\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n\r\n }).then((result) => {\r\n if (result.value) {\r\n this.userService.clearToken();\r\n if (pagename == \"newven-online\") {\r\n this.router.navigate(['/' + pagename, this.marketId, this.vendorId]);\r\n } else\r\n this.router.navigate(['/' + pagename, this.marketId]);\r\n }\r\n else {\r\n return false;\r\n }\r\n })\r\n }\r\n else {\r\n if (pagename == \"newven-online\") {\r\n this.router.navigate(['/' + pagename, this.marketId, this.vendorId]);\r\n } else\r\n this.router.navigate(['/' + pagename, this.marketId]);\r\n }\r\n }\r\n\r\n checkVendorLoggedIn() {\r\n var token = localStorage.getItem('token');\r\n if (token && this.router.url.includes(\"rent-online\"))\r\n return true;\r\n else\r\n return false;\r\n }\r\n\r\n logout() {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to logout?`,\r\n icon: 'warning',\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n\r\n }).then((result) => {\r\n if (result.value) {\r\n this.userService.clearToken();\r\n var url = '/login/' + this.marketId;\r\n this.router.navigate([url]);\r\n } else {\r\n return;\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

\r\n


\r\n

\r\n


\r\n

\r\n


\r\n

\r\n


\r\n
\r\n
\r\n
\r\n
    \r\n
  1. \r\n
  2. \r\n
  3. \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n Previous\r\n \r\n \r\n \r\n Next\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
","import { Component, OnInit } from '@angular/core';\r\nimport { ActivatedRoute, Params } from '@angular/router';\r\nimport { Subscription } from 'rxjs';\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\n\r\n@Component({\r\n selector: 'app-home',\r\n templateUrl: './home.component.html',\r\n styleUrls: ['./home.component.scss']\r\n})\r\n\r\nexport class HomeComponent implements OnInit{\r\n marketId;\r\n marketName = \"\";\r\n message1 = \"\";\r\n message2 = \"\";\r\n message3 = \"\";\r\n message4 = \"\";\r\n imageURL1 = \"\";\r\n imageURL2 = \"\";\r\n imageURL3 = \"\";\r\n vendorTerm = \"Vendor\";\r\n private subscriptions: Subscription[] = [];\r\n public loaderIcon: Promise; \r\n constructor(\r\n private route: ActivatedRoute,\r\n private marketInfoService: MarketInfoService) {}\r\n ngOnInit(): void {\r\n this.route.params.subscribe((params: Params) => {\r\n this.marketId = params['marketId'];\r\n this.getMarketDetails();\r\n this.getWebRentalSettingDashboardSetting();\r\n });\r\n }\r\n\r\n getMarketDetails() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.marketInfoService.getMarketDetails(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.marketName = res.MarketName;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getWebRentalSettingDashboardSetting(){\r\n this.subscriptions.push(this.marketInfoService.getWebRentalSettingDashboardSetting(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n const timestamp = new Date().getTime();\r\n this.message1 = res.DashboardMessage1;\r\n this.message2 = res.DashboardMessage2;\r\n this.message3 = res.DashboardMessage3;\r\n this.message4 = res.DashboardMessage4;\r\n this.imageURL1 = res.DashboardImageURL1 ? res.DashboardImageURL1 + `?timestamp=${timestamp}` : \"\";\r\n this.imageURL2 = res.DashboardImageURL2 ? res.DashboardImageURL2 + `?timestamp=${timestamp}` : \"\";\r\n this.imageURL3 = res.DashboardImageURL3 ? res.DashboardImageURL3 + `?timestamp=${timestamp}` : \"\";\r\n this.vendorTerm = res.VendorTerm;\r\n }\r\n }, err => {\r\n }));\r\n }\r\n\r\n getFirstVisibleIndex(): number {\r\n if (this.imageURL1) {\r\n return 0;\r\n } else if (this.imageURL2) {\r\n return 1;\r\n } else if (this.imageURL3) {\r\n return 2;\r\n }\r\n return -1; // No images available\r\n }\r\n}\r\n","export enum AllowNewBookings {\r\n 'All Vendors' = 1,\r\n 'New Vendors' = 2,\r\n 'Existing Vendors' = 3\r\n}\r\n\r\nexport enum RentalSettings {\r\n 'MaxBookingMonths' = 24,\r\n 'MaxBookingWeeks' = 52,\r\n 'MaxBookingDaily' = 120,\r\n 'SelectedDay' = 9\r\n}\r\n\r\nexport enum RentalTypes {\r\n 'Daily' = 1,\r\n 'Monthly' = 2,\r\n 'Weekly' = 3,\r\n 'CombinedMonthly' = 4,\r\n 'CombinedWeekly' = 5,\r\n 'QuickDaily' = 6,\r\n 'Event' = 7\r\n}\r\n\r\nexport enum RentalTypesDescription {\r\n 'Daily' = 'Daily',\r\n 'Monthly' = 'Monthly',\r\n 'Weekly' = 'Weekly',\r\n 'CombinedMonthly' = 'Combined Monthly',\r\n 'CombinedWeekly' = 'Combined Weekly',\r\n 'QuickDaily' = 'Quick Daily',\r\n 'Event' = 'Event'\r\n}\r\n\r\nexport enum BoothTerm {\r\n 'Space' = 0,\r\n 'Booth' = 1\r\n}\r\n\r\nexport enum EPresetValue {\r\n \"Daily\" = 1,\r\n \"WeekToDate\" = 2,\r\n \"MonthToDate\" = 3,\r\n \"YearToDate\" = 4,\r\n \"Custom\" = 5,\r\n}\r\n\r\nexport enum EOperationalReports {\r\n \"OutstandingBalanceReport\" = 38,\r\n \"BoothPriceListing\" = 51,\r\n \"OtherItemPriceListing\" = 39,\r\n \"TransactionJournal\" = 43,\r\n \"AvailableBooths\" = 42,\r\n \"VendorReservedBooths\" = 40,\r\n \"VendorBalancesReport\" = 41,\r\n \"FinancialAudit\" = 44,\r\n \"YTDPaymentsReport\" = 84,\r\n \"RevenueByBooths\" = 85,\r\n \"VendorBoothsReport\"=83,\r\n \"ProformaJournal\"=100\r\n}\r\n\r\nexport enum EManagementReports {\r\n\r\n \"ManagementSummaryReport\" = 52,\r\n \"FutureRentals\" = 50\r\n}\r\n\r\nexport enum EVendorReports {\r\n\r\n \"VendorCheckIn\" = 46,\r\n \"VendorDepositBalance\" = 47,\r\n \"AbsenteeVendors\" = 45,\r\n \"VendorBookingReport\" = 48,\r\n \"VendorDiscountPlan\" = 104\r\n}\r\n\r\nexport enum EEdgeExpressECIType {\r\n \"Moto\" = 1,\r\n \"Recurring\" = 2\r\n}\r\n\r\nexport enum EOpenEdgeResponseCode {\r\n \"Approval\" = \"000\",\r\n \"ZeroDollarAuthApproval\" = \"032\",\r\n \"ImproperFieldData\" = 811,\r\n \"TransactionDoesNotExist\" = 814,\r\n \"TransactionAlreadyVoided\" = 815\r\n}\r\n\r\nexport enum EPaymentModes {\r\n \"Cash\" = 1,\r\n \"Check\" = 2,\r\n \"CreditCard\" = 3,\r\n \"DirectDebitEFT\" = 4,\r\n \"HostedPage\" = 5,\r\n \"ACH\" = 6,\r\n \"Gift_Card\" = 7,\r\n \"ManualAuthorization\" = 8,\r\n \"CardOnfile\" = 9,\r\n \"ACHOnFile\" = 10,\r\n \"ACHManualAuthorization\" = 11\r\n}\r\n\r\nexport enum EPaymentTransactionType {\r\n \"Processed\" = 357,\r\n \"Declined\" = 358,\r\n \"Reversal_Refund\" = 359\r\n}\r\n\r\nexport enum ECreditCards {\r\n \"American_Express\" = \"1\",\r\n \"Visa\" = \"2\",\r\n \"Master_Card\" = \"3\",\r\n \"Discover\" = \"4\",\r\n \"Diners\" = \"5\",\r\n \"JCB\" = \"6\"\r\n}\r\n\r\nexport enum EPaymentGateway {\r\n \"OpenEdgeExpress\" = 209,\r\n}\r\n\r\nexport enum EEdgeExpressResultCode {\r\n \"Success\" = 0,\r\n \"Canceled\" = 3,\r\n \"Fail\" = 4,\r\n \"NoDeviceConfigured\" = 5,\r\n \"DeviceNotConfigured\" = 6,\r\n \"DeviceInitError\" = 7,\r\n \"Declined\" = 12,\r\n \"Error_Reading_Chip\" = 15\r\n}\r\n\r\nexport enum EOpenEdgeSessionStates {\r\n \"NotFound\" = 0,\r\n \"Initializing\" = 1,\r\n \"Processing\" = 2,\r\n \"Finalizing\" = 3,\r\n \"Canceling\" = 4,\r\n \"Completed\" = 5,\r\n \"PromptingForCard\" = 6,\r\n \"PromptingForCardRemoval\" = 7,\r\n \"ChipErrorPromptingForCardRemoval\" = 8\r\n\r\n}\r\n\r\nexport enum MarketInfoAndSettingsFunctionID {\r\n \"MarketInfo\" = 1,\r\n \"Setup\" = 2,\r\n \"VendorSettings\" = 3,\r\n \"PrinterSettings\" = 4,\r\n \"LayoutParts\" = 14,\r\n \"BoothTypes\" = 15,\r\n \"Layout\" = 16,\r\n \"RevenueCategory\" = 17,\r\n \"ProductCategory\" = 18,\r\n \"Product\" = 19,\r\n \"OtherCharges\" = 20,\r\n \"OnlinePaymentSettings\" = 45,\r\n \"EmailSettings\" = 46,\r\n \"MarketCreditCards\" = 50,\r\n \"DiscountPlan\" = 55,\r\n \"CustomModificationSetting\" = 56,\r\n \"OnlineWebRentalSettings\" = 57,\r\n \"News\"=59\r\n}\r\n\r\nexport enum MaintainanceFunctionID {\r\n \"ProductCategory\" = 5,\r\n \"Product\" = 6,\r\n \"RevenueCategory\" = 7,\r\n \"OtherCharges\" = 8,\r\n \"VendorTypes\" = 9,\r\n \"EmailTemplates\" = 10\r\n}\r\n\r\nexport enum SecurityFunctionID {\r\n \"UserGroup\" = 11,\r\n \"User\" = 12\r\n}\r\n\r\nexport enum AccountingFunctionID {\r\n \"CreditCards\" = 13\r\n}\r\n\r\nexport enum DashboardFunctionID {\r\n \"Dashboard\" = 21\r\n}\r\n\r\nexport enum OperationsFunctionID {\r\n \"Vendor\" = 22,\r\n \"AutomaticRentRenewal\" = 23,\r\n \"QuickDailyRental\" = 24,\r\n \"VoidTransactions\" = 25,\r\n \"BoothHistory\" = 26,\r\n \"CheckIn\" = 27,\r\n \"MakeAvailable\" = 28,\r\n \"DepositSlip\" = 29,\r\n \"ViewLayout\" = 47,\r\n \"DeleteRental\" = 48,\r\n \"MarkAbsentee\" = 49,\r\n \"ProformaInvoice\" = 54\r\n}\r\n\r\nexport enum DiscountType {\r\n \"FixedAmount\" = \"Fixed Amount\",\r\n \"Percentage\" = \"Percentage\"\r\n}\r\n\r\nexport enum ListOfValues {\r\n \"Vendor\" = \"Vendor\",\r\n \"Customer\" = \"Customer\",\r\n \"Seller\" = \"Seller\"\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpErrorResponse, HttpParams } from '@angular/common/http';\r\nimport { Observable, of, throwError } from 'rxjs';\r\nimport { map, catchError } from 'rxjs/operators';\r\nimport { environment } from 'src/environments/environment';\r\nimport { AuthService } from './auth.service';\r\nimport { ICountry, IStates } from '../Shared/models/GeneralModel';\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\n\r\nexport class GeneralService {\r\n private baseURL: string;\r\n constructor(private http: HttpClient,\r\n ) {\r\n this.baseURL = environment.apiBaseUrl;\r\n }\r\n\r\n public options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n\r\n getCountries(): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/General/GetCountries`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const Countries = res.body as ICountry[];\r\n return Countries;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getUSStates(): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/General/GetUSStates`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const states = res.body as IStates[];\r\n return states;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n GetVendorTypes(marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/admin/VendorType/GetVendorTypes/${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const result = res.body as any;\r\n return result;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n GetSecurityQuestion(): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/General/GetVendorLoginSecurityQuestion`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const result = res as any;\r\n return result;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getWebrentalMarketRules(marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/General/GetWebrentalMarketRules?marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const result = res.body as any;\r\n return result;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n private handleError(error: HttpErrorResponse) {\r\n console.error('server error:', error);\r\n if (error.error instanceof Error) {\r\n const errMessage = error.error.message;\r\n return throwError(errMessage);\r\n }\r\n return throwError(error || 'Node.js server error');\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpErrorResponse, HttpParams } from '@angular/common/http';\r\nimport { BehaviorSubject, Observable, of, throwError } from 'rxjs';\r\nimport { map, catchError } from 'rxjs/operators';\r\nimport { environment } from 'src/environments/environment';\r\nimport { AuthService } from './auth.service';\r\nimport { IVendorInfo } from '../Shared/models/VendorModel';\r\nimport { MarketInfoService } from './MarketInfoService.service';\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\n\r\nexport class VendorService {\r\n private baseURL: string;\r\n constructor(private http: HttpClient,private marketInfoService: MarketInfoService\r\n ) {\r\n this.baseURL = environment.apiBaseUrl;\r\n }\r\n\r\n private vendorIdSubject = new BehaviorSubject(0);\r\n vendorId$ = this.vendorIdSubject.asObservable();\r\n\r\n setVendorId(id: number) {\r\n this.vendorIdSubject.next(id);\r\n }\r\n\r\n \r\n getVendorId() {\r\n return this.vendorIdSubject.asObservable();\r\n }\r\n\r\n public options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n\r\n GetVendorTypes(marketId): Observable {\r\n const params = new HttpParams().set('marketId', marketId.toString());\r\n return this.http.get(\r\n `${this.baseURL}/General/GetVendorTypes`,\r\n { observe: 'response', params, headers: this.options.headers })\r\n .pipe(\r\n map(res => {\r\n const result = res.body as any;\r\n return result;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n SaveVendor(Vendor: IVendorInfo): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Vendor/AddVendor`;\r\n return this.http.post(url, Vendor, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n RegisterVendorInfoValidation(Vendor: IVendorInfo): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Vendor/RegisterVendorInfoValidation`;\r\n return this.http.post(url, Vendor, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n GetVendorById(vendorId: number,marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Vendor/GetVendorInfoById?vendorId=${vendorId}&marketId=${marketId}`,\r\n \r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const result = res as any;\r\n return result;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getMarketVendorSettings(id: number,marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Vendor/GetMarketVendorSetting?vendorId=${id}&marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const rentalSettings = res as any;\r\n return rentalSettings;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getVendorBusinessLicenseSettings(vendorId, marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Vendor/GetVendorBusinessLicenseSettings?vendorId=${vendorId}&marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n SaveVendorLoginDetail(VendorLoginDetail: any): Observable {\r\n var marketId = null;\r\n this.marketInfoService.getMarketId().subscribe(mrktId => {\r\n marketId = mrktId;\r\n });\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Vendor/SaveVendorLoginDetails/${marketId}`;\r\n return this.http.post(url, VendorLoginDetail, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n VendorLoginDetailsValidation(VendorLoginDetail: any): Observable {\r\n var marketId = null;\r\n this.marketInfoService.getMarketId().subscribe(mrktId => {\r\n marketId = mrktId;\r\n });\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Vendor/VendorLoginDetailsValidation/${marketId}`;\r\n return this.http.post(url, VendorLoginDetail, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n SendRegistrationEmail(vendorId: number): Observable {\r\n var marketId = null;\r\n this.marketInfoService.getMarketId().subscribe(mrktId => {\r\n marketId = mrktId;\r\n });\r\n return this.http.get(\r\n `${this.baseURL}/Vendor/SendRegistrationEmail?vendorId=${vendorId}&marketId=${marketId}`,\r\n\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const result = res as any;\r\n return result;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n GetDiscountPlan(vendorId,marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Vendor/GetDiscountPlan?vendorId=${vendorId}&marketId=${marketId}`,\r\n\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const result = res.body as any;\r\n return result;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n private handleError(error: HttpErrorResponse) {\r\n console.error('server error:', error);\r\n if (error.error instanceof Error) {\r\n const errMessage = error.error.message;\r\n return throwError(errMessage);\r\n }\r\n return throwError(error || 'Node.js server error');\r\n } \r\n \r\n getCountries(): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/General/GetCountries`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const Countries = res.body as any[];\r\n return Countries;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n \r\n getUSStates(): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/General/GetUSStates`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const states = res.body as any[];\r\n return states;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n \r\n getVendorLoginSecurityQuestion(): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/General/GetVendorLoginSecurityQuestion`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const states = res.body as any[];\r\n return states;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getVendorLoginInfo(VendorId: number, marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Vendor/GetVendorLoginInfoBT?vendorId=${VendorId}&marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const result = res.body as any;\r\n return result;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n \r\n UpdateVendor(Vendor): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Vendor/UpdateVendorInfoForWebRental`;\r\n return this.http.post(url, Vendor, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n validatePromoCode(promoCodeDiscountModel): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Vendor/GetPromoCodeDiscount`;\r\n return this.http.post(url, promoCodeDiscountModel, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any;\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http';\r\nimport { Observable, of, throwError } from 'rxjs';\r\nimport { map, catchError } from 'rxjs/operators';\r\nimport { environment } from 'src/environments/environment';\r\nimport { ECreditCards } from '../Shared/enum';\r\nimport { MarketInfoService } from './MarketInfoService.service';\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\n\r\nexport class PaymentService {\r\n private baseURL: string;\r\n constructor(private http: HttpClient,private marketInfoService: MarketInfoService) {\r\n this.baseURL = environment.apiBaseUrl;\r\n }\r\n\r\n public options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n getCCCredentials(marketId) {\r\n return this.http.get(\r\n `${this.baseURL}/General/GetCreditCardSettingForMarket/${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getRCMService(url, request): Observable {\r\n //const options = { headers: new HttpHeaders({ 'Content-Type': 'application/xml' , responseType: 'text/xml'}) };\r\n return this.http.get(\r\n `${url}${request}`)\r\n .pipe(\r\n map(res => {\r\n const responseRCM = res as any;\r\n return responseRCM;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n GetCNPCreditVoid(credential, transId, amount,paymentReturnType): Observable {\r\n const returnReq = {\r\n Url: credential.QueryPaymentStatusURL,\r\n XmlDoc: \"\" +\r\n \"\" + credential.XWEBID + \"\" +\r\n \"\" + credential.XWEBTERMINALID + \"\" +\r\n \"\" + credential.XWEBAUTHKEY + \"\" +\r\n \"\" + paymentReturnType +\"\" +\r\n \"\" + amount + \"\" +\r\n \"\" + transId + \"\" +\r\n \"TEXT\" +\r\n \"\"\r\n }\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n return this.http.post(\r\n `${this.baseURL}/Payment/GetCNPResponseURL`, returnReq, options)\r\n .pipe(\r\n map(res => {\r\n return res;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n GetPaymentStatus(credential, transId, orderId): Observable {\r\n const returnReq = {\r\n Url: credential.QueryPaymentStatusURL,\r\n XmlDoc: \"\" +\r\n \"\" + credential.XWEBID + \"\" +\r\n \"\" + credential.XWEBTERMINALID + \"\" +\r\n \"\" + credential.XWEBAUTHKEY + \"\" +\r\n \"QUERYPAYMENT\" +\r\n \"\" + orderId + \"\" +\r\n \"\"\r\n }\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n return this.http.post(\r\n `${this.baseURL}/Payment/GetCNPResponseURL`, returnReq, options)\r\n .pipe(\r\n map(res => {\r\n return res;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n openEdgeCardType(cType) {\r\n if (cType) {\r\n cType = cType.replace(/\\s/g, '');\r\n if (cType.toLowerCase() == 'americanexpress') {\r\n return ECreditCards.American_Express;\r\n } else if (cType.toLowerCase() == 'visa') {\r\n return ECreditCards.Visa;\r\n } else if (cType.toLowerCase() == 'mastercard') {\r\n return ECreditCards.Master_Card;\r\n } else if (cType.toLowerCase() == 'discover') {\r\n return ECreditCards.Discover;\r\n } else if (cType.toLowerCase() == 'diners') {\r\n return ECreditCards.Diners;\r\n } else if (cType.toLowerCase() == 'jcb') {\r\n return ECreditCards.JCB;\r\n } else {\r\n return ECreditCards.Visa;\r\n }\r\n } else {\r\n return ECreditCards.Visa;\r\n }\r\n }\r\n\r\n saveVerifoneUnSaved(model): Observable { // For creating Dummy record on initally CC Transaction and get OrderID, Then after CCT\r\n var marketId =null;\r\n this.marketInfoService.getMarketId().subscribe(marketId1 => {\r\n marketId = marketId1;\r\n });\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n let url = `${this.baseURL}/Payment/SaveVerifoneUnSaved?marketId=${marketId}`;\r\n return this.http.post(url, model, options)\r\n .pipe(\r\n map(res => {\r\n return res;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n GetVerifoneUnSavedDate(verifoneRecordId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Payment/GetVerifoneUnSavedDate?VerifoneRecordId=${verifoneRecordId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n GetVerifoneUnSavedCompleteData(verifoneRecordId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Payment/GetVerifoneUnSavedCompleteData?VerifoneRecordId=${verifoneRecordId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n\r\n replaceXMLEntity(stringValue) {\r\n if(stringValue && stringValue.trim().length) {\r\n if(stringValue.includes(\"&\")) {\r\n stringValue = stringValue.replace(/[&,]/g, \"&\");\r\n }\r\n if(stringValue.includes(\"<\")) {\r\n stringValue = stringValue.replace(\"<\", \"<\")\r\n }\r\n if(stringValue.includes(\">\")) {\r\n stringValue = stringValue.replace(\">\", \">\")\r\n }\r\n if(stringValue.includes('\"')) {\r\n stringValue = stringValue.replace('\"', \""\")\r\n }\r\n if(stringValue.includes(\"'\")) {\r\n stringValue = stringValue.replace(\"'\", \"'\")\r\n }\r\n }\r\n return stringValue;\r\n }\r\n\r\n \r\n getCNPService(rqsturl, request): Observable {\r\n const tempobj = {\r\n Url: rqsturl,\r\n XmlDoc: request\r\n };\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n return this.http.post(\r\n `${this.baseURL}/Payment/GetCNPResponseURL`, tempobj, options)\r\n .pipe(\r\n map(res => {\r\n return res;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getCNPResponse(credentials, orderId): Observable {\r\n const tempobj = {\r\n Url: credentials.QueryPaymentStatusURL,\r\n XmlDoc: \"\" +\r\n \"\" + credentials.XWEBID + \"\" +\r\n \"\" + credentials.XWEBTERMINALID + \"\" +\r\n \"\" + credentials.XWEBAUTHKEY + \"\" +\r\n \"QUERYPAYMENT \" + orderId + \"\" +\r\n \"TEXT\" +\r\n \" \"\r\n };\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n return this.http.post(\r\n `${this.baseURL}/Payment/GetCNPResponseURL`, tempobj, options)\r\n .pipe(\r\n map(res => {\r\n return res;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getRCMServiceStatus(sessionId, orderId, isCancelRequest): Observable {\r\n let url = '';\r\n if (isCancelRequest) {\r\n url = 'https://localsystem.paygateway.com:21113/RcmService.svc/Update?updateParameters=%2FCancelTransaction%20%2FSessionId%3A' + `${sessionId}`;\r\n } else {\r\n url = 'https://localsystem.paygateway.com:21113/RcmService.svc/status?SessionId=' + `${orderId}`;\r\n }\r\n\r\n return this.http.get(\r\n `${url}`)\r\n .pipe(\r\n map(res => {\r\n const responseRCM = res as any;\r\n return responseRCM;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n GetTransactionVerifoneOGPayment(TransId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/AccountReceipt/GetTransactionVerifoneOGPayment?transId=${TransId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n private handleError(error: HttpErrorResponse) {\r\n console.error('server error:', error);\r\n if (error.error instanceof Error) {\r\n const errMessage = error.error.message;\r\n // this.appinsights.logEvent(errMessage);\r\n return throwError(errMessage);\r\n }\r\n return throwError(error || 'Node.js server error');\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpErrorResponse, HttpParams } from '@angular/common/http';\r\nimport { Observable, of, throwError } from 'rxjs';\r\nimport { map, catchError } from 'rxjs/operators';\r\nimport { environment } from 'src/environments/environment';\r\nimport { AuthService } from './auth.service';\r\nimport { MarketInfoService } from './MarketInfoService.service';\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\n\r\nexport class RentalService {\r\n private baseURL: string;\r\n constructor(private http: HttpClient, private marketInfoService: MarketInfoService\r\n ) {\r\n this.baseURL = environment.apiBaseUrl;\r\n }\r\n\r\n public options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n\r\n\r\n SaveDailyRental(rentalData): Observable {\r\n var marketId = null;\r\n this.marketInfoService.getMarketId().subscribe(marketId1 => {\r\n marketId = marketId1;\r\n });\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/SaveDailyRentalTransactions?marketId=${marketId}`\r\n return this.http.post(url, rentalData, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n SaveCombinedMonthlyRentalTransactions(rentalData): Observable {\r\n var marketId = null;\r\n this.marketInfoService.getMarketId().subscribe(marketId1 => {\r\n marketId = marketId1;\r\n });\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/SaveCombinedMonthlyRentalTransactions?marketId=${marketId}`\r\n return this.http.post(url, rentalData, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n SaveCombinedWeeklyRentalTransactions(rentalData): Observable {\r\n var marketId = null;\r\n this.marketInfoService.getMarketId().subscribe(marketId1 => {\r\n marketId = marketId1;\r\n });\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/SaveCombinedWeeklyRentalTransactions?marketId=${marketId}`\r\n return this.http.post(url, rentalData, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n SaveWeeklyRentalTransactions(rentalData): Observable {\r\n var marketId = null;\r\n this.marketInfoService.getMarketId().subscribe(marketId1 => {\r\n marketId = marketId1;\r\n });\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/SaveWeeklyRentalTransactions?marketId=${marketId}`\r\n return this.http.post(url, rentalData, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n checkRentalExits(marketId,rentalDateDetails): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/CheckRentalExits?marketId=${marketId}`;\r\n return this.http.post(url, rentalDateDetails, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any;\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getDailyRentals(marketId,vendorId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetDailyRentals?vendorId=${vendorId}&marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n\r\n getDailyOtherRentals(marketId,vendorId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetDailyOtherRentals?vendorId=${vendorId}&marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n saveMonthlyRental(marketId,rentalData): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/SaveMonthlyRentalTransactions?marketId=${marketId}`\r\n return this.http.post(url, rentalData, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getOtherRentalItems(marketId,rentalDate = ''): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetOtherRentalItems?marketId=${marketId}&rentalDate=${rentalDate}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getPromoCodeAppliedCountForVendor(marketId,VendorId,PromoCodeId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetPromoCodeAppliedCountForVendor?marketId=${marketId}&VendorId=${VendorId}&PromoCodeId=${PromoCodeId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getWIFIOtherItem(marketId,wIFIOtherItemId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetWIFIOtherItem?marketId=${marketId}&WIFIOtherItemId=${wIFIOtherItemId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getOtherItemsRentalCharges(otherRentalCharges): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/GetOtherItemsRentalCharges`;\r\n return this.http.post(url, otherRentalCharges, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n generateTempRecordNumber(marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GenerateTempRecordNumber?marketId=` + marketId,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n insertDataToTemp(tempData): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/InsertDataToTemp`;\r\n return this.http.post(url, tempData, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n deleteFromTemp(tempData): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/DeleteFromTemp`;\r\n return this.http.post(url, tempData, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n GetSelectedMonthEndDate(yearMonth,marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetSelectedMonthEndDate?marketId=${marketId}&yearMonth=${yearMonth}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const monthEndDate = res.body as any;\r\n return monthEndDate;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n checkAbsenteeVendorForDate(marketId, boothNumber, selectedMarketDays): Observable {\r\n const url = `${this.baseURL}/Rental/CheckAbsenteeVendorForDate?marketId=${marketId}&BoothNumber=${boothNumber}`\r\n return this.http.post(url, selectedMarketDays, this.options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any;\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getVendorBalances(vendorId, marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetVendorBalances?vendorId=${vendorId}&marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getVendorPaymentDetails(vendorId, marketId,accountReceiptId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetVendorPaymentDetails?vendorId=${vendorId}&marketId=${marketId}&accountReceiptId=${accountReceiptId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n ComposeEmails(marketId,emailData): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/ComposeEmails?marketId=${marketId}`;\r\n return this.http.post(url, emailData, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n SendWRPaymentConfirmationEMail(marketId,emailData): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Vendor/SendWRPaymentConfirmationEMail?marketId=${marketId}`;\r\n return this.http.post(url, emailData, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n SendWRBookingConfirmationEMail(marketId,emailData): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Vendor/SendWRBookingConfirmationEMail?marketId=${marketId}`;\r\n return this.http.post(url, emailData, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getRentalSettings(marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetRentalSettings?marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getCustomSettings(marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetCustomSettings?marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getRecordFromTemp(): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetRecordFromTemp`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getBoothStatus(boothStatusInput): Observable {\r\n const url = `${this.baseURL}/Rental/GetBoothStatus`;\r\n return this.http.post(url, boothStatusInput, this.options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any;\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getProductCategories(marketId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetProductCategories?marketId=` + marketId,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getVendorRentalDays(rentalDays): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/GetVendorRentalDays`;\r\n return this.http.post(url, rentalDays, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getBoothRentalCombinedMonthlyCharges(marketId,boothRentalCharges): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/getBoothRentalCombinedMonthlyCharges?marketId=${marketId}`;\r\n return this.http.post(url, boothRentalCharges, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getBoothRentalCombinedWeeklyCharges(marketId,boothRentalCharges): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/GetBoothRentalCombinedWeeklyCharges?marketId=${marketId}`;\r\n return this.http.post(url, boothRentalCharges, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getBoothRentalWeeklyCharges(marketId,boothRentalCharges): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/GetBoothRentalWeeklyCharges?marketId=${marketId}`;\r\n return this.http.post(url, boothRentalCharges, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getBoothRentalMontlyCharges(marketId,boothRentalCharges): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/GetBoothRentalMontlyCharges?marketId=${marketId}`;\r\n return this.http.post(url, boothRentalCharges, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n \r\n getBoothrentalCharges(boothRentalCharges): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/GetBoothrentalCharges`;\r\n return this.http.post(url, boothRentalCharges, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n UpdateVendorResaleInfo(vendorResaleInfo): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/UpdateVendorResaleInfo`;\r\n return this.http.post(url, vendorResaleInfo, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as boolean;\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n \r\n updateVendorBusinessLicense(marketId,vendorBusinesLicInfo): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/UpdateVendorBusinessLicense?marketId=${marketId}`;\r\n return this.http.post(url, vendorBusinesLicInfo, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as boolean;\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getCombinedMonthlyBookings(marketId,vendorId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetCombinedMonthlyBookings?vendorId=${vendorId}&marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n \r\n getCombinedMonthlyOtherRentals(marketId,vendorId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetCombinedMonthlyOtherRentals?vendorId=${vendorId}&marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getMonthlyBookings(marketId,vendorId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetMonthlyBookings?vendorId=${vendorId}&marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n\r\n getMonthlyOtherRentals(marketId,vendorId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetMonthlyOtherRentals?vendorId=${vendorId}&marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getCombinedWeeklyBookings(marketId, vendorId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetCombinedWeeklyBookings?vendorId=${vendorId}&marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getCombinedWeeklyOtherRentals(marketId, vendorId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetCombinedWeeklyOtherRentals?vendorId=${vendorId}&marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getWeeklyBookings(marketId,vendorId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetWeeklyBookings?vendorId=${vendorId}&marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getWeeklyOtherRentals(marketId,vendorId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetWeeklyOtherRentals?vendorId=${vendorId}&marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n GetVendorProductsById(marketId, Id: number): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetVendorProducts?Id=${Id}&marketId=${marketId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const result = res as any;\r\n return result;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getBookingFeeById(marketId,bookingFeeId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetBookingFeeById?marketId=${marketId}&BookingFeeId=${bookingFeeId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n getBookingRenewalFeeById(marketId,bookingRenewalFeeId): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/GetBookingRenewalFeeById?marketId=${marketId}&BookingRenewalFeeId=${bookingRenewalFeeId}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n return res.body as any;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n generatePaymentReceipt(marketId,paymentReceiptData): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/GeneratePaymentReceipt?marketId=${marketId}`;\r\n return this.http.post(url, paymentReceiptData, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n CheckMinimumUnusedCodeCount(marketId,RentalType): Observable {\r\n return this.http.get(\r\n `${this.baseURL}/Rental/CheckMinimumUnusedCodeCount?marketId=${marketId}&RentalType=${RentalType}`,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const marketdays = res.body as any;\r\n return marketdays;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n updateWIFIAccessCodeForRental(wifiData): Observable {\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/Rental/UpdateWIFIAccessCodeForRental`;\r\n return this.http.post(url, wifiData, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n private handleError(error: HttpErrorResponse) {\r\n console.error('server error:', error);\r\n if (error.error instanceof Error) {\r\n const errMessage = error.error.message;\r\n return throwError(errMessage);\r\n }\r\n return throwError(error || 'Node.js server error');\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { CurrencyPipe } from '@angular/common';\r\n\r\n\r\n@Pipe({\r\n name: 'customCurrency'\r\n})\r\n\r\nexport class customCurrencyPipe implements PipeTransform {\r\n\r\n constructor(private currencyPipe: CurrencyPipe) { }\r\n\r\n transform(value: string): string {\r\n if (parseFloat(value) < 0) {\r\n return `(${this.currencyPipe.transform(value.toString().replace('-',''))})`;\r\n }\r\n return this.currencyPipe.transform(value);\r\n }\r\n\r\n customCurrencyInput(event): boolean {\r\n const inputValue = event.target.value;\r\n const charCode = (event.which) ? event.which : event.keyCode;\r\n const currentCursorPosition = event.target.selectionStart;\r\n if (charCode == 46 && inputValue.includes('.') && inputValue.indexOf('.') !== currentCursorPosition) {\r\n return false;\r\n }\r\n if (charCode > 31 && (charCode < 46 || charCode > 57 || charCode === 47)) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http';\r\nimport { Observable, throwError } from 'rxjs';\r\nimport { map, catchError } from 'rxjs/operators';\r\nimport { environment } from 'src/environments/environment';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\n\r\nexport class SharedDataService {\r\n public paymentSharedData;\r\n public dailyRentalSelectedDays;\r\n public dailyRentalSelectedBooths=[];\r\n public rentalType;\r\n public tempRecordNo;\r\n public newVendorContactInfo;\r\n public newVendorLoginDetails;\r\n public wifiSelectedDay;\r\n}","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-success-tick',\r\n templateUrl: './success-tick.component.html',\r\n styleUrls: ['./success-tick.component.scss']\r\n})\r\nexport class SuccessTickComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-failure-cross',\r\n templateUrl: './failure-cross.component.html',\r\n styleUrls: ['./failure-cross.component.scss']\r\n})\r\nexport class FailureCrossComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, Input, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-loader',\r\n templateUrl: './loader.component.html',\r\n styleUrls: ['./loader.component.scss']\r\n})\r\nexport class LoaderComponent implements OnInit { \r\n constructor() {\r\n }\r\n\r\n ngOnInit(): void { \r\n }\r\n}\r\n","\r\n
\r\n \"Loader\"\r\n
\r\n","\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n Refund Payment is processing\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n {{payStatus}}!\r\n
\r\n
\r\n {{payStatus}}!\r\n
\r\n
\r\n
\r\n
\r\n
    \r\n
  • \r\n \r\n
    {{apiResponse.ReceiptId}}
    \r\n {{apiResponse.Id}}\r\n
  • \r\n
  • \r\n \r\n {{tillNowPaid | currency}}\r\n
  • \r\n
  • \r\n \r\n {{apiResponse.date | date: 'MM/dd/yyyy hh:mm:ss a'}}\r\n
  • \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n","import { Component, ElementRef, EventEmitter, Input, OnInit, TemplateRef, ViewChild,Output } from '@angular/core';\r\nimport { PaymentService } from 'src/app/services/paymentService.service';\r\nimport { VendorService } from 'src/app/services/Vendor.service';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { EEdgeExpressECIType, EOpenEdgeResponseCode, EPaymentModes, EEdgeExpressResultCode, EPaymentGateway, EPaymentTransactionType, EOpenEdgeSessionStates, ECreditCards } from '../enum';\r\nimport { SafeResourceUrl, DomSanitizer } from '@angular/platform-browser';\r\nimport { environment } from 'src/environments/environment';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { Router } from '@angular/router';\r\nimport { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';\r\nimport { SharedDataService } from 'src/app/Shared/SharedData.service';\r\n\r\n@Component({\r\n selector: 'app-payment',\r\n templateUrl: './payment.component.html',\r\n styleUrls: ['./payment.component.scss']\r\n})\r\nexport class PaymentComponent implements OnInit {\r\n credentials;\r\n paymentGateway;\r\n paymentStarted=false;\r\n public loaderIcon: Promise;\r\n paymentFailReason;\r\n isSaveInCCTResponse;\r\n paymentInProgress = false;\r\n isAutoPopulateBillingInfo =false;\r\n paymentTable = [];\r\n currentPayId ;\r\n hstPayBtnMsg;\r\n payModalRef: BsModalRef;\r\n transactionInitiated;\r\n tempCNPRes: any;\r\n paymentProcessing = false;\r\n vendorInfo;\r\n showIFrame = false;\r\n facilityCreditCards: string = '';\r\n selectedDeviceId = 0;\r\n cctStatusOrderId = 0;\r\n voidOnCancelInitiated = false;\r\n @Output() isCancel: EventEmitter = new EventEmitter();\r\n sessionId;\r\n showPage = true;\r\n requestParam: String;\r\n tempCNPPayId = null;\r\n tempCNPAmount = null;\r\n retryTransactionStatusLoader = false;\r\n private paymentMaxWaitTime = environment.paymentMaxWaitTime;\r\n private paymentGetCCTStatusInterval = environment.paymentGetCCTStatusInterval;\r\n urlSafe: SafeResourceUrl;\r\n achUrlSafe: SafeResourceUrl;\r\n urlSafeAlias: SafeResourceUrl;\r\n paymentSuccessFul: boolean;\r\n @Input() keyedInTransaction;\r\n @Input() TransactionType;\r\n payStatus;\r\n VendorId: any;\r\n @Input() CCAmount;\r\n @Input() isQDR;\r\n @Output() PaymentResponse = new EventEmitter();\r\n @Output() ClosePaymentPage = new EventEmitter();\r\n paymentCount;\r\n tillNowPaid;\r\n multiPaymentVoidEmv: any;\r\n openEdgeSub: any;\r\n tenderAmount = 0;\r\n changeAmount;\r\n @Input() voidPayment;\r\n @Input() ForceCreditReturn;\r\n @Input() VerifoneId;\r\n @Input() RefundAmount ;\r\n @Input() MarketId;\r\n tempRcmRes = {\r\n rcmSessionId: '',\r\n rcmResponse: ''\r\n }\r\n @ViewChild('CPNIFrame', { static: false }) iframe: ElementRef;\r\n @ViewChild('paymentSuccess', { static: true }) popUpPayment: TemplateRef;\r\n openEdgeBillingFields='';\r\n toasterConfig = {\r\n closeButton: true,\r\n timeOut: 4500,\r\n easing: 'ease-out',\r\n progressBar: true,\r\n positionClass: 'toast-top-right',\r\n tapToDismiss: true,\r\n showEasing: 'swing',\r\n hideEasing: 'linear',\r\n showMethod: 'fadeIn',\r\n hideMethod: 'slideUp'\r\n };\r\n maxLengthNameOnCard = 30;\r\n maxLengthCCBlillingAd = 50;\r\n maxLengthCCBlillingZip = 15;\r\n initiatedVoidCC = false;\r\n showLoaderMesage = false;\r\n verifoneRecordId = 0;\r\n constructor(private paymentService: PaymentService,\r\n private toastr: ToastrService,\r\n private modalService: BsModalService,\r\n private vendorService:VendorService,\r\n private router: Router,\r\n public sanitizer: DomSanitizer,\r\n private sharedDataService: SharedDataService,) {\r\n }\r\n\r\n ngOnInit() {\r\n this.paymentCount = 0;\r\n this.paymentTable = [];\r\n this.paymentCount++;\r\n const obj = {\r\n payId: this.paymentCount,\r\n payName: 'Payment ' + this.paymentCount,\r\n payAmount: this.CCAmount,\r\n payComplete: false,\r\n payNowDisable: true,\r\n payModeId: 0,\r\n orderId: null,\r\n changeAmount: 0,\r\n checkNum: 0,\r\n checkDate: '',\r\n bankName: '',\r\n ManualCardNumber: '',\r\n ManualCardExp: '',\r\n ManualCardName: '',\r\n CreditCardType: 0,\r\n ManualCardAuthorization: '',\r\n defaultmode: 0,\r\n uniqueTransId: null,\r\n payFailed: false,\r\n routingNumber: 0,\r\n accountNumber: 0,\r\n achManualCardAuthorization: '',\r\n accountType: 279,\r\n nameonAccount: ''\r\n };\r\n\r\n this.paymentTable.push(obj);\r\n \r\n this.getVendorInfo();\r\n this.getCredentials();\r\n }\r\n\r\n getVendorInfo() {\r\n this.vendorService.getVendorId().subscribe(id => {\r\n this.VendorId = id;\r\n // Handle the received vendorId\r\n });\r\n this.vendorService.GetVendorById(this.VendorId, this.MarketId).subscribe((res) => {\r\n if (res !== null) {\r\n this.vendorInfo = res.body;\r\n }\r\n })\r\n }\r\n\r\n getCredentials() {\r\n this.paymentService.getCCCredentials(this.MarketId).subscribe((res) => {\r\n if (res !== null) {\r\n \r\n this.paymentGateway = res.PaymentGateWay;\r\n this.credentials = res.GatewayDetails ? JSON.parse(res.GatewayDetails) : null;\r\n if (this.voidPayment == true) { \r\n this.voidPaymentTransaction(this.VerifoneId,this.credentials);\r\n }\r\n else {\r\n this.setOpenEdgeMandatory();\r\n this.initiatePaymentRequest();\r\n }\r\n }\r\n })\r\n }\r\n\r\n generateIntialCCT(amt, transTypeId, ptId, paymentModeId, payvoid, cardNumber, authCode, voidOrderId) {\r\n let CreditCardNumber = cardNumber ? cardNumber.substr(cardNumber.length - 4) : \"\";\r\n const CCTModel = {\r\n verifoneRecordId: this.verifoneRecordId,\r\n Amount: amt,\r\n VendorId: this.VendorId,\r\n CreditCardNumber: CreditCardNumber,\r\n CreditCardType: ECreditCards.Visa, \r\n ResponseCode: \"\",\r\n ResponseMessage: \"\", \r\n OrderId: voidOrderId ? voidOrderId : \"\",\r\n TransactionDateTime: new Date(),\r\n ProcessStatus: \"In progress\"\r\n };\r\n return Object.assign(CCTModel);\r\n }\r\n\r\n isAnyPaymentProcessed() {\r\n let status = this.paymentTable.some(function (ele) { return ele.payComplete });\r\n if (!status) {\r\n this.paymentInProgress = false;\r\n }\r\n }\r\n\r\n callRCM(amount, payId, orderId) {\r\n let tempAmount;\r\n //const TempURL = 'https://localsystem.paygateway.com:21113/RcmService.svc/Initialize?xl2Parameters=';\r\n this.paymentTable.find(o => o.payId == payId).uniqueTransId = orderId;\r\n if (!this.credentials.RCMURL) {\r\n this.toastr.warning('Please ask Administrator to configure RCM URL', 'URL required', this.toasterConfig);\r\n this.loaderIcon = Promise.resolve(false);\r\n } else {\r\n this.paymentMaxWaitTime = this.paymentMaxWaitTime != undefined && this.paymentGetCCTStatusInterval != 0 ? this.paymentMaxWaitTime : 2;\r\n this.paymentGetCCTStatusInterval = this.paymentGetCCTStatusInterval != undefined && this.paymentGetCCTStatusInterval != 0 ? this.paymentGetCCTStatusInterval : 10;\r\n let isPaymentCompleted = false; //for retry logic\r\n this.paymentInProgress = true;\r\n let emvTransactionType = this.TransactionType\r\n \r\n const requestParam = \"\" +\r\n \"\" + this.credentials.XWEBID + \"\" +\r\n \"\" + this.credentials.XWEBTERMINALID + \"\" +\r\n \"\" + this.credentials.XWEBAUTHKEY + \"\" +\r\n \"\" + emvTransactionType + \" \" + amount + \" \" + orderId + \" \" + orderId + \"True MERCHANT_COPYBTCloudFALSE\" //JSON.stringify(tempObj);\r\n const rcmRequest = this.paymentService.getRCMService(this.credentials.RCMURL, requestParam).subscribe((res: any) => {\r\n if (res) {\r\n const resultFromRCM = res;\r\n isPaymentCompleted = true;\r\n const responseData = JSON.parse(resultFromRCM.RcmResponse);\r\n // this.prePayStatus = 'Payment';\r\n if ((responseData && responseData.RESPONSE && responseData.RESPONSE.APPROVEDAMOUNT != 0 && responseData.RESPONSE.HOSTRESPONSECODE && responseData.RESPONSE.RESULT && responseData.RESPONSE.CARDBRAND && responseData.RESPONSE.ACCOUNT\r\n && responseData.RESPONSE.EXPMONTH && responseData.RESPONSE.EXPYEAR && responseData.RESPONSE.TRANSACTIONID && responseData.RESPONSE.HOSTRESPONSEDESCRIPTION) || (responseData.RESPONSE.RESULT == EEdgeExpressResultCode.Canceled || responseData.RESPONSE.RESULT == EEdgeExpressResultCode.Declined || responseData.RESPONSE.RESULT == EEdgeExpressResultCode.Fail)) {\r\n let cTypeId = responseData.RESPONSE && responseData.RESPONSE.CARDBRAND ? this.paymentService.openEdgeCardType(responseData.RESPONSE.CARDBRAND) : ECreditCards.Visa;\r\n if (responseData && responseData.RESPONSE && responseData.RESPONSE.RESULT == EEdgeExpressResultCode.Success) {//Success\r\n this.payStatus = 'Success';\r\n this.paymentTable.find(o => o.payId == payId).payFailed = false;\r\n // this.disableNextButton();\r\n this.paymentSuccessFul = true;\r\n tempAmount = amount;\r\n responseData.RESPONSE['OrderId'] = responseData.RESPONSE && responseData.RESPONSE.ORDERID ? responseData.RESPONSE.ORDERID : orderId;\r\n this.paymentTable.find(o => o.payId == payId)['processedCC'] = responseData.RESPONSE;\r\n let CCTModel;\r\n const receiptText = responseData.RESPONSE.RECEIPTTEXT;\r\n const entryMethodMatch = receiptText.match(/Entry Method\\s+([^\\n]+)/);\r\n const entryLegendMatch = receiptText.match(/Entry Legend\\s+([^\\n]+)/);\r\n const ACMatch = receiptText.match(/AC\\s+([^\\n]+)/);\r\n const ATCMatch = receiptText.match(/ATC\\s+([^\\n]+)/);\r\n const AIDMatch = receiptText.match(/AID\\s+([^\\n]+)/);\r\n const AIDNAMEMatch = receiptText.match(/AID NAME\\s+([^\\n]+)/);\r\n const TVRMatch = receiptText.match(/TVR\\s+([^\\n]+)/);\r\n const TSIMatch = receiptText.match(/TSI\\s+([^\\n]+)/);\r\n const RespCDMatch = receiptText.match(/Resp CD\\s+([^\\n]+)/);\r\n const TRNREFNoMatch = receiptText.match(/TRN REF #\\s+([^\\n]+)/);\r\n const VALCODEMatch = receiptText.match(/VAL CODE\\s+([^\\n]+)/);\r\n \r\n const tempCCModel = {\r\n VerifoneId: this.verifoneRecordId,\r\n Amount: parseFloat(amount),\r\n CreditCardNumber: responseData.RESPONSE.ACCOUNT,\r\n CardType: responseData.RESPONSE.CARDTYPE,\r\n ResponseCode: responseData.RESPONSE.HOSTRESPONSECODE,\r\n ResponseMessage: responseData.RESPONSE.HOSTRESPONSEDESCRIPTION,\r\n Card: this.TransactionType == \"CREDITSALE\" ? \"Credit Card\" : \"Debit Card\",\r\n TransactionDateTime: new Date(),\r\n TransactionTypeId: \"\",\r\n OrderId: responseData.RESPONSE.ORDERID,\r\n VendorId: this.VendorId,\r\n ProcessStatus: \"Completed\",\r\n ApprovalCode: responseData.RESPONSE.APPROVALCODE,\r\n PaymentTransactionTypeId: responseData.RESPONSE.TRANSACTIONID,\r\n PaymentTransactionType: \"Payment Purchase\",\r\n CreditCardType: responseData.RESPONSE.CARDBRAND,\r\n ReceiptResponse: responseData.RESPONSE.RECEIPTTEXT,\r\n EntryLegend: entryLegendMatch ? entryLegendMatch[1].trim() : '',\r\n EntryMethod: entryMethodMatch ? entryMethodMatch[1].trim() : '',\r\n AC: ACMatch ? ACMatch[1].trim() : '',\r\n ATC: ATCMatch ? ATCMatch[1].trim() : '',\r\n AID: AIDMatch ? AIDMatch[1].trim() : '',\r\n AIDNAME: AIDNAMEMatch ? AIDNAMEMatch[1].trim() : '',\r\n TVR: TVRMatch ? TVRMatch[1].trim() : '',\r\n TSI: TSIMatch ? TSIMatch[1].trim() : '',\r\n RespCD: RespCDMatch ? RespCDMatch[1].trim() : '',\r\n TRNREFNo: TRNREFNoMatch ? TRNREFNoMatch[1].trim() : '',\r\n VALCODE: VALCODEMatch ? VALCODEMatch[1].trim() : ''\r\n };\r\n\r\n CCTModel = Object.assign(tempCCModel);\r\n this.paymentService.saveVerifoneUnSaved(CCTModel).subscribe((res: any) => {\r\n });\r\n this.loaderIcon = Promise.resolve(false);\r\n this.gotoPaymentSuccess(this.popUpPayment, tempAmount);\r\n } else if (responseData && responseData.RESPONSE && responseData.RESPONSE.RESULT == EEdgeExpressResultCode.Canceled || responseData.RESPONSE.RESULT == EEdgeExpressResultCode.Fail) { //Cancel\r\n this.payStatus = 'Cancelled';\r\n this.paymentTable.find(o => o.payId == payId).payFailed = true;\r\n this.isAnyPaymentProcessed();\r\n this.paymentSuccessFul = false;\r\n this.paymentProcessing = false;\r\n this.paymentFailReason = responseData.RESPONSE.RESULTMSG;\r\n tempAmount = 0;\r\n let CCTModel;\r\n const tempCCModel = {\r\n Amount: parseFloat(amount), \r\n CreditCardNumber: responseData.RESPONSE && responseData.RESPONSE.ACCOUNT ? responseData.RESPONSE.ACCOUNT : \"0\", \r\n ResponseCode: responseData.RESPONSE && responseData.RESPONSE.HOSTRESPONSECODE ? responseData.RESPONSE.HOSTRESPONSECODE : responseData.RESPONSE.RESULT,\r\n ResponseMessage: responseData.RESPONSE && responseData.RESPONSE.HOSTRESPONSEDESCRIPTION ? responseData.RESPONSE.HOSTRESPONSEDESCRIPTION : responseData.RESPONSE.RESULTMSG,\r\n TransactionDateTime: new Date(),\r\n OrderId: this.paymentTable.find(o => o.payId == this.currentPayId).uniqueTransId,\r\n VendorId: this.VendorId,\r\n VerifoneId: this.verifoneRecordId,\r\n ProcessStatus: \"Failed\",\r\n Card: this.TransactionType == \"CREDITSALE\" ? \"Credit Card\" : \"Debit Card\",\r\n };\r\n\r\n CCTModel = Object.assign(tempCCModel);\r\n this.paymentService.saveVerifoneUnSaved(CCTModel).subscribe((res: any) => {\r\n }); \r\n this.gotoPaymentSuccess(this.popUpPayment, tempAmount);\r\n this.loaderIcon = Promise.resolve(false);\r\n } else {\r\n this.isAnyPaymentProcessed();\r\n this.payStatus = 'Failed';\r\n this.paymentTable.find(o => o.payId == payId).payFailed = true;\r\n tempAmount = 0;\r\n this.paymentSuccessFul = false;\r\n this.paymentFailReason = responseData.RESPONSE && responseData.RESPONSE.RESULTMSG ? responseData.RESPONSE.RESULTMSG : 'Declined!';\r\n this.paymentProcessing = false;\r\n const CCTModel = {\r\n Amount: parseFloat(amount), \r\n CreditCardNumber: responseData.RESPONSE && responseData.RESPONSE.ACCOUNT ? responseData.RESPONSE.ACCOUNT : \"0\", \r\n ResponseCode: responseData.RESPONSE && responseData.RESPONSE.HOSTRESPONSECODE ? responseData.RESPONSE.HOSTRESPONSECODE : responseData.RESPONSE.RESULT,\r\n ResponseMessage: responseData.RESPONSE && responseData.RESPONSE.HOSTRESPONSEDESCRIPTION ? responseData.RESPONSE.HOSTRESPONSEDESCRIPTION : responseData.RESPONSE.RESULTMSG,\r\n TransactionDateTime: new Date(),\r\n OrderId: this.paymentTable.find(o => o.payId == this.currentPayId).uniqueTransId,\r\n VendorId: this.VendorId,\r\n VerifoneId: this.verifoneRecordId,\r\n ProcessStatus: \"Failed\",\r\n Card: this.TransactionType == \"CREDITSALE\" ? \"Credit Card\" : \"Debit Card\",\r\n };\r\n this.paymentService.saveVerifoneUnSaved(Object.assign(CCTModel)).subscribe((res: any) => { });\r\n this.loaderIcon = Promise.resolve(false);\r\n this.gotoPaymentSuccess(this.popUpPayment, tempAmount);\r\n }\r\n } else {\r\n rcmRequest.unsubscribe();\r\n tempAmount = 0;\r\n this.paymentSuccessFul = false;\r\n this.gotoPaymentSuccess(this.popUpPayment, tempAmount);\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }\r\n }, err => {\r\n isPaymentCompleted = true;\r\n this.paymentTable.find(o => o.payId == payId).payFailed = true;\r\n this.loaderIcon = Promise.resolve(false);\r\n this.toastr.warning('Please connect the device ', 'Device Required', this.toasterConfig);\r\n this.payStatus = 'Failed';\r\n this.paymentFailReason = 'Device Not Connected!'\r\n this.isAnyPaymentProcessed();\r\n this.paymentSuccessFul = false;\r\n this.paymentProcessing = false;\r\n const CCTModel = {\r\n Amount: parseFloat(amount),\r\n CreditCardNumber: 0,\r\n CreditCardType: ECreditCards.Visa,\r\n ResponseCode: '0',\r\n ResponseMessage: \"Device not Connected!\",\r\n PaymentTransactionTypeId: 1,\r\n TransactionDateTime: new Date(),\r\n TransactionTypeId: EPaymentTransactionType.Declined,\r\n OrderId: this.paymentTable.find(o => o.payId == this.currentPayId).orderId,\r\n VendorId:this.VendorId\r\n };\r\n this.paymentService.saveVerifoneUnSaved(Object.assign(CCTModel)).subscribe((res: any) => {\r\n });\r\n this.gotoPaymentSuccess(this.popUpPayment, tempAmount);\r\n });\r\n setTimeout(() => {\r\n if (!isPaymentCompleted) {\r\n this.cctStatusOrderId = 0;\r\n rcmRequest.unsubscribe();\r\n this.openEdgeTransactionStatus(orderId, payId, 'Sale');\r\n }\r\n }, 10000 * 6 * this.paymentMaxWaitTime);\r\n }\r\n }\r\n\r\n openEdgeTransactionStatus(OrderId, payId, transactionType) { //calling from Original Request\r\n // this.paymentService.GetCreditCardTransactionById(OrderId).subscribe((cctResponse: any) => {\r\n // let res = JSON.parse(cctResponse);\r\n // if (res.Reason == \"Attempting to Process\") {\r\n // this.initiatingOpenEdgeQueryPaymentRequest(OrderId, transactionType, 1, payId, true)\r\n // } else {\r\n // this.paymentFailReason = \"Please Contact Administrator to check in Gateway Portal if Payment is Approved. If Yes, key in the Payment as Manual Authorization\";\r\n // this.saveCCTransactionFailureCase(this.tempRcmRes.rcmResponse, this.paymentFailReason, transactionType, 1, OrderId);\r\n // }\r\n // }, err => {\r\n // this.loaderIcon = Promise.resolve(false);\r\n // });\r\n }\r\n\r\n initiatingOpenEdgeQueryPaymentRequest(orderId, transactionType, paymentTrnsId, payId, callRetryLogic) {\r\n if (this.credentials) {\r\n this.paymentService.getCNPResponse(this.credentials, orderId).subscribe((res: any) => {\r\n const jsonResp = JSON.parse(res);\r\n // this.showLoaderMesage = false;\r\n this.tempRcmRes.rcmResponse = jsonResp;\r\n let amount;\r\n if (this.cctStatusOrderId == 0) {//To avoid Duplicate Save APi call\r\n if (jsonResp.RESULT && jsonResp.RESULT.RESPONSECODE == EOpenEdgeResponseCode.Approval && jsonResp.RESULT.STATE != 'IN_PROGRESS') {\r\n this.cctStatusOrderId = jsonResp.RESULT.ORDERID;\r\n if (this.openEdgeSub) {\r\n this.openEdgeSub.unsubscribe();\r\n this.openEdgeSub = null;\r\n }\r\n // this.retryTransactionStatusLoader = false;\r\n if (transactionType == 'Void') {\r\n const CCModel = {\r\n Amount: jsonResp.RESULT.APPROVEDAMOUNT,\r\n CreditCardNumber: jsonResp.RESULT.MASKEDCARDNUMBER == undefined ? 0 : jsonResp.RESULT.MASKEDCARDNUMBER,\r\n CreditCardType: jsonResp.RESULT && jsonResp.RESULT.CARDBRAND ? this.paymentService.openEdgeCardType(jsonResp.RESULT.CARDBRAND) : ECreditCards.Visa,\r\n ResponseCode: jsonResp.RESULT.RESPONSECODE,\r\n ResponseMessage: jsonResp.RESULT.RESPONSEDESCRIPTION, \r\n PaymentTransactionTypeId: paymentTrnsId,\r\n OrderId: orderId,\r\n TransactionDateTime: new Date(),\r\n TransactionTypeId: EPaymentTransactionType.Reversal_Refund, //Reversal\r\n VendorId : this.VendorId,\r\n };\r\n this.paymentService.saveVerifoneUnSaved(Object.assign(CCModel)).subscribe((res: any) => { });\r\n //this.retryTransactionStatusLoader = false;\r\n // this.multiPaymentVoidEmv.find(t => t.orderId === (this.paymentTable.find(o => o.payId == this.currentPayId).orderId)).isEmvVoidInitiated = true;\r\n // if (this.multiPaymentVoidEmv.some(function (ele) { return (ele.isEmvVoidInitiated == false); })) {\r\n // this.callOpenEdgeVoid(paymentTrnsId);\r\n // } else {\r\n if (!this.voidOnCancelInitiated) {\r\n this.isCancel.emit(true);\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n //}\r\n } else {\r\n this.payStatus = 'Success';\r\n this.paymentSuccessFul = true;\r\n this.paymentTable.find(o => o.payId == payId).payFailed = false;\r\n amount = parseFloat(jsonResp.RESULT.APPROVEDAMOUNT).toFixed(2);\r\n jsonResp.RESULT['OrderId'] = jsonResp.RESULT && jsonResp.RESULT.ORDERID ? jsonResp.RESULT.ORDERID : orderId;\r\n jsonResp.RESULT['CARDHOLDERNAME'] = jsonResp.RESULT.CARDBRAND;\r\n jsonResp.RESULT['ACCOUNT'] = jsonResp.RESULT.MASKEDCARDNUMBER;\r\n jsonResp.RESULT['HOSTRESPONSECODE'] = jsonResp.RESULT.RESPONSECODE;\r\n jsonResp.RESULT['HOSTRESPONSEDESCRIPTION'] = jsonResp.RESULT.ORIGINALRESPONSEDESCRIPTION;\r\n this.paymentTable.find(o => o.payId == payId)['processedCC'] = jsonResp.RESULT;\r\n this.loaderIcon = Promise.resolve(false);\r\n this.gotoPaymentSuccess(this.popUpPayment, amount);\r\n }\r\n this.getRCMStatus(orderId, true);\r\n } else if (jsonResp.RESULT && jsonResp.RESULT.STATE != 'IN_PROGRESS' && (jsonResp.RESULT.RESPONSECODE != EOpenEdgeResponseCode.TransactionDoesNotExist && jsonResp.RESULT.RESPONSEDESCRIPTION != 'Invalid Reference Error: Transaction does not exist')) {\r\n // this.retryTransactionStatusLoader = false;\r\n let reason = ((jsonResp.RESULT.RESPONSECODE != EOpenEdgeResponseCode.TransactionDoesNotExist && jsonResp.RESULT.RESPONSEDESCRIPTION != 'Invalid Reference Error: Transaction does not exist') || jsonResp.RESULT.ORDERID == orderId) ? jsonResp.RESULT.RESPONSEDESCRIPTION : \"Transaction Cancelled\";\r\n if (this.openEdgeSub) {\r\n this.openEdgeSub.unsubscribe();\r\n this.openEdgeSub = null;\r\n }\r\n this.paymentFailReason = reason;\r\n this.saveCCTransactionFailureCase(jsonResp, reason, transactionType, paymentTrnsId, orderId);\r\n this.getRCMStatus(orderId, false);\r\n this.loaderIcon = Promise.resolve(false);\r\n } else if (callRetryLogic) {\r\n // this.paymentService.GetCreditCardTransactionById(orderId).subscribe((cctResponse: any) => {\r\n // let res = JSON.parse(cctResponse);\r\n // if (!this.openEdgeSub && res.Reason == \"Attempting to Process\") {\r\n // this.cctStatusOrderId = 0;\r\n // this.retryTransactionStatusLoader = true;\r\n // let interval = this.paymentGetCCTStatusInterval * 1000;\r\n // const source = Observable.interval(interval);\r\n // this.openEdgeSub = source.subscribe(val => this.getOpenEdgeTransactionStatus(orderId, payId, val, transactionType, paymentTrnsId));\r\n // } else {\r\n // this.paymentTable.find(o => o.payId == payId).payFailed = true;\r\n // this.paymentFailReason = \"Please Contact Administrator to check in Gateway Portal if Payment is Approved. If Yes, key in the Payment as Manual Authorization\";\r\n // this.saveCCTransactionFailureCase(jsonResp, this.paymentFailReason, transactionType, paymentTrnsId, orderId);\r\n // }\r\n // });\r\n } else {\r\n this.paymentService.getRCMServiceStatus(null, orderId, false).subscribe((sessionRes: any) => {\r\n if (sessionRes) {\r\n this.tempRcmRes.rcmSessionId = sessionRes.SessionId;\r\n if (sessionRes.SessionState == EOpenEdgeSessionStates.Completed && jsonResp.RESULT && jsonResp.RESULT.RESPONSECODE == EOpenEdgeResponseCode.TransactionDoesNotExist && jsonResp.RESULT.RESPONSEDESCRIPTION == 'Invalid Reference Error: Transaction does not exist') {\r\n //this.retryTransactionStatusLoader = false;\r\n if (this.openEdgeSub) {\r\n this.openEdgeSub.unsubscribe();\r\n this.openEdgeSub = null;\r\n }\r\n this.paymentFailReason = \"Declined!\";\r\n jsonResp.RESULT.RESPONSEDESCRIPTION = jsonResp.RESULT.RESPONSEDESCRIPTION + \" : RCM Session Completed!\";\r\n this.paymentTable.find(o => o.payId == payId).payFailed = true;\r\n this.saveCCTransactionFailureCase(jsonResp, this.paymentFailReason, transactionType, paymentTrnsId, orderId);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n }, err => {\r\n this.paymentTable.find(o => o.payId === payId).payFailed = true;\r\n // this.prePayStatus = 'Payment';\r\n this.payStatus = 'Failed!';\r\n this.paymentFailReason = \"Payment Status not received. Please Contact Administrator to check in Gateway Portal if Payment is Approved. If Yes, key in the Payment as Manual Authorization\";\r\n this.loaderIcon = Promise.resolve(false);\r\n if (this.openEdgeSub) {\r\n this.openEdgeSub.unsubscribe();\r\n this.openEdgeSub = null;\r\n }\r\n this.saveCCTransactionFailureCase(null, this.paymentFailReason, transactionType, paymentTrnsId, orderId);\r\n });\r\n } else {\r\n this.toastr.warning('Please ask Administrator to configure RCM URL', 'URL required', this.toasterConfig);\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }\r\n\r\n saveCCTransactionFailureCase(jsonResp, paymentFailReason, transactionType, paymentTrnsId, orderId) {\r\n this.paymentSuccessFul = false;\r\n this.paymentProcessing = false;\r\n this.payStatus = 'Failed';\r\n this.isAnyPaymentProcessed();\r\n this.paymentFailReason = paymentFailReason ? paymentFailReason : jsonResp.RESULT.STATE;\r\n const CCModel = {\r\n Amount: this.CCAmount,\r\n CreditCardNumber: jsonResp && jsonResp.RESULT && jsonResp.RESULT.MASKEDCARDNUMBER ? jsonResp.RESULT.MASKEDCARDNUMBER : '0',\r\n CreditCardType: jsonResp && jsonResp.RESULT && jsonResp.RESULT.CARDBRAND ? this.paymentService.openEdgeCardType(jsonResp.RESULT.CARDBRAND) : ECreditCards.Visa,\r\n ResponseCode: jsonResp && jsonResp.RESULT && jsonResp.RESULT.RESPONSECODE ? jsonResp.RESULT.RESPONSECODE : '0',\r\n ResponseMessage: (jsonResp.RESULT && jsonResp.RESULT && jsonResp.RESULT.STATE == 'IN_PROGRESS') ? jsonResp.RESULT.STATE : (jsonResp && jsonResp.RESULT && jsonResp.RESULT.RESPONSEDESCRIPTION) ? jsonResp.RESULT.RESPONSEDESCRIPTION : this.paymentFailReason,\r\n PaymentTransactionTypeId: paymentTrnsId,\r\n OrderId: orderId,\r\n TransactionDateTime: new Date(),\r\n TransactionTypeId: EPaymentTransactionType.Declined,\r\n VendorId: this.VendorId\r\n };\r\n this.paymentService.saveVerifoneUnSaved(Object.assign(CCModel)).subscribe((res: any) => { });\r\n if (transactionType == 'Void') {\r\n this.multiPaymentVoidEmv.find(t => t.orderId === (this.paymentTable.find(o => o.payId == this.currentPayId).orderId)).isEmvVoidInitiated = true;\r\n if (this.multiPaymentVoidEmv.some(function (ele) { return (ele.isEmvVoidInitiated == false); })) {\r\n this.callOpenEdgeVoid(paymentTrnsId);\r\n } else {\r\n if (!this.voidOnCancelInitiated) {\r\n this.isCancel.emit(true);\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n this.toastr.error(`Failed to Reverse the Payment! - $${this.CCAmount}`, 'Failure', this.toasterConfig);\r\n } else {\r\n this.toastr.error('Payment Failed', 'Failure');\r\n this.gotoPaymentSuccess(this.popUpPayment, 0);\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }\r\n\r\n callOpenEdgeVoid(paymentTrnsId) {\r\n var initiatingVoid = this.multiPaymentVoidEmv.find(t => t.isEmvVoidInitiated == false);\r\n if (initiatingVoid) {\r\n let CCTModel = this.generateIntialCCT(initiatingVoid['processedCC'].APPROVEDAMOUNT, EPaymentTransactionType.Reversal_Refund, paymentTrnsId, initiatingVoid.payModeId, null, null, null, null);\r\n this.paymentService.saveVerifoneUnSaved(CCTModel).subscribe((res: any) => {\r\n if (res.Success) {\r\n let orderId = res.Id;\r\n // this.showLoaderMesage = true;\r\n let isVoidCompleted = false;\r\n const requestParam = \" \" + \"\" + this.credentials.XWEBID + \"\" +\r\n \"\" + this.credentials.XWEBTERMINALID + \"\" +\r\n \"\" + this.credentials.XWEBAUTHKEY + \"\" +\r\n \"DEBITRETURN\" + initiatingVoid['processedCC'].APPROVEDAMOUNT + \"\" + orderId + \"\" + orderId + \"\";\r\n this.initiatedVoidCC = true;\r\n const rcmRequest = this.paymentService.getRCMService(this.credentials.RCMURL, requestParam).subscribe((res: any) => {\r\n if (res) {\r\n isVoidCompleted = true;\r\n const resultFromRCM = res;\r\n this.multiPaymentVoidEmv.find(t => t.orderId === initiatingVoid.orderId).isEmvVoidInitiated = true;\r\n const responseData = JSON.parse(resultFromRCM.RcmResponse);\r\n let cTypeId = responseData && responseData.RESPONSE && responseData.RESPONSE.CARDBRAND ? this.paymentService.openEdgeCardType(responseData.RESPONSE.CARDBRAND) : ECreditCards.Visa;\r\n if (responseData.RESPONSE.RESULT == 0) { //Success\r\n let CCTModel;\r\n const tempCCModel = {\r\n Amount: responseData.RESPONSE.APPROVEDAMOUNT,\r\n CreditCardNumber: responseData.RESPONSE.ACCOUNT == undefined ? 0 : responseData.RESPONSE.ACCOUNT,\r\n CreditCardType: cTypeId,\r\n ResponseCode: responseData.RESPONSE.HOSTRESPONSECODE,\r\n ResponseMessage: responseData.RESPONSE.HOSTRESPONSEDESCRIPTION,\r\n PaymentTransactionTypeId: paymentTrnsId,\r\n OrderId: orderId,\r\n TransactionDateTime: new Date(),\r\n TransactionTypeId: EPaymentTransactionType.Reversal_Refund,\r\n VendorId: this.VendorId\r\n };\r\n\r\n this.toastr.success(`Refund Processed Successfully - $${responseData.RESPONSE.APPROVEDAMOUNT}`, 'Success', this.toasterConfig);\r\n CCTModel = Object.assign(tempCCModel);\r\n this.paymentService.saveVerifoneUnSaved(CCTModel).subscribe((res: any) => {\r\n });\r\n } else {\r\n let CCTModel;\r\n const tempCCModel = {\r\n Amount: responseData.RESPONSE && responseData.RESPONSE.APPROVEDAMOUNT ? responseData.RESPONSE.APPROVEDAMOUNT : initiatingVoid['processedCC'].APPROVEDAMOUNT,\r\n CreditCardNumber: responseData.RESPONSE.ACCOUNT == undefined ? '0' : responseData.RESPONSE.ACCOUNT,\r\n CreditCardType: cTypeId,\r\n ResponseCode: responseData.RESPONSE.RESULT,\r\n ResponseMessage: responseData.RESPONSE.RESULTMSG ? responseData.RESPONSE.RESULTMSG : 'Declined',\r\n PaymentTransactionTypeId: paymentTrnsId,\r\n OrderId: orderId,\r\n TransactionDateTime: new Date(),\r\n TransactionTypeId: EPaymentTransactionType.Declined,\r\n VendorId: this.VendorId\r\n };\r\n CCTModel = Object.assign(tempCCModel);\r\n this.paymentService.saveVerifoneUnSaved(CCTModel).subscribe((res: any) => { });\r\n this.toastr.error(`Failed to Reverse the Payment - $${initiatingVoid['processedCC'].APPROVEDAMOUNT}`, 'Failure', this.toasterConfig);\r\n }\r\n if (this.multiPaymentVoidEmv.some(function (ele) { return (ele.isEmvVoidInitiated == false); })) {\r\n this.callOpenEdgeVoid(paymentTrnsId);\r\n } else {\r\n this.loaderIcon = Promise.resolve(false);\r\n this.showLoaderMesage = false;\r\n if (!this.voidOnCancelInitiated) {\r\n this.isCancel.emit(true);\r\n }\r\n }\r\n }\r\n }, err => {\r\n if (this.multiPaymentVoidEmv.some(function (ele) { return (ele.isEmvVoidInitiated == false); })) {\r\n this.callOpenEdgeVoid(paymentTrnsId);\r\n } else {\r\n if (!this.voidOnCancelInitiated) {\r\n this.isCancel.emit(true);\r\n this.toastr.error(`Failed to Reverse the Payment - $${initiatingVoid['processedCC'].APPROVEDAMOUNT}`, 'Failure', this.toasterConfig);\r\n this.multiPaymentVoidEmv.find(t => t.orderId === initiatingVoid.orderId).isEmvVoidInitiated = true;\r\n this.showLoaderMesage = false;\r\n this.loaderIcon = Promise.resolve(false);\r\n this.initiatedVoidCC = false;\r\n }\r\n }\r\n });\r\n setTimeout(() => {\r\n if (!isVoidCompleted) {\r\n rcmRequest.unsubscribe();\r\n this.openEdgeTransactionStatus(orderId, 0, 'Void');\r\n }\r\n }, 10000 * 6 * this.paymentMaxWaitTime);\r\n }\r\n });\r\n }\r\n }\r\n\r\n voidPaymentTransaction(verifoneRecordId, credentials) {\r\n \r\n this.paymentService.GetVerifoneUnSavedDate(verifoneRecordId).subscribe((res: any) => {\r\n let CCTModel = this.generateIntialCCT(this.CCAmount, 1, 1, 1, null, null, null,res.OrderId);\r\n this.paymentService.saveVerifoneUnSaved(CCTModel).subscribe((cctRes) => {\r\n if (cctRes.Success) {\r\n let cctId = cctRes.Id;\r\n \r\n this.verifoneRecordId = cctRes.Id;\r\n const paymentAmount = this.RefundAmount > 0 ? this.RefundAmount : res.Amount;\r\n const orderId = res.OrderId;\r\n const DebitOrderId = cctRes.OrderId;\r\n const OpenEdgeTransType = res.TransactionTypeId;\r\n if (!credentials.RCMURL) {\r\n this.toastr.warning('Please ask Administrator to configure RCM URL', 'URL required', this.toasterConfig);\r\n this.showLoaderMesage = false;\r\n this.loaderIcon = Promise.resolve(false);\r\n } else {\r\n let TransactionCardType = res.Card;\r\n var paymentTransactionTypeId = res.PaymentTransactionTypeId;\r\n var paymentReturnType = \"CREDITVOID\";\r\n \r\n if (TransactionCardType == 'Credit Card') {\r\n this.paymentService.GetPaymentStatus(this.credentials, paymentTransactionTypeId, orderId).subscribe((response: any) => {\r\n if (response) {\r\n var paymentStatusJsonResp = JSON.parse(response)\r\n var paymentStatus = paymentStatusJsonResp.RESULT.STATE;\r\n if(this.RefundAmount > 0 ){\r\n paymentStatus = \"CLOSED\";\r\n }\r\n if (paymentStatus == \"CLOSED\")\r\n paymentReturnType = \"CREDITRETURN\";\r\n else if (paymentStatus == \"APPROVED\" || response == \"CAPTURED\" || response == \"IN_PROGRESS\")\r\n paymentReturnType = \"CREDITVOID\";\r\n // ElseIf g_strResponseCode <> \"1\" Then\r\n // setupParameters = CreatePostString(\"CREDIT\", orderId, CStr(tdbTotalAmount.Value))\r\n // End If\r\n \r\n if(this.ForceCreditReturn == true){\r\n paymentReturnType = \"CREDITRETURN\";\r\n }\r\n \r\n this.paymentService.GetCNPCreditVoid(this.credentials, paymentTransactionTypeId, paymentAmount, paymentReturnType).subscribe((res: any) => {\r\n if (res) {\r\n const jsonResp = JSON.parse(res);\r\n let cTypeId = jsonResp.RESPONSE && jsonResp.RESPONSE.CARDBRAND ? this.paymentService.openEdgeCardType(jsonResp.RESPONSE.CARDBRAND) : ECreditCards.Visa;\r\n if (jsonResp.RESULT.RESPONSECODE == EOpenEdgeResponseCode.Approval) {\r\n const receiptText = jsonResp.RESULT.RECEIPTTEXT;\r\n const transType = receiptText.match(/Trans Type\\s+([^\\n]+)/);\r\n\r\n const entryMethodMatch = receiptText.match(/Entry Method\\s+([^\\n]+)/);\r\n const entryLegendMatch = receiptText.match(/Entry Legend\\s+([^\\n]+)/);\r\n const ACMatch = receiptText.match(/AC\\s+([^\\n]+)/);\r\n const ATCMatch = receiptText.match(/ATC\\s+([^\\n]+)/);\r\n const AIDMatch = receiptText.match(/AID\\s+([^\\n]+)/);\r\n const AIDNAMEMatch = receiptText.match(/AID NAME\\s+([^\\n]+)/);\r\n const TVRMatch = receiptText.match(/TVR\\s+([^\\n]+)/);\r\n const TSIMatch = receiptText.match(/TSI\\s+([^\\n]+)/);\r\n const RespCDMatch = receiptText.match(/Resp CD\\s+([^\\n]+)/);\r\n const TRNREFNoMatch = receiptText.match(/TRN REF #\\s+([^\\n]+)/);\r\n const VALCODEMatch = receiptText.match(/VAL CODE\\s+([^\\n]+)/);\r\n \r\n const tempCCModel = {\r\n VerifoneId: this.verifoneRecordId,\r\n Amount: jsonResp.RESULT.APPROVEDAMOUNT,\r\n VendorId: this.VendorId,\r\n ProcessStatus: \"Completed\",\r\n CreditCardNumber: jsonResp.RESULT.MASKEDCARDNUMBER,\r\n ResponseCode: jsonResp.RESULT.RESPONSECODE,\r\n ResponseMessage: jsonResp.RESULT.RESPONSEDESCRIPTION,\r\n \r\n OrderId: orderId,\r\n TransactionDateTime: new Date(),\r\n TransactionTypeId: OpenEdgeTransType != '' ? OpenEdgeTransType : 'Credit' ,\r\n ReceiptResponse: jsonResp.RESULT.RECEIPTTEXT ? jsonResp.RESULT.RECEIPTTEXT : null,\r\n Card: TransactionCardType,\r\n CreditCardType : jsonResp.RESULT.CARDBRAND,\r\n EntryLegend: entryLegendMatch ? entryLegendMatch[1].trim() : '',\r\n EntryMethod: entryMethodMatch ? entryMethodMatch[1].trim() : '',\r\n AC: ACMatch ? ACMatch[1].trim() : '',\r\n ATC: ATCMatch ? ATCMatch[1].trim() : '',\r\n AID: AIDMatch ? AIDMatch[1].trim() : '',\r\n AIDNAME: AIDNAMEMatch ? AIDNAMEMatch[1].trim() : '',\r\n TVR: TVRMatch ? TVRMatch[1].trim() : '',\r\n TSI: TSIMatch ? TSIMatch[1].trim() : '',\r\n RespCD: RespCDMatch ? RespCDMatch[1].trim() : '',\r\n TRNREFNo: TRNREFNoMatch ? TRNREFNoMatch[1].trim() : '',\r\n VALCODE: VALCODEMatch ? VALCODEMatch[1].trim() : '',\r\n PaymentTransactionTypeId: jsonResp.RESULT.TRANSACTIONID,\r\n PaymentTransactionType: transType != \"\" && transType != null ? transType[1].trim().toString() : 'VOID',\r\n };\r\n const CCTModel = Object.assign(tempCCModel);\r\n this.paymentService.saveVerifoneUnSaved(CCTModel).subscribe((res: any) => {\r\n if(!res.Success){\r\n this.toastr.warning('Verifone table failed', 'Info', this.toasterConfig);\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n });\r\n this.initiatedVoidCC = false;\r\n this.loaderIcon = Promise.resolve(false);\r\n } else {\r\n const cCModel = {\r\n VerifoneId: this.verifoneRecordId,\r\n Amount: jsonResp.RESULT.APPROVEDAMOUNT ? jsonResp.RESULT.APPROVEDAMOUNT : paymentAmount,\r\n CreditCardNumber: jsonResp.RESULT && jsonResp.RESULT.MASKEDCARDNUMBER ? jsonResp.RESULT.MASKEDCARDNUMBER : 'XXXX',\r\n ResponseCode: jsonResp.RESULT.RESPONSECODE ? jsonResp.RESULT.RESPONSECODE : null,\r\n ResponseMessage: jsonResp.RESULT.RESPONSEDESCRIPTION ? jsonResp.RESULT.RESPONSEDESCRIPTION : 'Declined',\r\n Card: 'Credit Card',\r\n CreditCardType : jsonResp.RESULT.CARDBRAND,\r\n OfflinePayment: 0,\r\n PaymentTransactionTypeId: jsonResp.RESULT.TRANSACTIONID,\r\n OrderId: orderId,\r\n TransactionDateTime: new Date(),\r\n TransactionTypeId: \"\",\r\n VendorId: this.VendorId,\r\n ProcessStatus: \"Failed\",\r\n ReceiptResponse: jsonResp.RESULT.RECEIPTTEXT ? jsonResp.RESULT.RECEIPTTEXT : null,\r\n\r\n \r\n };\r\n this.paymentService.saveVerifoneUnSaved(Object.assign(cCModel)).subscribe((res: any) => { });\r\n if (!this.voidOnCancelInitiated) {\r\n this.isCancel.emit(true);\r\n }\r\n this.showLoaderMesage = false;\r\n this.loaderIcon = Promise.resolve(false);\r\n this.initiatedVoidCC = false;\r\n }\r\n // if (!this.multiPaymentVoidEmv.some(function (ele) { return (ele.isEmvVoidInitiated == false); })) {\r\n // this.showLoaderMesage = false;\r\n // if (!this.voidOnCancelInitiated) {\r\n // this.isCancel.emit(true);\r\n // }\r\n // this.initiatedVoidCC = false;\r\n // this.loaderIcon = Promise.resolve(false);\r\n // }\r\n var obj = {\r\n VerifoneId: this.verifoneRecordId,\r\n PaymentSuccess: jsonResp.RESULT.RESPONSECODE == EOpenEdgeResponseCode.Approval ? true : false,\r\n OrderId:orderId\r\n }\r\n this.toastr.info(\"Credit card payment reversed successfully\", 'Info', this.toasterConfig);\r\n this.PaymentResponse.emit(obj);\r\n }\r\n });\r\n }\r\n });\r\n } else {// Debit return\r\n this.showLoaderMesage = true;\r\n let requestParam = \" \" + \"\" + this.credentials.XWEBID + \"\" +\r\n \"\" + this.credentials.XWEBTERMINALID + \"\" +\r\n \"\" + this.credentials.XWEBAUTHKEY + \"\" +\r\n \"DEBITRETURN\" + paymentAmount + \"\" + DebitOrderId + \"\" + DebitOrderId + \"\";\r\n this.initiatedVoidCC = true;\r\n const debitVoidRequest = this.paymentService.getRCMService(this.credentials.RCMURL, requestParam).subscribe((res: any) => {\r\n \r\n const resultFromRCM = res;\r\n const responseData = JSON.parse(resultFromRCM.RcmResponse);\r\n const TransType = responseData.RESPONSE.RECEIPTTEXT.match(/Trans Type\\s+([^\\n]+)/);\r\n let cTypeId = responseData.RESPONSE && responseData.RESPONSE.CARDBRAND ? this.paymentService.openEdgeCardType(responseData.RESPONSE.CARDBRAND) : ECreditCards.Visa;\r\n if (responseData.RESPONSE.RESULT == 0) { //Success\r\n if (!this.voidOnCancelInitiated) {\r\n this.isCancel.emit(true);\r\n }\r\n this.showLoaderMesage = false;\r\n this.loaderIcon = Promise.resolve(false);\r\n let CCTModel;\r\n \r\n const tempCCModel = {\r\n VerifoneId: this.verifoneRecordId,\r\n VendorId: this.VendorId,\r\n ProcessStatus: \"Completed\",\r\n Amount: responseData.RESPONSE.APPROVEDAMOUNT,\r\n CreditCardNumber: responseData.RESPONSE.ACCOUNT == undefined ? 0 : responseData.RESPONSE.ACCOUNT,\r\n ResponseCode: responseData.RESPONSE.HOSTRESPONSECODE,\r\n ResponseMessage: responseData.RESPONSE.HOSTRESPONSEDESCRIPTION,\r\n Card: TransactionCardType,\r\n CreditCardType : responseData.RESPONSE.CARDBRAND,\r\n PaymentTransactionTypeId:responseData.RESPONSE.TRANSACTIONID,\r\n PaymentTransactionType: TransType != \"\" && TransType != null ? TransType[1].trim().toString() : 'Debit Void',\r\n OrderId: responseData.RESPONSE.ORDERID,\r\n TransactionDateTime: new Date(),\r\n TransactionTypeId: OpenEdgeTransType != '' ? OpenEdgeTransType : 'Return' ,\r\n ReceiptResponse: responseData.RESPONSE.RECEIPTTEXT ? responseData.RESPONSE.RECEIPTTEXT : null\r\n };\r\n CCTModel = Object.assign(tempCCModel);\r\n \r\n this.paymentService.saveVerifoneUnSaved(CCTModel).subscribe((res: any) => {\r\n if(!res.Success){\r\n this.toastr.warning('Verifone table failed', 'Info', this.toasterConfig);\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n });\r\n this.initiatedVoidCC = false;\r\n\r\n var obj = {\r\n VerifoneId: this.verifoneRecordId,\r\n PaymentSuccess: responseData.RESPONSE.HOSTRESPONSECODE == EOpenEdgeResponseCode.Approval ? true : false,\r\n OrderId:responseData.RESPONSE.ORDERID\r\n }\r\n this.toastr.warning(responseData.RESPONSE.HOSTRESPONSEDESCRIPTION, 'Info', this.toasterConfig);\r\n this.PaymentResponse.emit(obj);\r\n this.loaderIcon = Promise.resolve(false);\r\n } else {\r\n let CCTModel;\r\n const tempCCModel = {\r\n VerifoneId: this.verifoneRecordId,\r\n Amount: responseData.RESPONSE.APPROVEDAMOUNT ? responseData.RESPONSE.APPROVEDAMOUNT : paymentAmount,\r\n CreditCardNumber: responseData.RESPONSE.ACCOUNT == undefined ? '0' : responseData.RESPONSE.ACCOUNT,\r\n ResponseCode: responseData.RESPONSE.RESULT,\r\n ResponseMessage: responseData.RESPONSE.RESULTMSG ? responseData.RESPONSE.RESULTMSG : 'Declined',\r\n CreditCardType: responseData.RESPONSE.CARDBRAND,\r\n PaymentTransactionTypeId: responseData.RESPONSE.TRANSACTIONID,\r\n OrderId: orderId,\r\n VendorId: this.VendorId,\r\n ProcessStatus: \"Failed\",\r\n TransactionDateTime: new Date(),\r\n TransactionTypeId: EPaymentTransactionType.Declined,\r\n ReceiptResponse: responseData.RESPONSE.RECEIPTTEXT ? responseData.RESPONSE.RECEIPTTEXT : null\r\n };\r\n CCTModel = Object.assign(tempCCModel);\r\n this.paymentService.saveVerifoneUnSaved(CCTModel).subscribe((res: any) => { });\r\n if (!this.voidOnCancelInitiated) {\r\n this.isCancel.emit(true);\r\n }\r\n this.toastr.error('Failed to Reverse the Payment!', 'Failure', this.toasterConfig);\r\n this.showLoaderMesage = false;\r\n this.loaderIcon = Promise.resolve(false);\r\n this.initiatedVoidCC = false;\r\n\r\n var obj = {\r\n VerifoneId: this.verifoneRecordId,\r\n PaymentSuccess: responseData.RESPONSE.HOSTRESPONSECODE == EOpenEdgeResponseCode.Approval ? true : false,\r\n OrderId:responseData.RESPONSE.ORDERID\r\n }\r\n this.toastr.warning(responseData.RESPONSE.HOSTRESPONSEDESCRIPTION, 'Info', this.toasterConfig);\r\n this.PaymentResponse.emit(obj);\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n this.showLoaderMesage = false;\r\n }, err => {\r\n if (!this.multiPaymentVoidEmv.some(function (ele) { return (ele.isEmvVoidInitiated == false); })) {\r\n this.showLoaderMesage = false;\r\n if (!this.voidOnCancelInitiated) {\r\n this.isCancel.emit(true);\r\n }\r\n this.initiatedVoidCC = false;\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n });\r\n });\r\n }\r\n\r\n getRCMStatus(orderId, transactinSuccess) {\r\n this.paymentService.getRCMServiceStatus(null, orderId, false).subscribe((sessionRes: any) => {\r\n if (sessionRes) {\r\n if (sessionRes.SessionState == EOpenEdgeSessionStates.PromptingForCardRemoval) {\r\n this.toastr.warning('Please Remove Your Card From EMV Device', 'Alert', this.toasterConfig);\r\n }\r\n this.cancelRcmRequest(sessionRes.SessionId, transactinSuccess);\r\n }\r\n });\r\n }\r\n\r\n cancelRcmRequest(sessionId, isTransactionSuccess) {\r\n this.paymentService.getRCMServiceStatus(sessionId, 0, true).subscribe((respose: any) => {\r\n if (!respose.IsSuccessful && !isTransactionSuccess) {\r\n this.toastr.warning('Please click on Cancel Button in the EMV Device, if it is not in Home Screen. Ignore if already in Home Screen', 'Alert', this.toasterConfig);\r\n }\r\n });\r\n }\r\n\r\n getExpiryMonthValue(expiryMonth) {\r\n let tempMonth = 263;\r\n if (expiryMonth) {\r\n if (expiryMonth > 0 && expiryMonth < 13) {\r\n expiryMonth = tempMonth + expiryMonth;\r\n } else if (expiryMonth > 263 && expiryMonth < 276) {\r\n expiryMonth = expiryMonth;\r\n } else {\r\n expiryMonth = 264;\r\n }\r\n } else {\r\n expiryMonth = 264;\r\n }\r\n return expiryMonth;\r\n }\r\n\r\n saveInVerifoneUnsaved(amount, payId) {\r\n this.paymentFailReason = '';\r\n let CCTModel = this.generateIntialCCT(this.CCAmount, 1, 1, 1, null, null, null, null);\r\n this.paymentService.saveVerifoneUnSaved(CCTModel).subscribe((cctRes) => {\r\n if (cctRes.Success) {\r\n let cctId = cctRes.Id;\r\n this.verifoneRecordId = cctRes.Id;\r\n this.paymentTable.find(o => o.payId == payId).orderId = cctRes.OrderId;\r\n this.isSaveInCCTResponse = true;\r\n if (!this.keyedInTransaction) { \r\n this.callRCM(amount, payId, cctRes.OrderId); // Transaction type(SALE) is decided by user when RCM device popsup a option to choose\r\n \r\n } else if (this.keyedInTransaction) {\r\n this.tempCNPAmount = amount;\r\n this.tempCNPPayId = payId;\r\n this.callCNP(amount, 'CREDITSALE', payId); // CNP is always CREDITSALE, Debit card is N/A\r\n }\r\n } else {\r\n this.loaderIcon = Promise.resolve(false);\r\n this.paymentStarted = false;\r\n this.toastr.error(\"We couldn't create CCT, Please try again!\", 'Failure', this.toasterConfig);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n this.paymentStarted = false;\r\n this.toastr.error(' Something went wrong!', 'Failure', this.toasterConfig);\r\n });\r\n }\r\n\r\n initiatePaymentRequest() {\r\n this.paymentStarted = true;\r\n const amount = this.CCAmount;\r\n const payId = 1;\r\n this.currentPayId = payId;\r\n this.saveInVerifoneUnsaved(amount, payId);\r\n this.loaderIcon = Promise.resolve(true);\r\n }\r\n\r\n getHiddenInput() {\r\n this.hstPayBtnMsg = 'Cancel';\r\n let iframeSrc = this.iframe.nativeElement.src.split('/');\r\n let tempId = iframeSrc.pop();\r\n if (!this.credentials.QueryPaymentStatusURL) {\r\n this.toastr.warning('Please ask Administrator to configure CNP URL', 'URL required', this.toasterConfig);\r\n } else {\r\n this.paymentInProgress = true;\r\n if (this.sessionId === tempId) {\r\n // this.showLoaderMesage = true;\r\n this.loaderIcon = Promise.resolve(true);\r\n this.hstPayBtnMsg = 'OK';\r\n this.sessionId = tempId;\r\n //let paymentTrnsId = this.paymentService.GetPaymentTransactionTypeId(this.processPayment.Type);\r\n const hostedpageRequest = this.paymentService.getCNPResponse(this.credentials, this.paymentTable.find(o => o.payId == this.currentPayId).uniqueTransId).subscribe((res: any) => {\r\n const jsonResp = JSON.parse(res);\r\n if (jsonResp) {\r\n this.showIFrame = false;\r\n this.showPage = !this.showIFrame;\r\n // this.prePayStatus = 'Payment';\r\n if (jsonResp.RESULT.RESPONSECODE == EOpenEdgeResponseCode.Approval) {\r\n this.loaderIcon = Promise.resolve(false);\r\n this.paymentSuccessFul = true;\r\n this.payStatus = 'Success';\r\n //this.paymentTable.find(o => o.payId == this.tempCNPPayId).payFailed = false;\r\n // this.disableNextButton();\r\n let amount = parseFloat(jsonResp.RESULT.APPROVEDAMOUNT).toFixed(2);\r\n this.paymentTable.find(o => o.payId == this.currentPayId)['processedCNPCC'] = jsonResp.RESULT;\r\n let CCTModel;\r\n const receiptText = jsonResp.RESULT.RECEIPTTEXT;\r\n const entryMethodMatch = receiptText.match(/Entry Method\\s+([^\\n]+)/);\r\n const tempCCModel = {\r\n VerifoneId: this.verifoneRecordId,\r\n Amount: parseFloat(amount),\r\n CreditCardNumber: jsonResp.RESULT.MASKEDCARDNUMBER,\r\n ResponseCode: jsonResp.RESULT.ORIGINALRESPONSECODE,\r\n ResponseMessage: jsonResp.RESULT.ORIGINALRESPONSEDESCRIPTION,\r\n Card: this.keyedInTransaction ? \"Credit Card\": \"\",\r\n // PaymentTransactionTypeId: 1,\r\n TransactionDateTime: new Date(),\r\n TransactionTypeId: jsonResp.RESULT.ORIGINALTRANSACTIONTYPE,\r\n OrderId: jsonResp.RESULT.ORDERID,\r\n VendorId: this.VendorId,\r\n ProcessStatus: \"Completed\",\r\n ApprovalCode: jsonResp.RESULT.APPROVALCODE,\r\n PaymentTransactionTypeId:jsonResp.RESULT.TRANSACTIONID,\r\n PaymentTransactionType: \"Payment Purchase\",\r\n CreditCardType: jsonResp.RESULT.CARDBRAND,\r\n EntryLegend:\"CNP\",\r\n EntryMethod: entryMethodMatch ? entryMethodMatch[1].trim() : '',\r\n ReceiptResponse: jsonResp.RESULT.RECEIPTTEXT\r\n };\r\n\r\n CCTModel = Object.assign(tempCCModel);\r\n this.paymentService.saveVerifoneUnSaved(CCTModel).subscribe((res: any) => {\r\n });\r\n this.gotoPaymentSuccess(this.popUpPayment, amount);\r\n } else if (jsonResp.RESULT.STATE == 'IN_PROGRESS' || (jsonResp.RESULT && jsonResp.RESULT.RESPONSECODE == EOpenEdgeResponseCode.TransactionDoesNotExist && jsonResp.RESULT.RESPONSEDESCRIPTION == 'Invalid Reference Error: Transaction does not exist')) {\r\n if (hostedpageRequest != null) {\r\n hostedpageRequest.unsubscribe();\r\n }\r\n this.paymentSuccessFul = false;\r\n this.payStatus = 'Failed';\r\n // this.gotoCNPRetryLogic(this.paymentTable.find(o => o.payId == this.currentPayId).uniqueTransId, this.paymentTable.find(o => o.payId == this.currentPayId).orderId, 'Sale', paymentTrnsId);\r\n } else {\r\n this.paymentSuccessFul = false;\r\n this.paymentProcessing = false;\r\n this.payStatus = 'Failed';\r\n this.paymentTable.find(o => o.payId == this.currentPayId).payFailed = true;\r\n jsonResp['PaymentModeId'] = EPaymentModes.HostedPage;\r\n //this.saveCCTransactionFailureCase(jsonResp, jsonResp.RESULT && jsonResp.RESULT.RESPONSEDESCRIPTION ? jsonResp.RESULT.RESPONSEDESCRIPTION : 'Declined!', 'Sale', paymentTrnsId, this.paymentTable.find(o => o.payId == this.currentPayId).orderId);\r\n if (jsonResp.RESULT && jsonResp.RESULT.RESPONSECODE && jsonResp.RESULT.RESPONSECODE == EOpenEdgeResponseCode.ImproperFieldData) {\r\n if (jsonResp.RESULT.RESPONSEDESCRIPTION) {\r\n jsonResp.RESULT.RESPONSEDESCRIPTION = jsonResp.RESULT.RESPONSEDESCRIPTION + '. ' + 'Customer Name should be less than 50 characters!'\r\n this.toastr.warning(jsonResp.RESULT.RESPONSEDESCRIPTION, 'Warning', this.toasterConfig);\r\n }\r\n }\r\n let CCTModel;\r\n const tempCCModel = {\r\n VerifoneId: this.verifoneRecordId,\r\n CreditCardNumber: jsonResp.RESULT.MASKEDCARDNUMBER,\r\n CardType: jsonResp.RESULT.CARDTYPE,\r\n ResponseCode: jsonResp.RESULT.ORIGINALRESPONSECODE,\r\n ResponseMessage: jsonResp.RESULT.ORIGINALRESPONSEDESCRIPTION,\r\n Card: this.keyedInTransaction ? \"Credit Card\": \"\",\r\n TransactionDateTime: new Date(),\r\n OrderId: jsonResp.RESULT.ORDERID,\r\n VendorId: this.VendorId,\r\n ProcessStatus: \"Failed\",\r\n PaymentTransactionTypeId:jsonResp.RESULT.TRANSACTIONID,\r\n CreditCardType: jsonResp.RESULT.CARDTYPE\r\n };\r\n this.paymentFailReason = jsonResp.RESULT.ORIGINALRESPONSEDESCRIPTION;\r\n\r\n CCTModel = Object.assign(tempCCModel);\r\n this.paymentService.saveVerifoneUnSaved(CCTModel).subscribe((res: any) => {\r\n });\r\n this.gotoPaymentSuccess(this.popUpPayment, 0);\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n this.tempCNPRes = {\r\n PaymentModeId: EPaymentModes.HostedPage\r\n }\r\n this.paymentFailReason = 'Declined!';\r\n this.showIFrame = false;\r\n this.showPage = !this.showIFrame;\r\n this.payStatus = 'Failed';\r\n this.paymentStarted = false;\r\n this.paymentTable.find(o => o.payId == this.currentPayId).payFailed = true;\r\n this.toastr.error('Payment Failed', 'Failure');\r\n this.gotoPaymentSuccess(this.popUpPayment, 0);\r\n let CCTModel;\r\n const tempCCModel = {\r\n VerifoneId: this.verifoneRecordId,\r\n Card: this.keyedInTransaction ? \"Credit Card\": \"\",\r\n TransactionDateTime: new Date(),\r\n OrderId: this.paymentTable.find(o => o.payId == this.currentPayId).uniqueTransId,\r\n VendorId: this.VendorId,\r\n ProcessStatus: \"Failed\"\r\n };\r\n CCTModel = Object.assign(tempCCModel);\r\n this.paymentService.saveVerifoneUnSaved(CCTModel).subscribe((res: any) => {\r\n });\r\n });\r\n } else {\r\n this.sessionId = tempId;\r\n }\r\n }\r\n }\r\n\r\n gotoPaymentSuccess(template: TemplateRef, amount) {\r\n this.paymentStarted = true;\r\n this.tillNowPaid += parseFloat(amount);\r\n if (this.paymentSuccessFul) {\r\n this.paymentTable.find(o => o.payId === this.currentPayId).payComplete = true;\r\n }\r\n ///////////////////////////////////////////////////////////\r\n // if (!this.paymentSuccessFul) {\r\n this.payModalRef = this.modalService.show(template, { class: 'modal-dialog-centered', backdrop: 'static', keyboard: false });\r\n\r\n if (this.paymentSuccessFul) {\r\n var obj = {\r\n VerifoneId: this.verifoneRecordId,\r\n PaymentSuccess: this.paymentSuccessFul,\r\n OrderId: this.paymentTable.find(o => o.payId == this.currentPayId).uniqueTransId\r\n }\r\n this.PaymentResponse.emit(obj);\r\n }\r\n else{\r\n var objFailure = {\r\n VerifoneId: this.verifoneRecordId,\r\n PaymentSuccess: this.paymentSuccessFul,\r\n OrderId: this.paymentTable.find(o => o.payId == this.currentPayId).uniqueTransId\r\n }\r\n this.PaymentResponse.emit(objFailure);\r\n }\r\n }\r\n\r\n afterpaymentSuccess(){\r\n this.payModalRef.hide();\r\n // if(this.isQDR){\r\n // this.sharedDataService.paymentSharedData = {};\r\n // const url = 'ops/qdr';\r\n // this.router.navigate([url]);\r\n // }else{\r\n // // const url = 'ops/vendors/details/' + this.VendorId + '/3';\r\n // // this.router.navigate([url]);\r\n // }\r\n }\r\n\r\n // gotoCNPRetryLogic(uniqTransId, orderId, transactionType, paymentTrnsId) {\r\n // this.paymentService.GetCreditCardTransactionById(orderId).subscribe((cctResponse: any) => {\r\n // let res = JSON.parse(cctResponse);\r\n // if (res.Reason == \"Attempting to Process\") {\r\n // const source = Observable.interval(this.paymentGetCCTStatusInterval * 1000);\r\n // this.subOpenEdgeHostedpage = source.subscribe(val => this.cnpTransactionStatus(uniqTransId, val, orderId, transactionType, paymentTrnsId));\r\n // } else {\r\n // this.paymentSuccessFul = false;\r\n // this.paymentProcessing = false;\r\n // this.retryTransactionStatusLoader = false;\r\n // this.payStatus = 'Failed';\r\n // this.isAnyPaymentProcessed();\r\n // this.paymentFailReason = 'Payment Status not received. Please Contact Administrator to check in Gateway Portal if Payment is Approved. If Yes, key in the Payment as Manual Authorization';\r\n // this.gotoPaymentSuccess(this.popUpPayment, 0);\r\n // this.loaderIcon = Promise.resolve(false);\r\n // }\r\n // }, err => {\r\n // this.paymentTable.find(o => o.payId == this.currentPayId).payFailed = true;\r\n // this.loaderIcon = Promise.resolve(false);\r\n // this.tempCNPRes['PaymentModeId'] = EPaymentModes.HostedPage;\r\n // this.saveCCTransactionFailureCase(this.tempCNPRes, 'Declined!', transactionType, paymentTrnsId, orderId);\r\n // });\r\n // }\r\n\r\n callTransactionComplete() {\r\n // this.showLoaderMesage = true;\r\n this.loaderIcon = Promise.resolve(true);\r\n this.transactionInitiated = true;\r\n }\r\n\r\n callCNP(amount, transType, payId) {\r\n \r\n if (!this.credentials.CardNotPresentURL) {\r\n this.paymentStarted = false;\r\n this.toastr.warning('Please ask Administrator to configure CNP URL', 'URL required', this.toasterConfig);\r\n this.loaderIcon = Promise.resolve(false);\r\n } else {\r\n let rqsturl = 'https://ee.test.paygateway.com/HostPayService/v1/hostpay/transactions/';\r\n if (this.isAutoPopulateBillingInfo && this.vendorInfo) {\r\n this.setCNPvendorInfo(amount, transType, payId);\r\n } else {\r\n const tempOrderId = this.paymentTable.find(o => o.payId == payId).orderId;\r\n this.paymentTable.find(o => o.payId == payId).uniqueTransId = tempOrderId;\r\n this.requestParam =\r\n \"\" +\r\n \"\" + this.credentials.XWEBID + \"\" +\r\n \"\" + this.credentials.XWEBTERMINALID + \"\" +\r\n \"\" + this.credentials.XWEBAUTHKEY + \"\" +\r\n \"\" + transType + \"\" +\r\n \"\" + amount + \"\" +\r\n \"\" +\r\n \"\" + tempOrderId + \"\" +\r\n \"\" + EEdgeExpressECIType.Moto + \"\" +\r\n \"\" +\r\n \"\" + this.facilityCreditCards + \"\" +\r\n \"FALSE\" +\r\n \"TEXT\" +\r\n \"\" +\r\n \" \" +\r\n this.openEdgeBillingFields +\r\n \"\" +\r\n \"\" +\r\n \"\" +\r\n \" LATO,SANS-SERIF;\" +\r\n \"14px\" +\r\n \"\" +\r\n \"\" +\r\n \"#3757C5;\" +\r\n \"14PX;\" +\r\n \"\" +\r\n \"\" +\r\n \"18px\" +\r\n \"#3757C5;\" +\r\n \"\" +\r\n \"\" +\r\n \"\" +\r\n \"\" +\r\n \"KEYED\" +\r\n \"\" +\r\n \"\" +\r\n \" TRUE \" +\r\n \"\";\r\n }\r\n this.paymentService.getCNPService(this.credentials.CardNotPresentURL, this.requestParam).subscribe((res: any) => {\r\n this.loaderIcon = Promise.resolve(false);\r\n const resultResponse = JSON.parse(res);\r\n this.urlSafe = this.sanitizer.bypassSecurityTrustResourceUrl(resultResponse.RESULT.PAYPAGEURL);\r\n this.showIFrame = true;\r\n this.showPage = !this.showIFrame;\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.paymentStarted = false;\r\n this.toastr.warning('Please ask Administrator to configure CNP URL', 'URL required', this.toasterConfig);\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n );\r\n }\r\n }\r\n\r\n getOpenEdgeTransactionStatus(orderId, payId, count, transactionType, paymentTrnsId) {\r\n count = count + 1; //count start from 0\r\n let maxTime = (this.paymentMaxWaitTime * 60) / this.paymentGetCCTStatusInterval;\r\n if (count > maxTime) {\r\n this.cancelRcmRequest(this.tempRcmRes.rcmSessionId, false);\r\n this.retryTransactionStatusLoader = false;\r\n this.paymentFailReason = \"Payment Status not received. Please Contact Administrator to check in Gateway Portal if Payment is Approved. If Yes, key in the Payment as Manual Authorization\";\r\n if (this.openEdgeSub) {\r\n this.openEdgeSub.unsubscribe();\r\n this.openEdgeSub = null;\r\n }\r\n this.paymentTable.find(o => o.payId === payId).payFailed = true;\r\n this.saveCCTransactionFailureCase(this.tempRcmRes.rcmResponse, this.paymentFailReason, transactionType, paymentTrnsId, orderId);\r\n } else {\r\n this.initiatingOpenEdgeQueryPaymentRequest(orderId, transactionType, paymentTrnsId, payId, false)\r\n }\r\n }\r\n\r\n setOpenEdgeMandatory() {\r\n this.openEdgeBillingFields = '';\r\n var mandatoryField = '';\r\n mandatoryField = ` FALSE `;\r\n mandatoryField += ` FALSE `;\r\n mandatoryField += ` FALSE `;\r\n mandatoryField += ` FALSEFALSE`;\r\n mandatoryField += ` TRUE `;\r\n mandatoryField += ` FALSE `;\r\n mandatoryField += ` FALSE `;\r\n mandatoryField += ` FALSE `;\r\n mandatoryField += ` FALSE `;\r\n mandatoryField += ` FALSE `;\r\n mandatoryField += ` FALSE FALSE`;\r\n\r\n this.openEdgeBillingFields = mandatoryField;\r\n }\r\n \r\n setCNPvendorInfo(amount, transType, payId) {\r\n this.vendorInfo.Address = this.vendorInfo.Address && this.vendorInfo.Address.length > 50 ?\r\n this.vendorInfo.Address.substring(0, 50) : this.vendorInfo.Address;\r\n let firstName = this.paymentService.replaceXMLEntity(this.vendorInfo.FirstName);\r\n let middleName = this.paymentService.replaceXMLEntity(this.vendorInfo.MiddleName);\r\n let lastName = this.paymentService.replaceXMLEntity(this.vendorInfo.LastName);\r\n let address = this.paymentService.replaceXMLEntity(this.vendorInfo.Address);\r\n let companyName = this.paymentService.replaceXMLEntity(this.vendorInfo.CompanyName);\r\n let city = this.paymentService.replaceXMLEntity(this.vendorInfo.City);\r\n\r\n const tempOrderId = this.paymentTable.find(o => o.payId == payId).orderId;\r\n this.paymentTable.find(o => o.payId == payId).uniqueTransId = tempOrderId;\r\n this.requestParam = \"\" +\r\n \"\" + this.credentials.XWEBID + \"\" +\r\n \"\" + this.credentials.XWEBTERMINALID + \"\" +\r\n \"\" + this.credentials.XWEBAUTHKEY + \"\" +\r\n \"\" + transType + \"\" +\r\n \"\" + amount + \"\" +\r\n \"\" + firstName + \"\" +\r\n \"\" + middleName + \"\" +\r\n \"\" + lastName + \"\" +\r\n \"\" + address + \"\" +\r\n \"\" + companyName + \"\" +\r\n \"\" + city + \"\" +\r\n \"\" + this.vendorInfo.CountryCode + \"\" +\r\n \"\" + this.vendorInfo.StateCode??\"\" + \"\" +\r\n \"\" + this.vendorInfo.PostalCode?? \"\" + \"\" +\r\n \"\" +\r\n \"\" + tempOrderId + \"\" +\r\n \"\" + EEdgeExpressECIType.Moto + \"\" +\r\n \"\" +\r\n \"\" + this.facilityCreditCards + \"\" +\r\n \"FALSE\" +\r\n \"\" +\r\n \" \" +\r\n this.openEdgeBillingFields +\r\n \"\" +\r\n \"\" +\r\n \"\" +\r\n \" LATO,SANS-SERIF;\" +\r\n \"14px\" +\r\n \"\" +\r\n \"\" +\r\n \"#3757C5;\" +\r\n \"14PX;\" +\r\n \"\" +\r\n \"\" +\r\n \"18px\" +\r\n \"#3757C5;\" +\r\n \"\" +\r\n \"\" +\r\n \"\" +\r\n \"\" +\r\n \"KEYED\" +\r\n \"\" +\r\n \"\" +\r\n \"\";\r\n } \r\n\r\n onhstPayBtn(val) {\r\n if (val == 'Cancel') {\r\n this.ClosePaymentPage.emit()\r\n }\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * required \r\n * max length exceeded\r\n \r\n
\r\n
\r\n \r\n \r\n * max length exceeded\r\n \r\n
\r\n
\r\n \r\n \r\n * max length exceeded\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * max length exceeded \r\n * required \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * required \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n * required \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * required \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * required \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * invalid Cell Phone Number\r\n * required \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * required \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n *\r\n required \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n *\r\n required \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * required\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n *\r\n required \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n *\r\n required\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n\r\n \r\n *\r\n required\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n *\r\n required \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n *\r\n required \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n *\r\n required\r\n *\r\n minimum length is 6 characters\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
*password is\r\n required.
\r\n
*password must be\r\n at least 6 characters long.
\r\n
*password must be\r\n at least 20 characters long.
\r\n
*password must\r\n contain at least one special\r\n character.
\r\n
*password must\r\n contain at least one uppercase letter\r\n .
\r\n
*password must\r\n contain at least one lowercase letter\r\n .
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n *confirm password is\r\n required.
\r\n \r\n \r\n \r\n *Confirm password does not match.\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n *security question is\r\n required.
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
*security answer is\r\n required.
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n","import { Component, ElementRef, Input, Renderer2, ViewChild } from '@angular/core';\r\nimport { GeneralService } from 'src/app/services/General.service';\r\nimport { IVendorGeneralSettings } from 'src/app/Shared/models/SettingsModel';\r\nimport { FormBuilder, FormControl, FormGroup, RequiredValidator, Validators } from '@angular/forms';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { ICountry, IStates, RegistrationFeeModel } from 'src/app/Shared/models/GeneralModel';\r\nimport { Subscription } from 'rxjs';\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\nimport Swal from 'sweetalert2';\r\nimport { ActivatedRoute, Params, Router } from '@angular/router';\r\nimport { VendorService } from 'src/app/services/Vendor.service';\r\nimport { registerLicense } from '@syncfusion/ej2-base';\r\nimport { IVendorInfo, IVendorProductModel, IVendorProductImageContents, IVendorProductImages, IVendorLoginInfoModel } from 'src/app/Shared/models/VendorModel';\r\nimport { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\r\nimport { customCurrencyPipe } from 'src/app/Shared/customCurrency.pipe';\r\nimport { PaymentService } from 'src/app/services/paymentService.service';\r\nimport { RentalService } from 'src/app/services/Rental.service';\r\n@Component({\r\n selector: 'app-vendor-registration',\r\n templateUrl: './vendor-registration.component.html',\r\n styleUrls: ['./vendor-registration.component.scss']\r\n})\r\nexport class VendorRegistrationComponent {\r\n showContactInfo: boolean = true;\r\n showOnlineAccess: boolean = false;\r\n showregisterpayment: boolean = false;\r\n @ViewChild('btnContact') btnContact!: ElementRef;\r\n @ViewChild('btnOnlineAccess') btnOnlineAccess!: ElementRef;\r\n @ViewChild('btnPayment') btnPayment!: ElementRef;\r\n private subscriptions: Subscription[] = [];\r\n IsQDR = false;\r\n transactionType = \"CREDITSALE\";\r\n verifoneId = \"\";\r\n countries: any;\r\n VendorForm: FormGroup;\r\n maxDate: Date;\r\n ProductPriority: FormGroup;\r\n VendorProductForm: FormGroup;\r\n OnlineAccessForm: FormGroup;\r\n countryList: ICountry[];\r\n stateList: IStates[];\r\n VendorProductsList: IVendorProductModel[] = [];\r\n VendorProductsImageList: IVendorProductImages[] = [] as IVendorProductImages[];\r\n VendorProductsImageContentList: IVendorProductImageContents[] = [] as IVendorProductImageContents[];\r\n VendorTypeList = [];\r\n public ProductDropDownfields: Object = { text: 'ProductName', value: 'ProductId' };\r\n public StateDropDownfields: Object = { text: 'StateCode', value: 'StateCode' };\r\n filterSettings: Object = { ignoreCase: true, filterType: 'Contains' };\r\n public PhoneNumberMask: String = '000-000-0000';\r\n public ZipCodeMask: String = '00000-0000';\r\n public PhoneEXTMask: String = '000';\r\n public SSNMask: String = '000-00-0000';\r\n VendorGeneralSetting: IVendorGeneralSettings = {} as IVendorGeneralSettings;\r\n response;\r\n toasterConfig = {\r\n closeButton: true,\r\n timeOut: 4500,\r\n easing: 'ease-out',\r\n progressBar: true,\r\n positionClass: 'toast-top-right',\r\n tapToDismiss: true,\r\n showEasing: 'swing',\r\n hideEasing: 'linear',\r\n showMethod: 'fadeIn',\r\n hideMethod: 'slideUp'\r\n };\r\n @Input() VId;\r\n showStateDropDown: boolean;\r\n public loaderIcon: Promise;\r\n securityQuestions: any[];\r\n marketId: any;\r\n webRentalSetting: any;\r\n productList: any[];\r\n registrationFee: RegistrationFeeModel;\r\n vendorLoginData: IVendorLoginInfoModel;\r\n validationResponse: any;\r\n DisableRegisterBtn: boolean = true;\r\n vendorinfo: IVendorInfo;\r\n paymentData: any;\r\n voidPayment = false;\r\n processPayment = false;\r\n paymentGatewayCredentials: any;\r\n processCreditCardOnline: any;\r\n vendorId: any = 0;\r\n obj: any = {};\r\n marketName = \"\";\r\n constructor(private renderer: Renderer2,\r\n private route: ActivatedRoute,\r\n private toastr: ToastrService,\r\n private formBuilder: FormBuilder,\r\n private generalService: GeneralService,\r\n private marketInfoService: MarketInfoService,\r\n private vendorService: VendorService,\r\n private paymentService: PaymentService,\r\n private rentalService: RentalService,\r\n private customCurrency: customCurrencyPipe,\r\n private router: Router) {\r\n const today = new Date();\r\n this.maxDate = today;\r\n this.VendorForm = this.formBuilder.group(\r\n {\r\n Address: ['', [Validators.maxLength(50)]],\r\n BusAddress: ['', [Validators.maxLength(50)]],\r\n BusCity: [''],\r\n BusState: [''],\r\n BusTelePhone: [''],\r\n BusZipCode: ['', [Validators.maxLength(10)]],\r\n CellPhone: ['', [Validators.minLength(10), Validators.maxLength(12)]],\r\n City: [''],\r\n CompanyName: ['', [Validators.maxLength(50)]],\r\n Country: [''],\r\n CountryCode: [0],\r\n DLExpiryDate: [null],\r\n DriverLicenseNumber: [''],\r\n ResaleNumber: [''],\r\n BusinessLicenseNumber: [''],\r\n Email: ['', [Validators.maxLength(40), Validators.pattern('^(([\\\\w+-.%]+)@([\\\\w-.]+)\\\\.([A-Za-z]{2,}))([\\\\s]?[,;]{1}[\\\\s]?([\\\\w+-.%]+)@([\\\\w-.]+)\\\\.([A-Za-z]{2,})){0,4}$')]],\r\n FirstName: ['', [Validators.required, Validators.maxLength(50)]],\r\n LastName: ['', [Validators.maxLength(50)]],\r\n MarketId: [0, [Validators.required]],\r\n MarketVendorId: [0, [Validators.required]],\r\n MiddleName: ['', [Validators.maxLength(50)]],\r\n State: [''],\r\n VendorId: [0, [Validators.required]],\r\n VendorSince: [Date],\r\n VendorType: ['', Validators.required],\r\n WorkPhone: [''],\r\n TelePhone: [''],\r\n ZipCode: [''],\r\n ProductPriority: ['', [Validators.required]],\r\n SSN: [''],\r\n TaxID: ['']\r\n });\r\n\r\n this.ProductPriority = this.formBuilder.group(\r\n {\r\n VProductId: [0, Validators.required],\r\n Priority: [false],\r\n VendorId: [0, Validators.required]\r\n }\r\n );\r\n this.VendorProductForm = this.formBuilder.group(\r\n {\r\n VProductId: [0, Validators.required],\r\n ProductId: [0, Validators.required],\r\n ProductCategoryId: [0, Validators.required],\r\n ProductCategory: ['', Validators.required],\r\n ProductName: ['', Validators.required],\r\n Priority: [false, Validators.required]\r\n }\r\n );\r\n const passwordValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\r\n const password = control.value;\r\n const minLength = 6;\r\n const hasSpecialChar = /[!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?]+/;\r\n const hasUpperCase = /[A-Z]+/;\r\n const hasLowerCase = /[a-z]+/;\r\n\r\n // Check the password against the conditions\r\n if (password.length < minLength) {\r\n return { minLength: true };\r\n }\r\n if (!hasSpecialChar.test(password)) {\r\n return { specialChar: true };\r\n }\r\n if (!hasUpperCase.test(password)) {\r\n return { upperCase: true };\r\n }\r\n if (!hasLowerCase.test(password)) {\r\n return { lowerCase: true };\r\n }\r\n\r\n return null;\r\n };\r\n\r\n this.OnlineAccessForm = this.formBuilder.group(\r\n {\r\n UserName: ['', [Validators.maxLength(16), Validators.required]],\r\n Password: ['', [Validators.required, Validators.minLength(6), Validators.maxLength(20), passwordValidator]],\r\n ConfirmPassword: ['', Validators.required],\r\n SecurityQuestion: ['', Validators.required],\r\n Answer: ['', Validators.required],\r\n RegistrationFee: [],\r\n registrationPaymentCheck: new FormControl(false),\r\n registrationRuleReadCheck: new FormControl(false),\r\n });\r\n\r\n }\r\n\r\n ngOnInit(): void {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.route.params.subscribe((params: Params) => {\r\n this.marketId = params['marketId'];\r\n this.marketInfoService.setMarketId(this.marketId);\r\n });\r\n this.getMarketDetails();\r\n this.getWebRentalSetting(this.marketId);\r\n this.getVendorGeneralSettings();\r\n this.getCountries();\r\n this.getStates();\r\n this.getSecurityQuestion();\r\n this.getallproducts(this.marketId);\r\n this.getVendorTypes();\r\n this.RegistrationFee(this.marketId);\r\n this.getCCCredentials();\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n\r\n getMarketDetails() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.marketInfoService.getMarketDetails(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.marketName = res.MarketName;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getCountries() {\r\n const sub = this.generalService.getCountries().subscribe((response: ICountry[]) => {\r\n this.countryList = response;\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n\r\n ngAfterViewInit() {\r\n this.renderer.setStyle(this.btnContact.nativeElement, 'background-color', '#DDEBFC');\r\n this.VendorForm.patchValue({\r\n CountryCode: this.countryList[0].Code\r\n });\r\n this.onCountryChange();\r\n }\r\n\r\n displayContactInfo() {\r\n this.showContactInfo = true;\r\n this.showOnlineAccess = false;\r\n this.showregisterpayment = false;\r\n this.renderer.setStyle(this.btnContact.nativeElement, 'background-color', '#DDEBFC');\r\n this.renderer.setStyle(this.btnOnlineAccess.nativeElement, 'background-color', 'white');\r\n this.renderer.setStyle(this.btnPayment.nativeElement, 'background-color', 'white');\r\n }\r\n\r\n displayOnlineAccess() {\r\n this.showContactInfo = false;\r\n this.showOnlineAccess = true;\r\n this.showregisterpayment = false;\r\n this.renderer.setStyle(this.btnOnlineAccess.nativeElement, 'background-color', '#DDEBFC');\r\n this.renderer.setStyle(this.btnContact.nativeElement, 'background-color', 'white');\r\n this.renderer.setStyle(this.btnPayment.nativeElement, 'background-color', 'white');\r\n }\r\n\r\n displayRegisterPayment() {\r\n this.showContactInfo = false;\r\n this.showOnlineAccess = false;\r\n this.showregisterpayment = true;\r\n this.renderer.setStyle(this.btnOnlineAccess.nativeElement, 'background-color', 'white');\r\n this.renderer.setStyle(this.btnContact.nativeElement, 'background-color', 'white');\r\n this.renderer.setStyle(this.btnPayment.nativeElement, 'background-color', '#DDEBFC');\r\n }\r\n\r\n onCountryChange() {\r\n this.showStateDropDown = true;\r\n if (this.VendorForm.value['CountryCode'] == 2) {\r\n this.showStateDropDown = false;\r\n }\r\n }\r\n\r\n getStates() {\r\n const sub = this.generalService.getUSStates().subscribe((response: IStates[]) => {\r\n this.stateList = response;\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getVendorGeneralSettings() {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.subscriptions.push(this.marketInfoService.getCurrentMarketVendorGeneralSettings(this.marketId).subscribe((res: any) => {\r\n \r\n if (res) {\r\n this.VendorGeneralSetting = {\r\n IsVendorIdManual : res.SpecifyVendorID,\r\n VendorAddressMandatory : res.VendAddressMandatory,\r\n AllowAbsenteeRefund : res.BoothStatusRefund,\r\n TermForLease : res.LeaseLabel,\r\n DefaultProductEnabled : res.DefaultProductSelected,\r\n Product : res.ProductId,\r\n ResaleNumberRequired : res.ResaleNumberRequired,\r\n DaysToSellWithoutResaleNo : res.DaysSellWithoutResaleNumber,\r\n BusinessLicenseNumberReq : res.BusinessLicenseNumberRequired,\r\n DaysToSellWithoutBusinessLicenseNo : res.DaysSellWithoutBusiLicNumber,\r\n AlphaNumericField1Reqd : res.AlphaNumericField1Reqd,\r\n AlphaNumericField2Reqd : res.AlphaNumericField2Reqd,\r\n AlphaNumericField1Name : res.AlphaNumericField1Name,\r\n AlphaNumericField2Name : res.AlphaNumericField2Name,\r\n NumericField1Reqd : res.NumericField1Reqd,\r\n NumericField2Reqd : res.NumericField2Reqd,\r\n NumericField1Name : res.NumericField1Name,\r\n NumericField2Name : res.NumericField2Name,\r\n VendorNameFormat : res.VendorNamingConvention,\r\n VendorNameFormatId : res.VendorNamingConventionId,\r\n BoothTerm : res.BoothTerm\r\n }\r\n if(!this.VendorGeneralSetting.IsVendorIdManual){\r\n this.VendorForm.get('MarketVendorId').disable(); \r\n }\r\n\r\n if(this.VendorGeneralSetting.VendorAddressMandatory){\r\n\r\n this.VendorForm.get('City').setValidators([Validators.required]);\r\n this.VendorForm.get('ZipCode').setValidators([Validators.required]);\r\n this.VendorForm.get('State').setValidators([Validators.required]);\r\n this.VendorForm.get('Address').setValidators([Validators.required]);\r\n\r\n this.VendorForm.get('City').updateValueAndValidity();\r\n this.VendorForm.get('ZipCode').updateValueAndValidity();\r\n this.VendorForm.get('State').updateValueAndValidity();\r\n this.VendorForm.get('Address').updateValueAndValidity();\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }));\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n\r\n getVendorTypes() {\r\n const sub = this.vendorService.GetVendorTypes(this.marketId).subscribe((response: IStates[]) => {\r\n this.VendorTypeList = response;\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getSecurityQuestion() {\r\n this.generalService.GetSecurityQuestion().subscribe((response) => {\r\n if (response) {\r\n this.securityQuestions = response.body;\r\n }\r\n }, (err) => {\r\n console.log(err);\r\n });\r\n }\r\n\r\n getWebRentalSetting(marketId: any) {\r\n this.marketInfoService.getWebRentalSetting(marketId).subscribe((response) => {\r\n this.webRentalSetting = response;\r\n if (this.webRentalSetting.MandatoryFields!=\"\"){\r\n const mandatoryFields = this.webRentalSetting.MandatoryFields.split(\",\").map(Number);\r\n console.log(\"mendatory\",mandatoryFields)\r\n if (mandatoryFields.includes(91)){\r\n this.VendorForm.get('WorkPhone').setValidators([Validators.required]);\r\n this.VendorForm.get('WorkPhone').updateValueAndValidity();\r\n }\r\n if (mandatoryFields.includes(92)) {\r\n this.VendorForm.get('DriverLicenseNumber').setValidators([Validators.required]);\r\n this.VendorForm.get('DriverLicenseNumber').updateValueAndValidity();\r\n }\r\n if (mandatoryFields.includes(94)) {\r\n this.VendorForm.get('SSN').setValidators([Validators.required]);\r\n this.VendorForm.get('SSN').updateValueAndValidity();\r\n }\r\n if (mandatoryFields.includes(95)) {\r\n this.VendorForm.get('TaxID').setValidators([Validators.required]);\r\n this.VendorForm.get('TaxID').updateValueAndValidity();\r\n }\r\n if (mandatoryFields.includes(93)) {\r\n this.VendorForm.get('DLExpiryDate').setValidators([Validators.required]);\r\n this.VendorForm.get('DLExpiryDate').updateValueAndValidity();\r\n }\r\n if (mandatoryFields.includes(96)) {\r\n this.VendorForm.get('ResaleNumber').setValidators([Validators.required]);\r\n this.VendorForm.get('ResaleNumber').updateValueAndValidity();\r\n }\r\n if (mandatoryFields.includes(97)) {\r\n this.VendorForm.get('BusinessLicenseNumber').setValidators([Validators.required]);\r\n this.VendorForm.get('BusinessLicenseNumber').updateValueAndValidity();\r\n }\r\n if (mandatoryFields.includes(98)) {\r\n this.VendorForm.get('CellPhone').setValidators([Validators.required]);\r\n this.VendorForm.get('CellPhone').updateValueAndValidity();\r\n }\r\n if (mandatoryFields.includes(99)) {\r\n this.VendorForm.get('Email').setValidators([Validators.required]);\r\n this.VendorForm.get('Email').updateValueAndValidity();\r\n }\r\n }\r\n }, (err) => {\r\n console.log(err);\r\n });\r\n }\r\n\r\n getallproducts(marketId: any) {\r\n\r\n this.subscriptions.push(this.marketInfoService.GetAllMarketProducts(marketId).subscribe((res: any) => {\r\n this.productList = [];\r\n res.map((el, i) => {\r\n const ob = {\r\n ProductId: el.ProductId,\r\n ProductName: el.ProductName,\r\n ProductCategory: el.ProductCategory,\r\n ProductCategoryId: el.ProductCategoryId,\r\n IsInActive: el.IsInActive,\r\n CompanyProductId: el.CompanyProductId,\r\n }\r\n\r\n this.productList.push(ob);\r\n\r\n });\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n }));\r\n }\r\n\r\n RegistrationFee(marketId: any) {\r\n this.marketInfoService.RegistrationFee(marketId).subscribe((res: any) => {\r\n this.registrationFee = res;\r\n this.OnlineAccessForm.patchValue(\r\n {\r\n RegistrationFee: this.registrationFee.RegistrationFee.toString() != null ? this.customCurrency.transform(String(this.registrationFee.RegistrationFee)) : this.customCurrency.transform(\"0.00\"),\r\n }\r\n );\r\n }, (err) => {\r\n console.log(err);\r\n });\r\n }\r\n\r\n ValidationVendorDetails(): void {\r\n this.loaderIcon = Promise.resolve(true);\r\n if (this.VendorForm.value['FirstName'].trim() == '') {\r\n this.toastr.error($localize`Vendor first name can't be empty`, $localize`Error`, this.toasterConfig)\r\n this.loaderIcon = Promise.resolve(false);\r\n return;\r\n }\r\n this.vendorinfo = {\r\n Address: this.VendorForm.get('Address').value,\r\n\r\n BusAddress: null,\r\n BusCity: null,\r\n BusState: null,\r\n BusTelePhone: null,\r\n BusZipCode: null,\r\n CellPhone: this.VendorForm.get('CellPhone').value,\r\n City: this.VendorForm.get('City').value,\r\n\r\n CompanyName: this.VendorForm.get('CompanyName').value,\r\n Country: this.VendorForm.get('Country').value,\r\n CountryCode: this.VendorForm.get('CountryCode').value,\r\n DLExpiryDate: this.VendorForm.get('DLExpiryDate').value,\r\n DriverLicenseNumber: this.VendorForm.get('DriverLicenseNumber').value == null ? '' : this.VendorForm.get('DriverLicenseNumber').value,\r\n Email: this.VendorForm.get('Email').value,\r\n FirstName: this.VendorForm.get('FirstName').value,\r\n\r\n LastName: this.VendorForm.get('LastName').value,\r\n MarketId: Number(this.marketId),\r\n MarketVendorId: this.VendorForm.get('MarketVendorId').value,\r\n MiddleName: this.VendorForm.get('MiddleName').value,\r\n\r\n State: this.VendorForm.get('State').value,\r\n TelephoneEXT: null,\r\n VendorId: this.VendorForm.get('VendorId').value,\r\n VendorSince: new Date(),\r\n VendorType: this.VendorForm.get('VendorType').value,\r\n TelePhone: this.VendorForm.get('TelePhone').value,\r\n WorkPhone: this.VendorForm.get('WorkPhone').value,\r\n ZipCode: this.VendorForm.get('ZipCode').value,\r\n BusTelephoneEXT: null,\r\n\r\n VendorName: \"\",\r\n VendorProductsList: this.VendorProductsList,\r\n VendorProductImageList: this.VendorProductsImageList,\r\n VendorProductImageContentList: this.VendorProductsImageContentList,\r\n VendorProfile: null,\r\n VenTxtPhotoFile: null,\r\n BusinessLicNum: this.VendorForm.get('BusinessLicenseNumber').value,\r\n ResaleNum: this.VendorForm.get('ResaleNumber').value,\r\n SSN: this.VendorForm.get('SSN').value?this.VendorForm.get('SSN').value:null,\r\n TaxID: this.VendorForm.get('TaxID').value?this.VendorForm.get('TaxID').value:null,\r\n };\r\n\r\n this.vendorLoginData = {\r\n VendorId: 0,\r\n VendorName: null,\r\n OnlineAccess: true,\r\n OnlineUserId: this.OnlineAccessForm.get('UserName').value,\r\n OnlinePassword: this.OnlineAccessForm.get('Password').value,\r\n SecurityQuestionId: this.OnlineAccessForm.get('SecurityQuestion').value,\r\n SecurityQuestionAnswer: this.OnlineAccessForm.get('Answer').value,\r\n OnlineRegistrationDate: new Date()\r\n };\r\n\r\n this.vendorService.RegisterVendorInfoValidation(this.vendorinfo).subscribe((res: any) => {\r\n this.validationResponse = res;\r\n if (this.validationResponse.Success) {\r\n this.displayOnlineAccess();\r\n } else {\r\n this.toastr.error(this.validationResponse.Message, $localize`Error`, this.toasterConfig)\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n\r\n VendorLoginDetailsValidation() {\r\n this.vendorLoginData = {\r\n VendorId: 0,\r\n VendorName: null,\r\n OnlineAccess: true,\r\n OnlineUserId: this.OnlineAccessForm.get('UserName').value,\r\n OnlinePassword: this.OnlineAccessForm.get('Password').value,\r\n SecurityQuestionId: this.OnlineAccessForm.get('SecurityQuestion').value,\r\n SecurityQuestionAnswer: this.OnlineAccessForm.get('Answer').value,\r\n OnlineRegistrationDate: new Date()\r\n };\r\n\r\n const check = this.CheckValidations();\r\n if (!check) {\r\n this.loaderIcon = Promise.resolve(false);\r\n return;\r\n }\r\n this.vendorService.VendorLoginDetailsValidation(this.vendorLoginData).subscribe((res: any) => {\r\n this.validationResponse = res\r\n if (this.validationResponse.Success) {\r\n if (!(this.registrationFee.RegistrationFee > 0 && this.registrationFee.ChargeVendorRegistration)) {\r\n this.SaveVendorDetails();\r\n }\r\n this.displayRegisterPayment();\r\n }\r\n else {\r\n this.toastr.error(this.validationResponse.Message, $localize`Error`, this.toasterConfig);\r\n }\r\n });\r\n }\r\n SaveVendorDetails() {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.subscriptions.push(this.vendorService.SaveVendor(this.vendorinfo).subscribe((SaveVenresponse: any[]) => {\r\n this.response = SaveVenresponse;\r\n if (this.response.Success) {\r\n //this.toastr.success(this.response.Message, $localize`Success`, this.toasterConfig);\r\n this.vendorId = this.response.Id;\r\n if (this.registrationFee.RegistrationFee > 0 && this.registrationFee.ChargeVendorRegistration) {\r\n this.paymentService.GetVerifoneUnSavedCompleteData(this.verifoneId).subscribe((GetVerfoneresponse: any) => {\r\n this.obj = {\r\n VendorId: this.vendorId,\r\n PaymentOrderId: GetVerfoneresponse.OrderId,\r\n RentalCharge: 0,\r\n SalesTax: 0,\r\n SecLevelTax: 0,\r\n OtherCharge: this.registrationFee.RegistrationFee,\r\n PriorBalance: 0,\r\n TotalBalanceDue: 0,\r\n RentalNotes: \"Registration\",\r\n CashAmount: 0,\r\n CheckAmount: 0,\r\n CheckNo: \"\",\r\n ChangeAmount: 0,\r\n CardAmount: this.registrationFee.RegistrationFee,\r\n DirectDebitAmount: 0,\r\n CardType: \"1\",\r\n PaymentDone: true,\r\n PaymentDueDate: new Date(),\r\n VerifoneId: GetVerfoneresponse.VerifoneId,\r\n DiscountAmount: 0,\r\n ConvenienceFee: 0,\r\n DailyRentalBooth: [],\r\n DailyRentalOtherCharges: [{\r\n OtherItemId: this.registrationFee.Id, OtherItemName: this.registrationFee.Description, OtherCharge: this.registrationFee.RegistrationFee, Quantity: 1, RentalDay: new Date(), SalesTax: 0, SecLevelTax: 0\r\n }],\r\n AppliedDiscountModel: []\r\n };\r\n const sub = this.rentalService.SaveDailyRental(this.obj).subscribe(async (SaveDailyRentalResponse: any) => {\r\n if (SaveDailyRentalResponse.Success) {\r\n GetVerfoneresponse.VerifoneId = this.verifoneId;\r\n GetVerfoneresponse.VendorId = this.vendorId;\r\n this.paymentService.saveVerifoneUnSaved(GetVerfoneresponse).subscribe((res: any) => {\r\n this.SaveVendorLoginDetail(this.response.Id);\r\n });\r\n } else {\r\n if (this.verifoneId) {\r\n this.voidPayment = true;\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n\r\n this.subscriptions.push(sub);\r\n });\r\n } else {\r\n this.SaveVendorLoginDetail(this.response.Id);\r\n }\r\n this.vendorService.setVendorId(this.vendorId);\r\n const url = 'home/' + this.marketId;\r\n this.router.navigate([url]);\r\n\r\n }\r\n else {\r\n this.toastr.error(this.response.Message, $localize`Error`, this.toasterConfig)\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n\r\n }, (err) => {\r\n this.toastr.error($localize`Something Went Wrong`, $localize`Error`, this.toasterConfig)\r\n this.loaderIcon = Promise.resolve(false);\r\n }));\r\n }\r\n\r\n primaryproductchange(args1) {\r\n const Id = args1;\r\n const product = this.productList.find(p => p.ProductId === Id);\r\n\r\n if (product) {\r\n this.VendorProductsList.pop();\r\n const newProduct: IVendorProductModel = {\r\n VProductId: 0,\r\n ProductId: product.ProductId,\r\n Priority: true,\r\n VendorId: 0,\r\n ProductName: product.ProductName,\r\n ProductCategoryId: product.ProductCategoryId,\r\n ProductCategory: product.ProductCategory,\r\n };\r\n this.VendorProductsList.push(newProduct);\r\n } else {\r\n console.log(\"Product not found with ID:\", Id);\r\n }\r\n }\r\n\r\n SaveVendorLoginDetail(Id: any) {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.vendorLoginData.VendorId = Id;\r\n this.vendorService.SaveVendorLoginDetail(this.vendorLoginData).subscribe((res) => {\r\n this.response = res;\r\n if (this.response.Success) {\r\n this.toastr.success($localize`Registration completed Successfully`, $localize`Success`, this.toasterConfig);\r\n this.vendorService.SendRegistrationEmail(parseInt(Id)).subscribe((response1: any) => {\r\n if (response1.body.Success) {\r\n this.toastr.success($localize`Registration Email has been sent to your registered email address`, $localize`Success`, this.toasterConfig);\r\n } else {\r\n this.toastr.error($localize`Registration Email sending failed`, $localize`Error`, this.toasterConfig);\r\n }\r\n });\r\n }\r\n else {\r\n this.toastr.error($localize`Save was Unsuccessful`, $localize`Error`, this.toasterConfig)\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, (err) => {\r\n console.log(err);\r\n this.toastr.error($localize`Save was Unsuccessful`, $localize`Error`, this.toasterConfig)\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n }\r\n\r\n\r\n CheckValidations() {\r\n if (this.OnlineAccessForm.get('UserName').hasError('required') || this.OnlineAccessForm.get('Password').hasError('required') || this.OnlineAccessForm.get('ConfirmPassword').hasError('required') || this.OnlineAccessForm.get('SecurityQuestion').hasError('required') || this.OnlineAccessForm.get('Answer').hasError('required')) {\r\n this.toastr.error($localize`Please fill all mandatory fields properly`, $localize`Error`, this.toasterConfig)\r\n return false;\r\n }\r\n\r\n if (this.OnlineAccessForm.get('Password').hasError('minLength')) {\r\n this.toastr.error($localize`Password must be atleast 6 character`, $localize`Error`, this.toasterConfig)\r\n return false;\r\n }\r\n if (this.OnlineAccessForm.get('Password').hasError('maxLength')) {\r\n this.toastr.error($localize`Password must be at least 20 characters long.`, $localize`Error`, this.toasterConfig)\r\n return false;\r\n }\r\n if (this.OnlineAccessForm.get('Password').hasError('upperCase')) {\r\n this.toastr.error($localize`Password must contain at least one uppercase letter`, $localize`Error`, this.toasterConfig)\r\n return false;\r\n }\r\n if (this.OnlineAccessForm.get('Password').hasError('specialChar')) {\r\n this.toastr.error($localize`Password must contain at least one special`, $localize`Error`, this.toasterConfig)\r\n return false;\r\n }\r\n if (this.OnlineAccessForm.get('Password').hasError('lowerCase')) {\r\n this.toastr.error($localize`password must contain at least one lowercase letter`, $localize`Error`, this.toasterConfig)\r\n return false;\r\n }\r\n if (this.OnlineAccessForm.get('Answer').hasError('minLength')) {\r\n this.toastr.error($localize`Security Answer must be atleast 4 character`, $localize`Error`, this.toasterConfig)\r\n return false;\r\n }\r\n if (this.OnlineAccessForm.get('Password').value != this.OnlineAccessForm.get('ConfirmPassword').value) {\r\n this.toastr.error($localize`Confirm Password doesn't match.`, $localize`Error`, this.toasterConfig)\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n getCCCredentials() {\r\n this.paymentService.getCCCredentials(this.marketId).subscribe((res) => {\r\n if (res !== null) {\r\n this.paymentGatewayCredentials = res.GatewayDetails ? JSON.parse(res.GatewayDetails) : null;\r\n this.processCreditCardOnline = res.ProcessCreditCardOnline;\r\n }\r\n })\r\n }\r\n\r\n OnVendorRegister(e: Event) {\r\n e.preventDefault();\r\n this.loaderIcon = Promise.resolve(true);\r\n this.VendorLoginDetailsValidation();\r\n var creditCardAmount = this.registrationFee.RegistrationFee;\r\n if (creditCardAmount > 0 && this.registrationFee.ChargeVendorRegistration) {\r\n if (this.paymentGatewayCredentials && this.processCreditCardOnline)\r\n this.processPayment = true;\r\n else {\r\n var obj = {\r\n PaymentSuccess: true,\r\n OrderId: \"\",\r\n VerifoneId: 0\r\n }\r\n this.PaymentResponse(obj)\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n // else {\r\n // var obj = {\r\n // PaymentSuccess: true,\r\n // OrderId: \"\",\r\n // VerifoneId: 0\r\n // }\r\n // this.PaymentResponse(obj)\r\n // }\r\n }\r\n\r\n Oncancel() {\r\n Swal.fire({\r\n title: $localize`Are you sure ?`,\r\n text: $localize`You are about to cancel the registration process.`,\r\n icon: 'warning',\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n\r\n }).then((result) => {\r\n if (result.value) {\r\n const url = 'home/' + this.marketId;\r\n this.router.navigate([url]);\r\n } else {\r\n return;\r\n }\r\n });\r\n }\r\n\r\n ClosePaymentPage() {\r\n this.processPayment = false;\r\n this.voidPayment = false;\r\n this.displayOnlineAccess();\r\n }\r\n\r\n\r\n PaymentResponse(response) {\r\n this.loaderIcon = Promise.resolve(true);\r\n if (response.PaymentSuccess) {\r\n this.verifoneId = response.VerifoneId;\r\n this.SaveVendorDetails();\r\n\r\n } else {\r\n this.processPayment = false;\r\n this.voidPayment = false;\r\n this.displayOnlineAccess();\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n}\r\n\r\n","\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n

User Name / Password is incorrect!

\r\n
\r\n \r\n

User is Inactive!

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n Email address is required.\r\n User Name is required.\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n Password is required.\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
","import { Component, HostListener, Renderer2 } from '@angular/core';\r\nimport { FormGroup,FormBuilder, Validators } from '@angular/forms';\r\nimport { ActivatedRoute, Params, Router } from '@angular/router';\r\nimport { Subscription } from 'rxjs';\r\nimport { UserService } from 'src/app/services/User.service';\r\nimport Swal from 'sweetalert2';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\n\r\n@Component({\r\n selector: 'app-vendor-login',\r\n templateUrl: './vendor-login.component.html',\r\n styleUrls: ['./vendor-login.component.scss']\r\n})\r\nexport class VendorLoginComponent {\r\n loginForm: FormGroup;\r\n loginError=false;\r\n inActive = false;\r\n displayUsernameError = false;\r\n displayPasswordError = false;\r\n marketId\r\n confirmMailInput: HTMLInputElement\r\n imageUrl= \"\";\r\n private subscriptions: Subscription[] = [];\r\n toasterConfig = {\r\n closeButton: true,\r\n timeOut: 4500,\r\n easing: 'ease-out',\r\n progressBar: true,\r\n positionClass: 'toast-top-right',\r\n tapToDismiss: true,\r\n showEasing: 'swing',\r\n hideEasing: 'linear',\r\n showMethod: 'fadeIn',\r\n hideMethod: 'slideUp'\r\n };\r\n public loaderIcon: Promise;\r\n\r\n constructor(private formBuilder: FormBuilder,\r\n private userService: UserService,\r\n private route: ActivatedRoute,\r\n private router:Router,\r\n private marketInfoService:MarketInfoService,\r\n private toastr: ToastrService,\r\n private renderer: Renderer2) {\r\n this.loginForm = this.formBuilder.group({\r\n username: ['', [Validators.required]],\r\n password: ['', Validators.required],\r\n rememberMe:[false],\r\n loginUserName:[\"1\"]\r\n });\r\n }\r\n\r\n @HostListener('document:keydown', ['$event'])\r\n onKeydown(event: KeyboardEvent) {\r\n if (event.key === 'Enter') {\r\n event.preventDefault();\r\n this.validateLogin();\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this.route.params.subscribe((params: Params) => {\r\n this.marketId = params['marketId'];\r\n });\r\n this.getMarketLogo();\r\n this.checkRememberMe();\r\n this.applyBackground(); \r\n // window.addEventListener('resize', () => this.applyBackground());\r\n }\r\n\r\n getMarketLogo() {\r\n const timestamp = new Date().getTime();\r\n const sub = this.marketInfoService.getMarketLogo(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.imageUrl = res.MarketLogoBlobURL + `?timestamp=${timestamp}`;\r\n }\r\n else {\r\n this.imageUrl = '../../../assets/images/NoImage.jpg'\r\n }\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n private applyBackground(): void {\r\n if (window.innerWidth < 992) {\r\n this.renderer.setStyle(document.body, 'backgroundColor', '#508AE2');\r\n } else {\r\n const gradient = `linear-gradient(335deg, hsl(214deg 66% 55%) 0%, hsl(214deg 67% 56%) 5%, hsl(215deg 68% 57%) 10%, hsl(215deg 69% 58%) 14%, hsl(216deg 70% 59%) 19%, hsl(217deg 71% 60%) 24%, hsl(217deg 72% 61%) 29%, hsl(218deg 73% 62%) 33%, hsl(218deg 74% 63%) 38%, hsl(219deg 76% 64%) 43%, hsl(219deg 77% 65%) 48%, hsl(220deg 79% 66%) 52%, hsl(221deg 80% 67%) 57%, hsl(221deg 82% 68%) 62%, hsl(222deg 84% 69%) 67%, hsl(222deg 85% 70%) 71%, hsl(223deg 88% 71%) 76%, hsl(223deg 90% 72%) 81%, hsl(224deg 92% 73%) 86%, hsl(225deg 94% 74%) 90%, hsl(225deg 97% 75%) 95%, hsl(226deg 100% 76%) 100%)`;\r\n document.body.style.backgroundImage = gradient;\r\n }\r\n }\r\n\r\n checkRememberMe() {\r\n if (localStorage.getItem(`rememberMe_${this.marketId}`) === 'true') {\r\n const username = localStorage.getItem(`username_${this.marketId}_${this.loginForm.value['loginUserName']}`) || '';\r\n this.loginForm.get('username').setValue(username);\r\n this.loginForm.get('rememberMe').setValue(true);\r\n }\r\n }\r\n\r\n validateLoginCredentials(){\r\n if (!this.loginForm.valid) {\r\n this.displayUsernameError = this.loginForm.get('username').hasError('required');\r\n this.displayPasswordError = this.loginForm.get('password').hasError('required');\r\n }\r\n else{\r\n this.displayUsernameError = false;\r\n this.displayPasswordError = false;\r\n }\r\n }\r\n\r\n validateLogin() {\r\n this.loaderIcon = Promise.resolve(true);\r\n if (this.loginForm.valid) {\r\n this.loginError=false;\r\n const credentials =\r\n {\r\n username: this.loginForm.value['username'],\r\n password: this.loginForm.value['password'],\r\n EmailLogin: this.loginForm.value['loginUserName'] == \"2\" ? true : false,\r\n MarketId: this.marketId\r\n }\r\n this.userService.getToken(credentials).subscribe(async (response) => {\r\n if(response){\r\n if (!response.InActive) {\r\n this.loginError =false;\r\n const rememberMe = this.loginForm.value['rememberMe'];\r\n if (rememberMe) {\r\n localStorage.setItem(`rememberMe_${this.marketId}`, 'true');\r\n localStorage.setItem(`username_${this.marketId}_${this.loginForm.value['loginUserName']}`, this.loginForm.value['username']);\r\n } else {\r\n localStorage.removeItem(`rememberMe_${this.marketId}`);\r\n localStorage.removeItem(`username_${this.marketId}_${this.loginForm.value['loginUserName']}`);\r\n }\r\n const vendorId = response.UserId;\r\n sessionStorage.setItem('token', response.token);\r\n this.router.navigate(['/rent-online/'+this.marketId + '/' + vendorId]);\r\n }\r\n else {\r\n this.inActive = response.InActive;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n else{\r\n this.loginError =true;\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n });\r\n }\r\n else{\r\n this.displayUsernameError = this.loginForm.get('username').hasError('required');\r\n this.displayPasswordError = this.loginForm.get('password').hasError('required');\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }\r\n\r\n ForgotPassword(event) {\r\n event.preventDefault();\r\n Swal.fire({\r\n title: 'Confirm Mail',\r\n html: `\r\n \r\n Your new login password will be sent to your registered email address. Please check your email inbox!!\r\n `,\r\n confirmButtonText: 'Confirm',\r\n focusConfirm: false,\r\n showCloseButton: true,\r\n didOpen: () => {\r\n const popup = Swal.getPopup()!;\r\n this.confirmMailInput = popup.querySelector('#email') as HTMLInputElement;\r\n this.confirmMailInput.onkeyup = (event) => event.key === 'Enter' && Swal.clickConfirm();\r\n },\r\n preConfirm: () => {\r\n const confirmMail = this.confirmMailInput?.value\r\n if (!confirmMail) {\r\n Swal.showValidationMessage(`Please enter email address`);\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n },\r\n }).then((result) => {\r\n if (result.value) {\r\n Swal.close();\r\n this.subscriptions.push(this.userService.ForgotPassword(this.marketId, this.confirmMailInput?.value).subscribe((res: any) => {\r\n var response = res.Success;\r\n if (response) {\r\n this.toastr.success(res.Message, $localize`Success`, this.toasterConfig);\r\n }\r\n else {\r\n this.toastr.error(res.Message, $localize`Error`, this.toasterConfig)\r\n }\r\n }));\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n document.body.style.backgroundImage = '';\r\n document.body.style.backgroundColor = '';\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n
\r\n    \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n Part: {{selectedPartName}}\r\n
\r\n
\r\n
\r\n
\r\n \r\n

Available

\r\n
\r\n
\r\n \r\n

Booked

\r\n
\r\n
\r\n \r\n

Reserved

\r\n
\r\n
\r\n \r\n

Non Rentable

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { AfterViewInit, Component, ElementRef, EventEmitter, HostListener, Input, OnDestroy, OnInit, Output, ViewChild, ViewEncapsulation } from '@angular/core';\r\nimport { FormGroup, FormBuilder } from '@angular/forms';\r\nimport {\r\n DiagramComponent, NodeModel, NodeConstraints, MarginModel, ZoomOptions, ConnectorModel, SelectorConstraints,\r\n AnnotationConstraints, SelectorModel, PaletteModel,DiagramTooltipModel, ImageModel, DiagramTools, SnapConstraints , SnapSettingsModel, DiagramBeforeMenuOpenEventArgs, BasicShapeModel, PathAnnotationModel, TextModel\r\n} from '@syncfusion/ej2-angular-diagrams';\r\nimport { Observable, Subscription, catchError, forkJoin, map, of } from 'rxjs';\r\nimport { RentalService } from 'src/app/services/Rental.service';\r\nimport { ActivatedRoute, Params } from '@angular/router';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { SharedDataService } from 'src/app/Shared/SharedData.service';\r\nimport { DatePipe } from '@angular/common';\r\nimport { customCurrencyPipe } from 'src/app/Shared/customCurrency.pipe';\r\nimport Swal from 'sweetalert2';\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\n\r\ninterface DateString {\r\n startDate: string;\r\n}\r\n\r\n@Component({\r\n selector: 'app-rentallayout-online',\r\n templateUrl: './rentallayout-online.component.html',\r\n styleUrls: ['./rentallayout-online.component.scss'],\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class RentalLayoutComponent implements OnInit, OnDestroy, AfterViewInit {\r\n public loaderIcon: Promise;\r\n @ViewChild('diagram', { static: false })\r\n public diagram: DiagramComponent;\r\n private subscriptions: Subscription[] = [];\r\n layoutForm: FormGroup;\r\n defaultZoomFactor= 0;\r\n @Input() marketId;\r\n @Input() layoutParts : any;\r\n @Input() rentalType;\r\n @Input() LayoutData;\r\n @Output() selectedBoothsFromLayout = new EventEmitter();\r\n @Output() CloseLayout = new EventEmitter();\r\n @Output() removeBoothCharges = new EventEmitter();\r\n allExistingBuilding = [];\r\n boothShapes;\r\n fontName;\r\n fontStyle=[];\r\n layoutImages;\r\n images =[];\r\n selectedNode=[];\r\n selectedBoothData=[];\r\n allBooths=[];\r\n partId;\r\n isDropdownOpen = false;\r\n public palettes?: PaletteModel[];\r\n connectors: ConnectorModel[];\r\n selectedItems: SelectorModel;\r\n symbolMargin: MarginModel;\r\n private monthEndDateCache = new Map();\r\n noboothSelected = true\r\n public snapSettings: SnapSettingsModel = {\r\n constraints: SnapConstraints.None, \r\n };\r\n tool: DiagramTools;\r\n vendorId;\r\n BoothNumber;\r\n BoothType;\r\n blinkingNode: string = '';\r\n categoryLegend = [];\r\n blinkInterval: any;\r\n selectedPartName= \"\";\r\n toasterConfig = {\r\n closeButton: true,\r\n timeOut: 4500,\r\n easing: 'ease-out',\r\n progressBar: true,\r\n positionClass: 'toast-top-right',\r\n tapToDismiss: true,\r\n showEasing: 'swing',\r\n hideEasing: 'linear',\r\n showMethod: 'fadeIn',\r\n hideMethod: 'slideUp'\r\n };\r\n selectedBoothsForRental = [];\r\n public tooltip?: DiagramTooltipModel;\r\n constructor(private formbuilder: FormBuilder,\r\n private route:ActivatedRoute,\r\n private toastr: ToastrService,\r\n private sharedDataService:SharedDataService,\r\n private rentalService:RentalService,\r\n private datePipe: DatePipe,\r\n private customCurrency: customCurrencyPipe,\r\n private marketInfoService:MarketInfoService,\r\n private elementRef: ElementRef) {\r\n this.layoutForm = this.formbuilder.group({\r\n layoutDiagramFilter: this.formbuilder.group({\r\n searchBooth: ['']\r\n })\r\n });\r\n this.tool = DiagramTools.SingleSelect;\r\n this.selectedItems = {\r\n constraints: SelectorConstraints.All &\r\n ~(SelectorConstraints.ResizeAll | SelectorConstraints.Rotate)\r\n };\r\n this.symbolMargin = { left: 15, right: 15, top: 15, bottom: 15 };\r\n } \r\n\r\n @HostListener('document:click', ['$event'])\r\n clickOutsideDropdown(event: MouseEvent): void {\r\n const legendDropDown = document.querySelector('.legendDropDown');\r\n const dropdownElement = document.querySelector('.custom-dropdown');\r\n if (!legendDropDown.contains(event.target as Node) && !dropdownElement.contains(event.target as Node) && ((document.querySelector('.legendDropDown') as HTMLElement).classList.contains('open'))) {\r\n this.isDropdownOpen = false;\r\n }\r\n }\r\n\r\n closeCategoryLegend(){\r\n this.isDropdownOpen = false;\r\n }\r\n\r\n stopPropagation(event: Event) {\r\n event.stopPropagation();\r\n }\r\n\r\n toggleDropdown() {\r\n if(!this.isDropdownOpen)\r\n (document.querySelector('.legendDropDown') as HTMLElement).classList.add('open');\r\n else\r\n (document.querySelector('.legendDropDown') as HTMLElement).classList.remove('open');\r\n this.isDropdownOpen = !this.isDropdownOpen;\r\n }\r\n \r\n ngOnInit(): void {\r\n console.log('inside layout')\r\n this.route.params.subscribe((params: Params) => {\r\n this.vendorId = params['id'];\r\n }); \r\n this.partId = this.layoutParts;\r\n this.getParts();\r\n this.getProductCategories();\r\n this.getListOfValuesData();\r\n this.getImages(); \r\n }\r\n\r\n ngAfterViewInit() {\r\n }\r\n\r\n getParts() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.marketInfoService.getParts(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.selectedPartName = this.selectedPartName = res.filter(e=>e.PartId == this.partId)[0].PartDescription;\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n AddSelectedBoothsToGrid(){\r\n this.selectedBoothsFromLayout.emit(this.selectedBoothData);\r\n }\r\n\r\n closeLayoutForm() {\r\n if (this.rentalType == \"D\") {\r\n if (this.selectedBoothsForRental.length > 0) {\r\n this.selectedBoothsForRental.forEach(ele => {\r\n this.sharedDataService.dailyRentalSelectedDays.map(date => {\r\n const temp = {\r\n TempRecordNo: this.sharedDataService.tempRecordNo.toString(),\r\n BoothNumber: ele.BoothNumber,\r\n StartDate: new Date(date),\r\n RentalType: 1\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n });\r\n });\r\n }\r\n }\r\n else if (this.rentalType == \"M\") {\r\n if (this.selectedBoothsForRental.length > 0) {\r\n this.selectedBoothsForRental.forEach(ele => {\r\n const temp = {\r\n TempRecordNo: this.LayoutData.tempRecordNo.toString(),\r\n BoothNumber: ele.BoothNumber,\r\n StartDate: new Date(ele.StartDate),\r\n RentalType: 2,\r\n EndDate: new Date(ele.EndDate),\r\n Sunday: ele.Sunday,\r\n Monday: ele.Monday,\r\n Tuesday: ele.Tuesday,\r\n Wednesday: ele.Wednesday,\r\n Thursday: ele.Thursday,\r\n Friday: ele.Friday,\r\n Saturday: ele.Saturday,\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n });\r\n }\r\n }\r\n else if (this.rentalType == \"CM\") {\r\n if (this.selectedBoothsForRental.length > 0) {\r\n this.selectedBoothsForRental.forEach(ele => {\r\n const temp = {\r\n TempRecordNo: this.LayoutData.tempRecordNo.toString(),\r\n BoothNumber: ele.BoothNumber,\r\n StartDate: new Date(ele.StartDate),\r\n RentalType: 4,\r\n EndDate: new Date(ele.EndDate),\r\n Sunday: ele.Sunday,\r\n Monday: ele.Monday,\r\n Tuesday: ele.Tuesday,\r\n Wednesday: ele.Wednesday,\r\n Thursday: ele.Thursday,\r\n Friday: ele.Friday,\r\n Saturday: ele.Saturday,\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n });\r\n }\r\n }\r\n else if (this.rentalType == \"CW\") {\r\n if (this.selectedBoothsForRental.length > 0) {\r\n this.selectedBoothsForRental.forEach(ele => {\r\n const temp = {\r\n TempRecordNo: this.LayoutData.tempRecordNo.toString(),\r\n BoothNumber: ele.BoothNumber,\r\n StartDate: new Date(ele.StartDate),\r\n RentalType: 5,\r\n EndDate: new Date(ele.EndDate),\r\n Sunday: ele.Sunday,\r\n Monday: ele.Monday,\r\n Tuesday: ele.Tuesday,\r\n Wednesday: ele.Wednesday,\r\n Thursday: ele.Thursday,\r\n Friday: ele.Friday,\r\n Saturday: ele.Saturday,\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n });\r\n }\r\n }\r\n else if (this.rentalType == \"W\") {\r\n if (this.selectedBoothsForRental.length > 0) {\r\n this.selectedBoothsForRental.forEach(ele => {\r\n const temp = {\r\n TempRecordNo: this.LayoutData.tempRecordNo.toString(),\r\n BoothNumber: ele.BoothNumber,\r\n StartDate: new Date(ele.StartDate),\r\n RentalType: 5,\r\n EndDate: new Date(ele.EndDate),\r\n Sunday: ele.Sunday,\r\n Monday: ele.Monday,\r\n Tuesday: ele.Tuesday,\r\n Wednesday: ele.Wednesday,\r\n Thursday: ele.Thursday,\r\n Friday: ele.Friday,\r\n Saturday: ele.Saturday,\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n });\r\n }\r\n }\r\n\r\n if (this.selectedBoothsForRental.length > 0) {\r\n setTimeout(() => {\r\n this.CloseLayout.emit();\r\n }, 400);\r\n } else {\r\n this.CloseLayout.emit();\r\n }\r\n }\r\n\r\n public created(args: Object): void {\r\n // fit the diagram to the page with respect to mode and region\r\n this.diagram.fitToPage({\r\n mode: 'Page',\r\n region: 'Content',\r\n margin: {\r\n bottom: 50\r\n },\r\n canZoomIn: true\r\n });\r\n}\r\n\r\n markSelectedBooths() {\r\n if (this.rentalType == \"D\") {\r\n if (this.sharedDataService.dailyRentalSelectedBooths.length > 0) {\r\n this.sharedDataService.dailyRentalSelectedDays.forEach(date => {\r\n this.sharedDataService.dailyRentalSelectedBooths.forEach(element => {\r\n if (this.datePipe.transform(date, 'MM/dd/yyyy') == element.RentalDay) {\r\n const nodeId = \"node_\" + element.BoothNumber;\r\n const selectedNode = this.diagram.getObject(nodeId) as NodeModel;\r\n if (selectedNode) {\r\n const diagramNode: NodeModel = {\r\n id: nodeId.replace(\"&\",\"_amper_\") + \"mark\",\r\n offsetX: selectedNode.offsetX,\r\n offsetY: selectedNode.offsetY,\r\n width: selectedNode.width / 2,\r\n height: selectedNode.height / 2,\r\n shape: {\r\n type: \"HTML\",\r\n content: `
\r\n \r\n \r\n \r\n \r\n
`\r\n },\r\n constraints: NodeConstraints.Default & ~(NodeConstraints.Drag),\r\n };\r\n this.diagram.add(diagramNode);\r\n var selectedBoothData = this.allBooths.filter(e => e.BoothNumber == element.BoothNumber);\r\n this.selectedBoothData.push(\r\n {\r\n BoothNumber: selectedBoothData[0].BoothNumber,\r\n BoothType: selectedBoothData[0].BoothType,\r\n BoothDescription: selectedBoothData[0].BoothDescription,\r\n BoothTypeId: selectedBoothData[0].BoothTypeId,\r\n });\r\n }\r\n else{\r\n var selectedBoothData = this.allBooths.filter(e => e.BoothNumber == element.BoothNumber);\r\n this.selectedBoothData.push(\r\n {\r\n BoothNumber:element.BoothNumber,\r\n BoothType: element.BoothType,\r\n BoothDescription: selectedBoothData[0].BoothDescription,\r\n BoothTypeId: element.BoothTypeId,\r\n });\r\n }\r\n }\r\n });\r\n });\r\n }\r\n this.noboothSelected = this.selectedBoothData.length > 0 ? false : true;\r\n }\r\n else if (this.rentalType == \"W\" || this.rentalType == \"CW\") {\r\n if (this.LayoutData.weeklyRentalSelectedBooths.length > 0) {\r\n this.LayoutData.weeklyRentalSelectedBooths.forEach(element => {\r\n this.LayoutData.weeklyRentalMarketDays.forEach(days => {\r\n const selectedDates = [];\r\n this.LayoutData.weeklyRentalMarketDays.map((el, i) => {\r\n const startDate = new Date(element.RentStartPeriod.split('-')[0]);\r\n const endDate = new Date(element.RentEndPeriod.split('-')[1]);\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n selectedDates.push(this.datePipe.transform(new Date(currentDay), 'MM/dd/yyyy'));\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n\r\n if (selectedDates.some(element => this.LayoutData.selectedDates.includes(element))) {\r\n const nodeId = \"node_\" + element.BoothNumber;\r\n const selectedNode = this.diagram.getObject(nodeId) as NodeModel;\r\n if (selectedNode) {\r\n const diagramNode: NodeModel = {\r\n id: nodeId.replace(\"&\",\"_amper_\") + \"mark\",\r\n offsetX: selectedNode.offsetX,\r\n offsetY: selectedNode.offsetY,\r\n width: selectedNode.width / 2,\r\n height: selectedNode.height / 2,\r\n shape: {\r\n type: \"HTML\",\r\n content: `
\r\n \r\n \r\n \r\n \r\n
`\r\n },\r\n constraints: NodeConstraints.Default & ~(NodeConstraints.Drag),\r\n };\r\n this.diagram.add(diagramNode);\r\n }\r\n }\r\n });\r\n });\r\n });\r\n }\r\n }\r\n else if (this.rentalType == \"M\" || this.rentalType == \"CM\") {\r\n if (this.LayoutData.monthlyRentalSelectedBooths.length > 0) {\r\n this.LayoutData.monthlyRentalSelectedBooths.forEach(element => {\r\n this.LayoutData.monthlyRentalMarketDays.forEach(days => {\r\n const selectedDates = [];\r\n this.LayoutData.monthlyRentalMarketDays.map((el, i) => {\r\n const startDate = new Date(element.RentalStartDate);\r\n const endDate = new Date(element.RentalEndDate);\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n selectedDates.push(this.datePipe.transform(new Date(currentDay), 'MM/dd/yyyy'));\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n\r\n if (selectedDates.some(element => this.LayoutData.selectedDates.includes(element))) {\r\n const nodeId = \"node_\" + element.BoothNumber;\r\n const selectedNode = this.diagram.getObject(nodeId) as NodeModel;\r\n if (selectedNode) {\r\n const diagramNode: NodeModel = {\r\n id: nodeId.replace(\"&\",\"_amper_\") + \"mark\",\r\n offsetX: selectedNode.offsetX,\r\n offsetY: selectedNode.offsetY,\r\n width: selectedNode.width / 2,\r\n height: selectedNode.height / 2,\r\n shape: {\r\n type: \"HTML\",\r\n content: `
\r\n \r\n \r\n \r\n \r\n
`\r\n },\r\n constraints: NodeConstraints.Default & ~(NodeConstraints.Drag), \r\n };\r\n this.diagram.add(diagramNode);\r\n }\r\n }\r\n });\r\n });\r\n });\r\n }\r\n }\r\n }\r\n\r\n getProductCategories() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.rentalService.getProductCategories(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n res.map((el, i) => {\r\n const ob = {\r\n categoryName: el.CategoryDescription,\r\n color: this.convertColor(el.Color)\r\n }\r\n this.categoryLegend.push(JSON.parse(JSON.stringify(ob)));\r\n })\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n bindBoothsToLayout(data,boothStatusRecords) {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.allBooths = data;\r\n if (data.length > 0) {\r\n for(const item of data){\r\n var boothStatus = \"Booked\";\r\n var backColor = \"#fff\"\r\n switch (item.Status.toLowerCase()) {\r\n case \"r\": boothStatus = \"Reserved\"\r\n backColor = '#0032CC';\r\n break;\r\n case \"ro\": boothStatus = \"Reserved Only\"\r\n backColor = '#483D8B';\r\n break;\r\n case \"a\": boothStatus = \"Available\"\r\n backColor = '#fff';\r\n break;\r\n case \"ab\": boothStatus = \"Absentee Booking\"\r\n backColor = '#4F9F60';\r\n break;\r\n default: boothStatus = \"Booked\"\r\n backColor = '#4F9F60';\r\n break;\r\n }\r\n if(item.ExcludeForWeb){\r\n backColor = '#ff007f';\r\n item.Status = \"NR\"\r\n }\r\n\r\n if (boothStatus == 'Closed Out' || (item.Status.toLowerCase() == 'd' && !item.AccountReceiptId)) {\r\n //Booth closeout - do nothing\r\n }\r\n else {\r\n const fontColor = item.Status.toLowerCase() == \"r\" ? \"#fff\" : \"#000\";\r\n var tooltipCaption;\r\n if (item.ExcludeForWeb) {\r\n tooltipCaption = \"This booth is not available for online rental\";\r\n }\r\n else {\r\n tooltipCaption = item.VendorId ? 'Vendor Id:' + item.MarketVendorId + ' Name: ' + item.VendorName + ' Type: ' + item.RentalType + ' Status: ' + boothStatus + ' Product: ' + item.ProductDescription + ' VendorBalance : ' + this.customCurrency.transform(((-1) * item.PriorBalance).toString()) + ' Booth Number: ' + item.BoothNumber + ' Booth Type: ' + item.BoothType + ' Booth Description: ' + item.BoothDescription : ' Booth Number: ' + item.BoothNumber + ' Booth Type: ' + item.BoothType + ' Booth Description: ' + item.BoothDescription;\r\n }\r\n const nodeId = 'node_' + item.BoothNumber;\r\n const diagramNode: NodeModel = {\r\n id: nodeId,\r\n shape: {\r\n type: 'Basic',\r\n shape: this.boothShapes.filter(e => e.Id == item.ShapeId)[0].Name\r\n },\r\n style: {\r\n fill: backColor,\r\n strokeColor: this.convertColor(item.BorderColor),\r\n color: fontColor,\r\n strokeWidth: 1,\r\n fontSize: item.FontSize,\r\n textWrapping: 'Wrap',\r\n fontFamily: this.fontName.filter(e => e.Id == item.FontName)[0].Name\r\n },\r\n annotations:\r\n [{\r\n content: item.BoothNumber,\r\n style: {\r\n fontSize: item.FontSize,\r\n color: fontColor,\r\n fontFamily: this.fontName.filter(e => e.Id == item.FontName)[0].Name,\r\n textWrapping: 'Wrap',\r\n bold: this.fontStyle.filter(e => e.Id == item.FontStyle)[0].Name.toLowerCase().includes('bold'),\r\n italic: this.fontStyle.filter(e => e.Id == item.FontStyle)[0].Name.toLowerCase().includes('italic')\r\n },\r\n\r\n constraints: AnnotationConstraints.ReadOnly\r\n }],\r\n tooltip: {\r\n content: tooltipCaption,\r\n position: 'TopCenter',\r\n relativeMode: 'Object',\r\n },\r\n width: item.Width * 3,\r\n height: item.Length * 3,\r\n addInfo: {\r\n allowDrag: true,\r\n name: 'booth',\r\n status: item.Status\r\n },\r\n constraints: NodeConstraints.Default & ~(NodeConstraints.Drag) | NodeConstraints.Tooltip,\r\n offsetX: item.LeftCoordinate,\r\n offsetY: item.TopCoordinate,\r\n rotateAngle: item.RotateAngle\r\n };\r\n this.diagram.add(diagramNode);\r\n }\r\n }\r\n this.diagram.fitToPage();\r\n if (this.defaultZoomFactor) {\r\n let zoomOptions: ZoomOptions = {\r\n type: 'ZoomIn',\r\n zoomFactor: this.defaultZoomFactor\r\n };\r\n this.diagram.zoomTo(zoomOptions);\r\n }\r\n }\r\n this.markSelectedBooths();\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n\r\n\r\n getAllBoothsForLayout() {\r\n this.loaderIcon = Promise.resolve(true);\r\n if (this.rentalType == \"D\") {\r\n var obj;\r\n var rentalStartDate = this.sharedDataService.dailyRentalSelectedDays[0];\r\n var rentalDaysLength = this.sharedDataService.dailyRentalSelectedDays.length;\r\n const rentalStartDateYear = new Date(this.sharedDataService.dailyRentalSelectedDays[0]).getFullYear();\r\n const rentalStartDateMonth = new Date(this.sharedDataService.dailyRentalSelectedDays[0]).getMonth() + 1;\r\n const rentalStartDateYearMonth = `${rentalStartDateYear}${rentalStartDateMonth < 10 ? '0' : ''}${rentalStartDateMonth}`;\r\n var selectedMarketDays = [];\r\n rentalStartDate.getDay() == 0 ? selectedMarketDays.push(1) : 0;\r\n rentalStartDate.getDay() == 1 ? selectedMarketDays.push(2) : 0;\r\n rentalStartDate.getDay() == 2 ? selectedMarketDays.push(3) : 0;\r\n rentalStartDate.getDay() == 3 ? selectedMarketDays.push(4) : 0;\r\n rentalStartDate.getDay() == 4 ? selectedMarketDays.push(5) : 0;\r\n rentalStartDate.getDay() == 5 ? selectedMarketDays.push(6) : 0;\r\n rentalStartDate.getDay() == 6 ? selectedMarketDays.push(7) : 0;\r\n obj = {\r\n RentalStartDate: this.sharedDataService.dailyRentalSelectedDays[0],\r\n RentalEndDate: this.sharedDataService.dailyRentalSelectedDays[rentalDaysLength - 1],\r\n RentalYearMonth: rentalStartDateYearMonth,\r\n Monday: rentalStartDate.getDay() == 1 ? true : false,\r\n Tuesday: rentalStartDate.getDay() == 2 ? true : false,\r\n Wednesday: rentalStartDate.getDay() == 3 ? true : false,\r\n Thursday: rentalStartDate.getDay() == 4 ? true : false,\r\n Friday: rentalStartDate.getDay() == 5 ? true : false,\r\n Saturday: rentalStartDate.getDay() == 6 ? true : false,\r\n Sunday: rentalStartDate.getDay() == 0 ? true : false,\r\n MarketDays: selectedMarketDays.toString(),\r\n MarketId: this.marketId\r\n }\r\n forkJoin({\r\n boothsList: this.marketInfoService.getAllBoothsForDailyRentalTypeLayout(this.marketId, this.partId, this.sharedDataService.dailyRentalSelectedDays),\r\n boothStatus: this.rentalService.getBoothStatus(obj)\r\n }).subscribe(({ boothsList, boothStatus }) => {\r\n let data = boothsList;\r\n this.bindBoothsToLayout(data,boothStatus);\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n }\r\n else if(this.rentalType == \"W\" || this.rentalType == \"CW\"){\r\n const subRentSettings = this.rentalService.getRentalSettings(this.marketId).subscribe((response: any) => {\r\n if (response) {\r\n const rentalStartDateYear = new Date(this.LayoutData.weeklyRentalStartDate.split('-')[0]).getFullYear();\r\n const rentalStartDateMonth = new Date(this.LayoutData.weeklyRentalStartDate.split('-')[0]).getMonth() + 1;\r\n const rentalEndDateYear = new Date(this.LayoutData.weeklyRentalEndDate.split('-')[1]).getFullYear();\r\n const rentalEndDateMonth = new Date(this.LayoutData.weeklyRentalEndDate.split('-')[1]).getMonth() + 1;\r\n const rentalStartDateYearMonth = `${rentalStartDateYear}${rentalStartDateMonth < 10 ? '0' : ''}${rentalStartDateMonth}`;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n var marketDays = '';\r\n this.LayoutData.weeklyRentalMarketDays.forEach(element => {\r\n marketDays = marketDays.concat(element) + ',';\r\n });\r\n var obj = {\r\n PartId: this.partId,\r\n RentalStartDate: new Date(this.LayoutData.weeklyRentalFirstDay),\r\n RentalEndDate: new Date(this.LayoutData.weeklyRentalEndDate.split('-')[1]),\r\n FirstDayOfRentalStartWeek: new Date(this.LayoutData.weeklyRentalStartDate.split('-')[0]),\r\n FirstDayOfRentalEndWeek: new Date(this.LayoutData.weeklyRentalEndDate.split('-')[0]),\r\n RentalStartDateYearMonth: rentalStartDateYearMonth,\r\n RentalEndDateYearMonth: rentalEndDateYearMonth,\r\n // SelectedRentalDates: ,\r\n // SelectedNumberOfRentalDates: ,\r\n MarketDays: marketDays.substring(0, marketDays.length - 1),\r\n WeeklyCombWeeklyReservationPeriod: response.WeeklyCombWeeklyReservationPeriod,\r\n MonthlyCombMonthlyReservationPeriod: response.MonthlyCombMonthlyReservationPeriod,\r\n RentalStartDateWeekDayNumber: new Date(this.LayoutData.weeklyRentalStartDate.split('-')[0]).getDay(),\r\n AllowVendorVacation: false,\r\n Monday: this.LayoutData.Monday ? true : false,\r\n Tuesday: this.LayoutData.Tuesday ? true : false,\r\n Wednesday: this.LayoutData.Wednesday ? true : false,\r\n Thursday: this.LayoutData.Thursday ? true : false,\r\n Friday: this.LayoutData.Friday ? true : false,\r\n Saturday: this.LayoutData.Saturday ? true : false,\r\n Sunday: this.LayoutData.Sunday ? true : false,\r\n }\r\n const sub = this.marketInfoService.getALLBoothsForLayoutALLRentalTypes(this.marketId, obj).subscribe((response) => {\r\n let data = response;\r\n this.bindBoothsToLayout(data,'');\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n });\r\n }\r\n else if(this.rentalType == \"M\" || this.rentalType == \"CM\"){\r\n const subRentSettings = this.rentalService.getRentalSettings(this.marketId).subscribe((response: any) => {\r\n if (response) { \r\n const rentalStartDateYear = new Date(this.LayoutData.monthlyRentalStartDate.split('-')[0]).getFullYear();\r\n const rentalStartDateMonth = new Date(this.LayoutData.monthlyRentalStartDate.split('-')[0]).getMonth() + 1;\r\n const rentalEndDateYear = new Date(this.LayoutData.monthlyRentalEndDate.split('-')[0]).getFullYear();\r\n const rentalEndDateMonth = new Date(this.LayoutData.monthlyRentalEndDate.split('-')[0]).getMonth() + 1;\r\n const rentalStartDateYearMonth = `${rentalStartDateYear}${rentalStartDateMonth < 10 ? '0' : ''}${rentalStartDateMonth}`;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n var marketDays = '';\r\n this.LayoutData.monthlyRentalMarketDays.forEach(element => {\r\n marketDays = marketDays.concat(element) + ',';\r\n });\r\n var obj = {\r\n PartId: this.partId,\r\n RentalStartDate:new Date(this.LayoutData.RentalStartDate),\r\n RentalEndDate:new Date(this.LayoutData.RentalEndDate),\r\n FirstDayOfRentalStartWeek:new Date(this.LayoutData.RentalStartDate),\r\n FirstDayOfRentalEndWeek: new Date(this.LayoutData.RentalEndDate),\r\n RentalStartDateYearMonth: rentalStartDateYearMonth,\r\n RentalEndDateYearMonth: rentalEndDateYearMonth,\r\n MarketDays: marketDays.substring(0, marketDays.length - 1),\r\n WeeklyCombWeeklyReservationPeriod: response.WeeklyCombWeeklyReservationPeriod,\r\n MonthlyCombMonthlyReservationPeriod: response.MonthlyCombMonthlyReservationPeriod,\r\n RentalStartDateWeekDayNumber: new Date(this.LayoutData.monthlyRentalStartDate.split('-')[0]).getDay(),\r\n AllowVendorVacation: false,\r\n Monday: this.LayoutData.Monday ? true : false,\r\n Tuesday: this.LayoutData.Tuesday ? true : false,\r\n Wednesday: this.LayoutData.Wednesday ? true : false,\r\n Thursday: this.LayoutData.Thursday ? true : false,\r\n Friday: this.LayoutData.Friday ? true : false,\r\n Saturday: this.LayoutData.Saturday ? true : false,\r\n Sunday: this.LayoutData.Sunday ? true : false,\r\n }\r\n const sub = this.marketInfoService.getALLBoothsForLayoutALLRentalTypes(this.marketId, obj).subscribe((response) => {\r\n let data = response;\r\n this.bindBoothsToLayout(data,'');\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n });\r\n }\r\n }\r\n\r\n changeLayout() {\r\n this.diagram.clear();\r\n this.getBuildingForLayout();\r\n this.getImagesForLayout();\r\n this.getAllBoothsForLayout();\r\n }\r\n\r\n getListOfValuesData() {\r\n this.loaderIcon = Promise.resolve(true);\r\n forkJoin({\r\n res: this.marketInfoService.getListOfValuesData(),\r\n layoutFonts: this.marketInfoService.getLayoutFonts(this.marketId)\r\n }).subscribe(({ res, layoutFonts }) => {\r\n if (res) {\r\n this.boothShapes = res.BoothShapes;\r\n this.fontName = res.FontName;\r\n this.fontStyle = res.FontStyle;\r\n } \r\n if(layoutFonts){\r\n this.defaultZoomFactor = layoutFonts.DefaultZoomFactor ?? 0;\r\n }\r\n this.getAllBoothsForLayout();\r\n this.getBuildingForLayout();\r\n this.getImagesForLayout();\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n }\r\n\r\n convertColor(colorValue: number): string {\r\n if (colorValue == 255 || colorValue == 65280 || colorValue == 0)\r\n return '#' + colorValue.toString(16).padStart(6, '0');\r\n else\r\n return '#' + colorValue.toString(16);\r\n } \r\n\r\n nodeMouseOver(event){\r\n if (event.target) { \r\n const nodeId = event.target.id == \"\"? 'node_' + event.target.innerHTML : event.target.id.replace('_content', '');\r\n const selectedNode = this.diagram.getObject(nodeId) as NodeModel;\r\n if(selectedNode){\r\n var boothNo = selectedNode.id.replace('node_','');\r\n var selectedBooth = this.allBooths.filter(e => e.BoothNumber == boothNo);\r\n this.BoothNumber = boothNo;\r\n this.BoothType = selectedBooth[0].BoothType; \r\n }\r\n else{\r\n this.BoothNumber = \"\";\r\n this.BoothType = \"\";\r\n }\r\n }\r\n }\r\n\r\n nodeClick(event): void {\r\n var args;\r\n if (event.target) {\r\n const nodeId = event.target.id == \"\" ? 'node_' + event.target.innerHTML : event.target.id.replace('_content', '');\r\n args = this.diagram.getObject(nodeId.replace(\"&\",\"&\")) as NodeModel;\r\n }\r\n else{\r\n const nodeId = event.element.properties.id;\r\n if (nodeId && nodeId.includes('mark')) {\r\n const mainNodeId = nodeId.replace('mark', '').replace(\"_amper_\",\"&\").replace(\"&\",\"&\");\r\n args = this.diagram.getObject(mainNodeId) as NodeModel;\r\n }\r\n }\r\n if (args.properties.addInfo) {\r\n if (args.properties.addInfo.name == \"booth\" && args.properties.addInfo.status == \"A\") {\r\n this.rentalService.getRecordFromTemp().subscribe(async (response: any[]) => {\r\n const dataFromTemp = response;\r\n const nodeId = args.properties.id;\r\n var selectedBooth = this.allBooths.filter(e => e.BoothNumber == args.properties.annotations[0].properties.content);\r\n this.BoothNumber = args.properties.annotations[0].properties.content;\r\n this.BoothType = selectedBooth[0].BoothType;\r\n const selectedNode = this.diagram.getObject(nodeId) as NodeModel;\r\n var boothIndex = this.selectedBoothData.findIndex(e => e.BoothNumber == args.properties.annotations[0].properties.content);\r\n if (boothIndex == -1) {\r\n const diagramNode: NodeModel = {\r\n id: nodeId.replace(\"&\",\"_amper_\") + \"mark\",\r\n offsetX: selectedNode.offsetX,\r\n offsetY: selectedNode.offsetY,\r\n width: selectedNode.width / 2,\r\n height: selectedNode.height / 2,\r\n shape: {\r\n type: \"HTML\", \r\n content: `
\r\n \r\n \r\n \r\n \r\n
`\r\n },\r\n constraints: NodeConstraints.Default & ~(NodeConstraints.Drag),\r\n };\r\n\r\n var boothSelectedByOtherUser = false;\r\n if (this.rentalType == \"D\") {\r\n if (dataFromTemp.length > 0) {\r\n this.sharedDataService.dailyRentalSelectedDays.forEach(date => {\r\n var Sunday = new Date(date).getDay() == 0 ? true : false;\r\n var Monday = new Date(date).getDay() == 1 ? true : false;\r\n var Tuesday = new Date(date).getDay() == 2 ? true : false;\r\n var Wednesday = new Date(date).getDay() == 3 ? true : false;\r\n var Thursday = new Date(date).getDay() == 4 ? true : false;\r\n var Friday = new Date(date).getDay() == 5 ? true : false;\r\n var Saturday = new Date(date).getDay() == 6 ? true : false;\r\n dataFromTemp.forEach(element => {\r\n if (this.datePipe.transform(date, 'MM/dd/yyyy') >= this.datePipe.transform(element.StartDate, 'MM/dd/yyyy')\r\n && this.datePipe.transform(date, 'MM/dd/yyyy') <= this.datePipe.transform(element.EndDate, 'MM/dd/yyyy') && element.TempRecordNo != this.sharedDataService.tempRecordNo\r\n && (element.Sunday == Sunday || element.Monday == Monday || element.Tuesday == Tuesday\r\n || element.Wednesday == Wednesday || element.Thursday == Thursday || element.Friday == Friday || element.Saturday == Saturday)) {\r\n if (element.BoothNo == selectedBooth[0].BoothNumber) {\r\n boothSelectedByOtherUser = true;\r\n }\r\n }\r\n });\r\n });\r\n }\r\n if (boothSelectedByOtherUser) {\r\n Swal.fire({\r\n text: $localize`This booth has been already selected by another user`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n } else {\r\n this.diagram.add(diagramNode);\r\n }\r\n }\r\n else if (this.rentalType == \"M\") {\r\n const rentalDates = [];\r\n var rentedBoothDates = [];\r\n var rentalstartDate;\r\n const startDate = new Date(this.LayoutData.RentalStartDate);\r\n const endMonth = this.LayoutData.monthlyRentalEndDate\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n const endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n this.LayoutData.monthlyRentalMarketDays.map((el, i) => {\r\n const selectedDayOfWeek = el - 1;\r\n\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n if (dataFromTemp.length > 0) {\r\n dataFromTemp.forEach(element => {\r\n var dayOfWeek;\r\n var selectedDaysOfWeek = [];\r\n element.Sunday == true ? selectedDaysOfWeek.push(1) : 0;\r\n element.Monday == true ? selectedDaysOfWeek.push(2) : 0;\r\n element.Tuesday == true ? selectedDaysOfWeek.push(3) : 0;\r\n element.Wednesday == true ? selectedDaysOfWeek.push(4) : 0;\r\n element.Thursday == true ? selectedDaysOfWeek.push(5) : 0;\r\n element.Friday == true ? selectedDaysOfWeek.push(6) : 0;\r\n element.Saturday == true ? selectedDaysOfWeek.push(7) : 0;\r\n\r\n const startDate = new Date(element.StartDate);\r\n const endDate = new Date(element.EndDate);\r\n while (new Date(startDate) <= new Date(endDate)) {\r\n selectedDaysOfWeek.map((el, i) => {\r\n dayOfWeek = el - 1;\r\n if (startDate.getDay() === dayOfWeek) {\r\n rentedBoothDates.push(this.datePipe.transform(new Date(startDate), 'MMM d, y'));\r\n }\r\n });\r\n startDate.setDate(startDate.getDate() + 1);\r\n }\r\n var Sunday = el == 1 ? true : false;\r\n var Monday = el == 2 ? true : false;\r\n var Tuesday = el == 3 ? true : false;\r\n var Wednesday = el == 4 ? true : false;\r\n var Thursday = el == 5 ? true : false;\r\n var Friday = el == 6 ? true : false;\r\n var Saturday = el == 7 ? true : false;\r\n const isDateIncluded = rentalDates.some(rentalDate => {\r\n const startDate = rentalDate.startDate;\r\n return rentedBoothDates.includes(startDate);\r\n });\r\n if (isDateIncluded && element.BoothNo == selectedBooth[0].BoothNumber && element.TempRecordNo != this.LayoutData.tempRecordNo\r\n && (element.Sunday == Sunday || element.Monday == Monday || element.Tuesday == Tuesday\r\n || element.Wednesday == Wednesday || element.Thursday == Thursday || element.Friday == Friday || element.Saturday == Saturday)\r\n ) {\r\n boothSelectedByOtherUser = true;\r\n }\r\n });\r\n }\r\n if (boothSelectedByOtherUser) {\r\n Swal.fire({\r\n text: $localize`This booth has been already selected by another user`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n } else {\r\n this.diagram.add(diagramNode);\r\n }\r\n });\r\n }\r\n else if (this.rentalType == \"CM\") {\r\n const rentalDates = [];\r\n var rentedBoothDates = [];\r\n var rentalstartDate;\r\n const startDate = new Date(this.LayoutData.RentalStartDate);\r\n const endMonth = this.LayoutData.monthlyRentalEndDate\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n var endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n if (this.LayoutData.combinedMonthlyBookingEndDate) {\r\n const rentalEndDateYear = endDate.getFullYear();\r\n const rentalEndDateMonth = endDate.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n const response = await this.rentalService.GetSelectedMonthEndDate(rentalEndDateYearMonth,this.marketId).toPromise();\r\n endDate = new Date(response.MonthEndDateSelected);\r\n }\r\n this.LayoutData.monthlyRentalMarketDays.map((el, i) => {\r\n const selectedDayOfWeek = el - 1;\r\n\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n if (dataFromTemp.length > 0) {\r\n dataFromTemp.forEach(element => {\r\n const marketDaysOfTemprecord = [];\r\n var rentedBoothDates = [];\r\n element.Sunday ? marketDaysOfTemprecord.push(1) : 0;\r\n element.Monday ? marketDaysOfTemprecord.push(2) : 0;\r\n element.Tuesday ? marketDaysOfTemprecord.push(3) : 0;\r\n element.Wednesday ? marketDaysOfTemprecord.push(4) : 0;\r\n element.Thursday ? marketDaysOfTemprecord.push(5) : 0;\r\n element.Friday ? marketDaysOfTemprecord.push(6) : 0;\r\n element.Saturday ? marketDaysOfTemprecord.push(7) : 0;\r\n marketDaysOfTemprecord.map((el, i) => {\r\n const dayOfWeek = el - 1;\r\n const startDate = new Date(element.StartDate);\r\n const endDate = new Date(element.EndDate);\r\n while (new Date(startDate) <= new Date(endDate)) {\r\n if (startDate.getDay() === dayOfWeek) {\r\n rentedBoothDates.push(this.datePipe.transform(new Date(startDate), 'MMM d, y'));\r\n }\r\n startDate.setDate(startDate.getDate() + 1);\r\n }\r\n });\r\n var Monday = this.LayoutData.Monday ? true : false;\r\n var Tuesday = this.LayoutData.Tuesday ? true : false;\r\n var Wednesday = this.LayoutData.Wednesday ? true : false;\r\n var Thursday = this.LayoutData.Thursday ? true : false;\r\n var Friday = this.LayoutData.Friday ? true : false;\r\n var Saturday = this.LayoutData.Saturday ? true : false;\r\n var Sunday = this.LayoutData.Sunday ? true : false;\r\n const isDateIncluded = rentalDates.some(rentalDate => {\r\n const startDate = rentalDate.startDate;\r\n return rentedBoothDates.includes(startDate);\r\n });\r\n if (isDateIncluded && element.BoothNo == selectedBooth[0].BoothNumber && element.TempRecordNo != this.LayoutData.tempRecordNo\r\n && (element.Sunday == Sunday || element.Monday == Monday || element.Tuesday == Tuesday\r\n || element.Wednesday == Wednesday || element.Thursday == Thursday || element.Friday == Friday || element.Saturday == Saturday)\r\n ) {\r\n boothSelectedByOtherUser = true;\r\n }\r\n });\r\n }\r\n if (boothSelectedByOtherUser) {\r\n Swal.fire({\r\n text: $localize`This booth has been already selected by another user`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n } else {\r\n this.diagram.add(diagramNode);\r\n }\r\n });\r\n }\r\n else if (this.rentalType == \"CW\") {\r\n const rentalDates = [];\r\n var rentedBoothDates = [];\r\n var rentalstartDate;\r\n const startDate = new Date(this.LayoutData.weeklyRentalStartDate.split(\"-\")[0]);\r\n const endDate = new Date(this.LayoutData.weeklyRentalEndDate.split(\"-\")[1]);\r\n this.LayoutData.weeklyRentalMarketDays.map((el, i) => {\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n if (dataFromTemp.length > 0) {\r\n dataFromTemp.forEach(element => {\r\n const marketDaysOfTemprecord = [];\r\n var rentedBoothDates = [];\r\n element.Sunday ? marketDaysOfTemprecord.push(1) : 0;\r\n element.Monday ? marketDaysOfTemprecord.push(2) : 0;\r\n element.Tuesday ? marketDaysOfTemprecord.push(3) : 0;\r\n element.Wednesday ? marketDaysOfTemprecord.push(4) : 0;\r\n element.Thursday ? marketDaysOfTemprecord.push(5) : 0;\r\n element.Friday ? marketDaysOfTemprecord.push(6) : 0;\r\n element.Saturday ? marketDaysOfTemprecord.push(7) : 0;\r\n marketDaysOfTemprecord.map((el, i) => {\r\n const dayOfWeek = el - 1;\r\n const startDate = new Date(element.StartDate);\r\n const endDate = new Date(element.EndDate);\r\n while (new Date(startDate) <= new Date(endDate)) {\r\n if (startDate.getDay() === dayOfWeek) {\r\n rentedBoothDates.push(this.datePipe.transform(new Date(startDate), 'MMM d, y'));\r\n }\r\n startDate.setDate(startDate.getDate() + 1);\r\n }\r\n });\r\n var Monday = this.LayoutData.Monday ? true : false;\r\n var Tuesday = this.LayoutData.Tuesday ? true : false;\r\n var Wednesday = this.LayoutData.Wednesday ? true : false;\r\n var Thursday = this.LayoutData.Thursday ? true : false;\r\n var Friday = this.LayoutData.Friday ? true : false;\r\n var Saturday = this.LayoutData.Saturday ? true : false;\r\n var Sunday = this.LayoutData.Sunday ? true : false;\r\n const isDateIncluded = rentalDates.some(rentalDate => {\r\n const startDate = rentalDate.startDate;\r\n return rentedBoothDates.includes(startDate);\r\n });\r\n if (isDateIncluded && element.BoothNo == selectedBooth[0].BoothNumber && element.TempRecordNo != this.LayoutData.tempRecordNo\r\n && (element.Sunday == Sunday || element.Monday == Monday || element.Tuesday == Tuesday\r\n || element.Wednesday == Wednesday || element.Thursday == Thursday || element.Friday == Friday || element.Saturday == Saturday)\r\n ) {\r\n boothSelectedByOtherUser = true;\r\n }\r\n });\r\n }\r\n if (boothSelectedByOtherUser) {\r\n Swal.fire({\r\n text: $localize`This booth has been already selected by another user`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n } else {\r\n this.diagram.add(diagramNode);\r\n }\r\n });\r\n }\r\n else if (this.rentalType == \"W\") {\r\n const rentalDates = [];\r\n var rentedBoothDates = [];\r\n var rentalstartDate;\r\n const startDate = new Date(this.LayoutData.weeklyRentalStartDate.split(\"-\")[0]);\r\n const endDate = new Date(this.LayoutData.weeklyRentalEndDate.split(\"-\")[1]);\r\n this.LayoutData.weeklyRentalMarketDays.map((el, i) => {\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n if (dataFromTemp.length > 0) {\r\n dataFromTemp.forEach(element => {\r\n const marketDaysOfTemprecord = [];\r\n var rentedBoothDates = [];\r\n element.Sunday ? marketDaysOfTemprecord.push(1) : 0;\r\n element.Monday ? marketDaysOfTemprecord.push(2) : 0;\r\n element.Tuesday ? marketDaysOfTemprecord.push(3) : 0;\r\n element.Wednesday ? marketDaysOfTemprecord.push(4) : 0;\r\n element.Thursday ? marketDaysOfTemprecord.push(5) : 0;\r\n element.Friday ? marketDaysOfTemprecord.push(6) : 0;\r\n element.Saturday ? marketDaysOfTemprecord.push(7) : 0;\r\n marketDaysOfTemprecord.map((el, i) => {\r\n const dayOfWeek = el - 1;\r\n const startDate = new Date(element.StartDate);\r\n const endDate = new Date(element.EndDate);\r\n while (new Date(startDate) <= new Date(endDate)) {\r\n if (startDate.getDay() === dayOfWeek) {\r\n rentedBoothDates.push(this.datePipe.transform(new Date(startDate), 'MMM d, y'));\r\n }\r\n startDate.setDate(startDate.getDate() + 1);\r\n }\r\n });\r\n var Monday = this.LayoutData.Monday ? true : false;\r\n var Tuesday = this.LayoutData.Tuesday ? true : false;\r\n var Wednesday = this.LayoutData.Wednesday ? true : false;\r\n var Thursday = this.LayoutData.Thursday ? true : false;\r\n var Friday = this.LayoutData.Friday ? true : false;\r\n var Saturday = this.LayoutData.Saturday ? true : false;\r\n var Sunday = this.LayoutData.Sunday ? true : false;\r\n const isDateIncluded = rentalDates.some(rentalDate => {\r\n const startDate = rentalDate.startDate;\r\n return rentedBoothDates.includes(startDate);\r\n });\r\n if (isDateIncluded && element.BoothNo == selectedBooth[0].BoothNumber && element.TempRecordNo != this.LayoutData.tempRecordNo\r\n && (element.Sunday == Sunday || element.Monday == Monday || element.Tuesday == Tuesday\r\n || element.Wednesday == Wednesday || element.Thursday == Thursday || element.Friday == Friday || element.Saturday == Saturday)\r\n ) {\r\n boothSelectedByOtherUser = true;\r\n }\r\n });\r\n }\r\n if (boothSelectedByOtherUser) {\r\n Swal.fire({\r\n text: $localize`This booth has been already selected by another user!`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n } else {\r\n this.diagram.add(diagramNode);\r\n }\r\n });\r\n }\r\n else {\r\n this.diagram.add(diagramNode);\r\n }\r\n\r\n if (this.rentalType == \"D\") {\r\n if (!boothSelectedByOtherUser) {\r\n this.selectedBoothData.push(\r\n {\r\n BoothNumber: selectedBooth[0].BoothNumber,\r\n BoothType: selectedBooth[0].BoothType,\r\n BoothDescription: selectedBooth[0].BoothDescription,\r\n BoothTypeId: selectedBooth[0].BoothTypeId,\r\n });\r\n this.noboothSelected = this.selectedBoothData.length > 0 ? false : true;\r\n this.insertDataToTemp(selectedBooth[0].BoothNumber,'','','');\r\n var selectedBoothsForRental = {\r\n BoothNumber: selectedBooth[0].BoothNumber\r\n }\r\n this.selectedBoothsForRental.push(selectedBoothsForRental);\r\n }\r\n }\r\n else if (this.rentalType == \"W\") {\r\n if (!boothSelectedByOtherUser) {\r\n this.LayoutData.weeklyRentalMarketDays.map((el, i) => {\r\n var selectedBooth = this.allBooths.filter(e => e.BoothNumber == args.properties.annotations[0].properties.content);\r\n var marketDay;\r\n switch (el) {\r\n case 1: marketDay = 'Sun'\r\n break;\r\n case 2: marketDay = 'Mon'\r\n break;\r\n case 3: marketDay = 'Tue'\r\n break;\r\n case 4: marketDay = 'Wed'\r\n break;\r\n case 5: marketDay = 'Thu'\r\n break;\r\n case 6: marketDay = 'Fri'\r\n break;\r\n case 7: marketDay = 'Sat'\r\n break;\r\n }\r\n var selectedRentalDates = [];\r\n const startDate = new Date(this.LayoutData.weeklyRentalStartDate.split(\"-\")[0]);\r\n const endDate = new Date(this.LayoutData.weeklyRentalEndDate.split(\"-\")[1]);\r\n const selectedDayOfWeek = el - 1;\r\n while (new Date(startDate) <= new Date(endDate)) {\r\n if (startDate.getDay() === selectedDayOfWeek) {\r\n selectedRentalDates.push(this.datePipe.transform(new Date(startDate), 'MMM d, y'));\r\n }\r\n startDate.setDate(startDate.getDate() + 1);\r\n }\r\n this.selectedBoothData.push(\r\n {\r\n BoothNumber: selectedBooth[0].BoothNumber,\r\n BoothType: selectedBooth[0].BoothType,\r\n BoothTypeId: selectedBooth[0].BoothTypeId,\r\n BoothDescription: selectedBooth[0].BoothDescription,\r\n Sunday: el == 1 ? true : false,\r\n Monday: el == 2 ? true : false,\r\n Tuesday: el == 3 ? true : false,\r\n Wednesday: el == 4 ? true : false,\r\n Thursday: el == 5 ? true : false,\r\n Friday: el == 6 ? true : false,\r\n Saturday: el == 7 ? true : false,\r\n MarketDay: marketDay\r\n });\r\n this.insertDataToTemp(selectedBooth[0].BoothNumber, selectedRentalDates[0], selectedRentalDates[selectedRentalDates.length - 1], '');\r\n var selectedBoothsForCWRental = {\r\n BoothNumber: selectedBooth[0].BoothNumber,\r\n StartDate: selectedRentalDates[0],\r\n EndDate: selectedRentalDates[selectedRentalDates.length - 1],\r\n Monday: this.LayoutData.Monday ? true : false,\r\n Tuesday: this.LayoutData.Tuesday ? true : false,\r\n Wednesday: this.LayoutData.Wednesday ? true : false,\r\n Thursday: this.LayoutData.Thursday ? true : false,\r\n Friday: this.LayoutData.Friday ? true : false,\r\n Saturday: this.LayoutData.Saturday ? true : false,\r\n Sunday: this.LayoutData.Sunday ? true : false\r\n }\r\n this.selectedBoothsForRental.push(selectedBoothsForCWRental);\r\n this.noboothSelected = this.selectedBoothData.length > 0 ? false : true;\r\n });\r\n this.noboothSelected = this.selectedBoothData.length > 0 ? false : true;\r\n }\r\n }\r\n else if (this.rentalType == \"CW\") {\r\n if (!boothSelectedByOtherUser) {\r\n var selectedBooth = this.allBooths.filter(e => e.BoothNumber == args.properties.annotations[0].properties.content);\r\n const rentalDates = [];\r\n const currentWeekRentalDates = [];\r\n var marketDays = 0;\r\n this.LayoutData.weeklyRentalMarketDays.map((el, i) => {\r\n const startDate = new Date(this.LayoutData.weeklyRentalStartDate.split(\"-\")[0]);\r\n const endDate = new Date(this.LayoutData.weeklyRentalEndDate.split(\"-\")[1]);\r\n const currentWeekEnd = new Date(this.LayoutData.weeklyRentalStartDate.split(\"-\")[1]);\r\n const selectedDayOfWeek = el - 1;\r\n const today: Date = new Date(new Date().toDateString())\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay >= today) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n currentDay = new Date(startDate);\r\n while (currentDay <= currentWeekEnd) {\r\n if (currentDay >= today) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n marketDays += 1;\r\n currentWeekRentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates);\r\n });\r\n this.selectedBoothData.push(\r\n {\r\n BoothNumber: selectedBooth[0].BoothNumber,\r\n BoothType: selectedBooth[0].BoothType,\r\n BoothTypeId: selectedBooth[0].BoothTypeId,\r\n BoothDescription: selectedBooth[0].BoothDescription,\r\n Sunday: this.LayoutData.weeklyRentalMarketDays.includes(1) ? true : false,\r\n Monday: this.LayoutData.weeklyRentalMarketDays.includes(2) ? true : false,\r\n Tuesday: this.LayoutData.weeklyRentalMarketDays.includes(3) ? true : false,\r\n Wednesday: this.LayoutData.weeklyRentalMarketDays.includes(4) ? true : false,\r\n Thursday: this.LayoutData.weeklyRentalMarketDays.includes(5) ? true : false,\r\n Friday: this.LayoutData.weeklyRentalMarketDays.includes(6) ? true : false,\r\n Saturday: this.LayoutData.weeklyRentalMarketDays.includes(7) ? true : false,\r\n RentalEndDate: rentalDates[rentalDates.length - 1].startDate,\r\n NoOfMarketDays: marketDays,\r\n StartDateList: currentWeekRentalDates,\r\n });\r\n this.insertDataToTemp(selectedBooth[0].BoothNumber, rentalDates[0].startDate, rentalDates[rentalDates.length - 1].startDate, '');\r\n var selectedBoothsForCWRental = {\r\n BoothNumber: selectedBooth[0].BoothNumber,\r\n StartDate: rentalDates[0].startDate,\r\n EndDate: rentalDates[rentalDates.length - 1].startDate,\r\n Monday: this.LayoutData.Monday ? true : false,\r\n Tuesday: this.LayoutData.Tuesday ? true : false,\r\n Wednesday: this.LayoutData.Wednesday ? true : false,\r\n Thursday: this.LayoutData.Thursday ? true : false,\r\n Friday: this.LayoutData.Friday ? true : false,\r\n Saturday: this.LayoutData.Saturday ? true : false,\r\n Sunday: this.LayoutData.Sunday ? true : false\r\n }\r\n this.selectedBoothsForRental.push(selectedBoothsForCWRental);\r\n this.noboothSelected = this.selectedBoothData.length > 0 ? false : true;\r\n }\r\n }\r\n else if (this.rentalType == \"M\") {\r\n if (!boothSelectedByOtherUser) {\r\n var marketDay;\r\n const rentalDates = [];\r\n const currentMonthRentalDates = [];\r\n this.LayoutData.monthlyRentalMarketDays.map((el, i) => {\r\n var selectedBooth = this.allBooths.filter(e => e.BoothNumber == args.properties.annotations[0].properties.content);\r\n var marketDay;\r\n switch (el) {\r\n case 1: marketDay = 'Sun'\r\n break;\r\n case 2: marketDay = 'Mon'\r\n break;\r\n case 3: marketDay = 'Tue'\r\n break;\r\n case 4: marketDay = 'Wed'\r\n break;\r\n case 5: marketDay = 'Thu'\r\n break;\r\n case 6: marketDay = 'Fri'\r\n break;\r\n case 7: marketDay = 'Sat'\r\n break;\r\n }\r\n var rentalstartDate = \"\";\r\n var marketDays = 0;\r\n const startDate = new Date(this.LayoutData.RentalStartDate);\r\n const endMonth = this.LayoutData.monthlyRentalEndDate\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n const endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n const currentMonthEnd = new Date(startDate.getFullYear(), startDate.getMonth() + 1, 0);\r\n\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n\r\n currentDay = new Date(startDate);\r\n while (currentDay <= currentMonthEnd) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n marketDays += 1;\r\n currentMonthRentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates);\r\n\r\n const compareCurrentMonthDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const currentMonthSortedDates = currentMonthRentalDates.sort(compareCurrentMonthDates);\r\n\r\n if (rentalstartDate) {\r\n this.selectedBoothData.push(\r\n {\r\n BoothNumber: selectedBooth[0].BoothNumber,\r\n BoothType: selectedBooth[0].BoothType,\r\n BoothTypeId: selectedBooth[0].BoothTypeId,\r\n BoothDescription: selectedBooth[0].BoothDescription,\r\n Sunday: el == 1 ? true : false,\r\n Monday: el == 2 ? true : false,\r\n Tuesday: el == 3 ? true : false,\r\n Wednesday: el == 4 ? true : false,\r\n Thursday: el == 5 ? true : false,\r\n Friday: el == 6 ? true : false,\r\n Saturday: el == 7 ? true : false,\r\n MarketDay: marketDay,\r\n RentalStartDate: rentalstartDate,\r\n NoOfMarketDays: marketDays,\r\n RentalEndDate: rentalDates[rentalDates.length - 1].startDate,\r\n StartDateList: currentMonthRentalDates,\r\n RentalStartDateYearMonth: this.LayoutData.RentalStartDateYearMonth\r\n });\r\n\r\n this.insertDataToTemp(selectedBooth[0].BoothNumber,rentalstartDate,rentalDates[rentalDates.length - 1].startDate,el);\r\n var selectedBoothsForRental = {\r\n BoothNumber: selectedBooth[0].BoothNumber,\r\n StartDate: rentalstartDate,\r\n EndDate: rentalDates[rentalDates.length - 1].startDate,\r\n Sunday: el == 1 ? true : false,\r\n Monday: el == 2 ? true : false,\r\n Tuesday: el == 3 ? true : false,\r\n Wednesday: el == 4 ? true : false,\r\n Thursday: el == 5 ? true : false,\r\n Friday: el == 6 ? true : false,\r\n Saturday: el == 7 ? true : false\r\n }\r\n this.selectedBoothsForRental.push(selectedBoothsForRental);\r\n }\r\n });\r\n this.noboothSelected = this.selectedBoothData.length > 0 ? false : true;\r\n }\r\n }\r\n else if (this.rentalType == \"CM\") {\r\n if (!boothSelectedByOtherUser) {\r\n var selectedBooth = this.allBooths.filter(e => e.BoothNumber == args.properties.annotations[0].properties.content);\r\n var marketDay;\r\n var marketDays = 0;\r\n const rentalDates = [];\r\n var currentMonthRentalDates = [];\r\n for (const el of this.LayoutData.monthlyRentalMarketDays) {\r\n var marketDay;\r\n const currentDate = new Date();\r\n const currentYear = currentDate.getFullYear();\r\n const currentMonth = currentDate.getMonth();\r\n var endDateYearMonth;\r\n const currentYearMonth = `${currentYear}${(currentMonth +1) < 10 ? '0' : ''}${(currentMonth +1)}`;\r\n var startDate = new Date(this.LayoutData.RentalStartDate);\r\n const endMonth = this.LayoutData.monthlyRentalEndDate\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n const rentalStartDateYear = startDate.getFullYear();\r\n const rentalStartDateMonth = startDate.getMonth() + 1;\r\n const rentalStartDateYearMonth = `${rentalStartDateYear}${rentalStartDateMonth < 10 ? '0' : ''}${rentalStartDateMonth}`;\r\n var endDate = new Date(endMonthYear, endMonthIndex + 1, 0); \r\n \r\n if (this.LayoutData.combinedMonthlyBookingEndDate) {\r\n const rentalEndDateYear = endDate.getFullYear();\r\n const rentalEndDateMonth = endDate.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n const response = await this.rentalService.GetSelectedMonthEndDate(rentalEndDateYearMonth,this.marketId).toPromise();\r\n endDate = new Date(response.MonthEndDateSelected);\r\n endDateYearMonth = rentalEndDateYearMonth;\r\n\r\n const rentalStartDate = new Date(startDate); \r\n var previousMonth = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() - 1)).getMonth() + 1;\r\n var PreviousMonthYear = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() - 1)).getFullYear();\r\n const PreviousMonthYearAndMonth = `${PreviousMonthYear}${previousMonth < 10 ? '0' : ''}${previousMonth}`;\r\n if (PreviousMonthYearAndMonth >= currentYearMonth) {\r\n const previousMonthEndDate = await this.rentalService.GetSelectedMonthEndDate(PreviousMonthYearAndMonth, this.marketId).toPromise();\r\n const monthEndDate = new Date(previousMonthEndDate.MonthEndDateSelected);\r\n const dateDiff = this.getDaysDifference(monthEndDate, new Date(startDate)); //calculates the diff between current month start date and previous monthend date \r\n if (dateDiff <= 7) {\r\n startDate = new Date(monthEndDate.setDate(monthEndDate.getDate() + 1));\r\n }\r\n }\r\n }\r\n\r\n var currentMonthEnd = new Date(startDate.getFullYear(), startDate.getMonth() + 1, 0);\r\n if (this.LayoutData.combinedMonthlyBookingEndDate) {\r\n const currentStartMonth = this.LayoutData.monthlyRentalStartDate;\r\n const [startMonthDate, startMonthYear] = currentStartMonth.split(' ');\r\n const startMonthIndex = this.getMonthIndex(startMonthDate);\r\n var currentMonthEnd = new Date(startMonthYear, startMonthIndex + 1, 0);\r\n const rentalEndDateYear = currentMonthEnd.getFullYear();\r\n const rentalEndDateMonth = currentMonthEnd.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n const response = await this.rentalService.GetSelectedMonthEndDate(rentalEndDateYearMonth, this.marketId).toPromise();\r\n if (rentalStartDateYearMonth == rentalEndDateYearMonth)\r\n currentMonthEnd = new Date(response.MonthEndDateSelected);\r\n }\r\n\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) { \r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n\r\n if (this.LayoutData.combinedMonthlyBookingEndDate) {\r\n currentDay = new Date(startDate);\r\n while (currentDay <= currentMonthEnd) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n currentMonthRentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates);\r\n\r\n if (this.LayoutData.combinedMonthlyBookingEndDate) {\r\n const compareCurrentMonthDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const currentMonthSortedDates = currentMonthRentalDates.sort(compareCurrentMonthDates);\r\n }\r\n else {\r\n currentMonthRentalDates = rentalDates;\r\n } \r\n }\r\n \r\n this.selectedBoothData.push(\r\n {\r\n BoothNumber: selectedBooth[0].BoothNumber,\r\n BoothType: selectedBooth[0].BoothType,\r\n BoothTypeId: selectedBooth[0].BoothTypeId,\r\n BoothDescription: selectedBooth[0].BoothDescription,\r\n Sunday: this.LayoutData.monthlyRentalMarketDays.includes(1) ? true : false,\r\n Monday: this.LayoutData.monthlyRentalMarketDays.includes(2) ? true : false,\r\n Tuesday: this.LayoutData.monthlyRentalMarketDays.includes(3) ? true : false,\r\n Wednesday: this.LayoutData.monthlyRentalMarketDays.includes(4) ? true : false,\r\n Thursday: this.LayoutData.monthlyRentalMarketDays.includes(5) ? true : false,\r\n Friday: this.LayoutData.monthlyRentalMarketDays.includes(6) ? true : false,\r\n Saturday: this.LayoutData.monthlyRentalMarketDays.includes(7) ? true : false,\r\n MarketDay: marketDay,\r\n RentalStartDate: this.datePipe.transform(new Date(this.LayoutData.RentalStartDate), 'MMM d, y'),\r\n NoOfMarketDays: marketDays,\r\n RentalEndDate: rentalDates[rentalDates.length - 1].startDate,\r\n StartDateList: currentMonthRentalDates,\r\n AllRentalDates:rentalDates.map(el => new Date(el.startDate))\r\n });\r\n\r\n this.insertDataToTemp(selectedBooth[0].BoothNumber, rentalDates[0].startDate, rentalDates[rentalDates.length - 1].startDate, '');\r\n var selectedBoothsForCMRental = {\r\n BoothNumber: selectedBooth[0].BoothNumber,\r\n StartDate: rentalDates[0].startDate,\r\n EndDate: rentalDates[rentalDates.length - 1].startDate,\r\n Monday: this.LayoutData.Monday ? true : false,\r\n Tuesday: this.LayoutData.Tuesday ? true : false,\r\n Wednesday: this.LayoutData.Wednesday ? true : false,\r\n Thursday: this.LayoutData.Thursday ? true : false,\r\n Friday: this.LayoutData.Friday ? true : false,\r\n Saturday: this.LayoutData.Saturday ? true : false,\r\n Sunday: this.LayoutData.Sunday ? true : false\r\n }\r\n this.selectedBoothsForRental.push(selectedBoothsForCMRental);\r\n this.noboothSelected = this.selectedBoothData.length > 0 ? false : true;\r\n }\r\n }\r\n }\r\n else if (this.rentalType == \"D\") {\r\n var markedNodeId = nodeId.replace(\"&\",\"_amper_\") + \"mark\";\r\n const selectedNode = this.diagram.getObject(markedNodeId) as NodeModel;\r\n var boothCount = 0;\r\n this.sharedDataService.dailyRentalSelectedDays.map(date => {\r\n const boothRecord = this.sharedDataService.dailyRentalSelectedBooths.filter(selectedBooth => selectedBooth.BoothNumber === this.BoothNumber && selectedBooth.RentalDay == this.datePipe.transform(date, 'MM/dd/yyy'));\r\n if (boothRecord.length > 0) {\r\n boothCount += 1;\r\n }\r\n });\r\n\r\n if (boothCount != 0) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to delete the selected Booth?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n this.sharedDataService.dailyRentalSelectedDays.map(date => {\r\n const index = this.sharedDataService.dailyRentalSelectedBooths.findIndex(selectedBooth => selectedBooth.BoothNumber === this.BoothNumber && selectedBooth.RentalDay == this.datePipe.transform(date, 'MM/dd/yyy'));\r\n if (index != -1) {\r\n this.diagram.remove(selectedNode);\r\n this.removeBoothCharges.emit(this.sharedDataService.dailyRentalSelectedBooths[index]);\r\n this.sharedDataService.dailyRentalSelectedBooths.splice(index, 1);\r\n this.selectedBoothData.splice(boothIndex, 1);\r\n this.noboothSelected = this.selectedBoothData.length > 0 ? false : true;\r\n }\r\n else {\r\n const temp = {\r\n TempRecordNo: this.sharedDataService.tempRecordNo.toString(),\r\n BoothNumber: this.BoothNumber,\r\n StartDate: new Date(date),\r\n RentalType: 1\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n }\r\n });\r\n }\r\n });\r\n }\r\n else {\r\n this.diagram.remove(selectedNode);\r\n this.selectedBoothData.splice(boothIndex, 1);\r\n this.noboothSelected = this.selectedBoothData.length > 0 ? false : true;\r\n this.sharedDataService.dailyRentalSelectedDays.map(date => {\r\n const temp = {\r\n TempRecordNo: this.sharedDataService.tempRecordNo.toString(),\r\n BoothNumber: this.BoothNumber,\r\n StartDate: new Date(date),\r\n RentalType: 1\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n });\r\n }\r\n }\r\n\r\n else if (this.rentalType == \"M\") {\r\n var markedNodeId = nodeId.replace(\"&\",\"_amper_\") + \"mark\";\r\n const selectedNode = this.diagram.getObject(markedNodeId) as NodeModel;\r\n const index = this.LayoutData.monthlyRentalSelectedBooths.findIndex(selectedBooth => selectedBooth.BoothNumber === this.BoothNumber && selectedBooth.RentStartPeriod == this.LayoutData.monthlyRentalSelectedBooths[0].RentStartPeriod && selectedBooth.RentEndPeriod == this.LayoutData.monthlyRentalSelectedBooths[0].RentEndPeriod);\r\n if (index != -1) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to delete the selected Booth?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n this.diagram.remove(selectedNode);\r\n this.removeBoothCharges.emit(this.LayoutData.monthlyRentalSelectedBooths[index]);\r\n this.LayoutData.monthlyRentalSelectedBooths.splice(index, 1);\r\n this.selectedBoothData.splice(boothIndex, 1);\r\n this.noboothSelected = this.selectedBoothData.length > 0 ? false : true;\r\n const startDate = new Date(this.LayoutData.RentalStartDate);\r\n const endMonth = this.LayoutData.monthlyRentalEndDate\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n const endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n \r\n this.LayoutData.monthlyRentalMarketDays.map((el, i) => {\r\n const rentalDates=[];\r\n var rentalstartDate = \"\";\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n const compareDates =(a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates);\r\n const temp = {\r\n TempRecordNo: this.LayoutData.tempRecordNo.toString(),\r\n BoothNumber: this.BoothNumber,\r\n StartDate: new Date(rentalstartDate),\r\n RentalType: 2,\r\n EndDate: new Date(rentalDates[rentalDates.length-1].startDate),\r\n Sunday: el == 1 ? true : false,\r\n Monday: el == 2 ? true : false,\r\n Tuesday: el == 3 ? true : false,\r\n Wednesday: el == 4 ? true : false,\r\n Thursday: el == 5 ? true : false,\r\n Friday: el == 6 ? true : false,\r\n Saturday: el == 7 ? true : false\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n });\r\n }\r\n });\r\n }\r\n else {\r\n this.diagram.remove(selectedNode);\r\n this.selectedBoothData.splice(boothIndex, 1);\r\n this.noboothSelected = this.selectedBoothData.length > 0 ? false : true;\r\n const startDate = new Date(this.LayoutData.RentalStartDate);\r\n const endMonth = this.LayoutData.monthlyRentalEndDate\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n const endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n \r\n this.LayoutData.monthlyRentalMarketDays.map((el, i) => {\r\n const rentalDates=[];\r\n var rentalstartDate = \"\";\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n const compareDates =(a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates);\r\n const temp = {\r\n TempRecordNo: this.LayoutData.tempRecordNo.toString(),\r\n BoothNumber: this.BoothNumber,\r\n StartDate: new Date(rentalstartDate),\r\n RentalType: 2,\r\n EndDate: new Date(rentalDates[rentalDates.length-1].startDate),\r\n Sunday: el == 1 ? true : false,\r\n Monday: el == 2 ? true : false,\r\n Tuesday: el == 3 ? true : false,\r\n Wednesday: el == 4 ? true : false,\r\n Thursday: el == 5 ? true : false,\r\n Friday: el == 6 ? true : false,\r\n Saturday: el == 7 ? true : false\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n });\r\n }\r\n }\r\n\r\n else if (this.rentalType == \"CW\") {\r\n var markedNodeId = nodeId.replace(\"&\",\"_amper_\") + \"mark\";\r\n const selectedNode = this.diagram.getObject(markedNodeId) as NodeModel;\r\n const index = this.LayoutData.weeklyRentalSelectedBooths.findIndex(selectedBooth => selectedBooth.BoothNumber === this.BoothNumber && selectedBooth.RentStartPeriod == this.LayoutData.weeklyRentalSelectedBooths[0].RentStartPeriod && selectedBooth.RentEndPeriod == this.LayoutData.weeklyRentalSelectedBooths[0].RentEndPeriod);\r\n if (index != -1) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to delete the selected Booth?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n this.diagram.remove(selectedNode);\r\n this.removeBoothCharges.emit(this.LayoutData.weeklyRentalSelectedBooths[index]);\r\n this.LayoutData.weeklyRentalSelectedBooths.splice(index, 1);\r\n this.selectedBoothData.splice(boothIndex, 1);\r\n this.noboothSelected = this.selectedBoothData.length > 0 ? false : true;\r\n const rentalDates = [];\r\n var rentedBoothDates = [];\r\n var rentalstartDate;\r\n const startDate = new Date(this.LayoutData.weeklyRentalStartDate.split(\"-\")[0]);\r\n const endDate = new Date(this.LayoutData.weeklyRentalEndDate.split(\"-\")[1]);\r\n this.LayoutData.weeklyRentalMarketDays.map((el, i) => {\r\n const selectedDayOfWeek = el - 1;\r\n const today: Date = new Date(new Date().toDateString())\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay >= today) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n });\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates);\r\n const temp = {\r\n TempRecordNo: this.LayoutData.tempRecordNo.toString(),\r\n BoothNumber: this.BoothNumber,\r\n StartDate: new Date(rentalDates[0].startDate),\r\n RentalType: 5,\r\n EndDate: new Date(rentalDates[rentalDates.length - 1].startDate),\r\n Monday: this.LayoutData.Monday ? true : false,\r\n Tuesday: this.LayoutData.Tuesday ? true : false,\r\n Wednesday: this.LayoutData.Wednesday ? true : false,\r\n Thursday: this.LayoutData.Thursday ? true : false,\r\n Friday: this.LayoutData.Friday ? true : false,\r\n Saturday: this.LayoutData.Saturday ? true : false,\r\n Sunday: this.LayoutData.Sunday ? true : false\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n }\r\n });\r\n }\r\n else {\r\n this.diagram.remove(selectedNode);\r\n this.selectedBoothData.splice(boothIndex, 1);\r\n this.noboothSelected = this.selectedBoothData.length > 0 ? false : true;\r\n const rentalDates = [];\r\n var rentedBoothDates = [];\r\n var rentalstartDate;\r\n const startDate = new Date(this.LayoutData.weeklyRentalStartDate.split(\"-\")[0]);\r\n const endDate = new Date(this.LayoutData.weeklyRentalEndDate.split(\"-\")[1]);\r\n this.LayoutData.weeklyRentalMarketDays.map((el, i) => {\r\n const selectedDayOfWeek = el - 1;\r\n const today: Date = new Date(new Date().toDateString())\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay >= today) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n });\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates);\r\n const temp = {\r\n TempRecordNo: this.LayoutData.tempRecordNo.toString(),\r\n BoothNumber: this.BoothNumber,\r\n StartDate: new Date(rentalDates[0].startDate),\r\n RentalType: 5,\r\n EndDate: new Date(rentalDates[rentalDates.length - 1].startDate),\r\n Monday: this.LayoutData.Monday ? true : false,\r\n Tuesday: this.LayoutData.Tuesday ? true : false,\r\n Wednesday: this.LayoutData.Wednesday ? true : false,\r\n Thursday: this.LayoutData.Thursday ? true : false,\r\n Friday: this.LayoutData.Friday ? true : false,\r\n Saturday: this.LayoutData.Saturday ? true : false,\r\n Sunday: this.LayoutData.Sunday ? true : false\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n }\r\n }\r\n\r\n else if (this.rentalType == \"CM\") {\r\n var markedNodeId = nodeId.replace(\"&\",\"_amper_\") + \"mark\";\r\n const selectedNode = this.diagram.getObject(markedNodeId) as NodeModel;\r\n const index = this.LayoutData.monthlyRentalSelectedBooths.findIndex(selectedBooth => selectedBooth.BoothNumber === this.BoothNumber && selectedBooth.RentStartPeriod == this.LayoutData.monthlyRentalSelectedBooths[0].RentStartPeriod && selectedBooth.RentEndPeriod == this.LayoutData.monthlyRentalSelectedBooths[0].RentEndPeriod);\r\n if (index != -1) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to delete the selected Booth?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n this.diagram.remove(selectedNode);\r\n this.removeBoothCharges.emit(this.LayoutData.monthlyRentalSelectedBooths[index]);\r\n this.LayoutData.monthlyRentalSelectedBooths.splice(index, 1);\r\n this.selectedBoothData.splice(boothIndex, 1);\r\n this.noboothSelected = this.selectedBoothData.length > 0 ? false : true;\r\n const startDate = new Date(this.LayoutData.RentalStartDate);\r\n const endMonth = this.LayoutData.monthlyRentalEndDate\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n const endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n const rentalDates = [];\r\n var rentalstartDate = \"\";\r\n this.LayoutData.monthlyRentalMarketDays.map((el, i) => {\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n });\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates);\r\n const temp = {\r\n TempRecordNo: this.LayoutData.tempRecordNo.toString(),\r\n BoothNumber: this.BoothNumber,\r\n StartDate: new Date(rentalDates[0].startDate),\r\n RentalType: 4,\r\n EndDate: new Date(rentalDates[rentalDates.length - 1].startDate),\r\n Monday: this.LayoutData.Monday ? true : false,\r\n Tuesday: this.LayoutData.Tuesday ? true : false,\r\n Wednesday: this.LayoutData.Wednesday ? true : false,\r\n Thursday: this.LayoutData.Thursday ? true : false,\r\n Friday: this.LayoutData.Friday ? true : false,\r\n Saturday: this.LayoutData.Saturday ? true : false,\r\n Sunday: this.LayoutData.Sunday ? true : false\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n ); \r\n }\r\n });\r\n }\r\n else {\r\n this.diagram.remove(selectedNode);\r\n this.selectedBoothData.splice(boothIndex, 1);\r\n this.noboothSelected = this.selectedBoothData.length > 0 ? false : true;\r\n const startDate = new Date(this.LayoutData.RentalStartDate);\r\n const endMonth = this.LayoutData.monthlyRentalEndDate\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n const endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n const rentalDates = [];\r\n rentalstartDate = \"\";\r\n this.LayoutData.monthlyRentalMarketDays.map((el, i) => {\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates);\r\n });\r\n const temp = {\r\n TempRecordNo: this.LayoutData.tempRecordNo.toString(),\r\n BoothNumber: this.BoothNumber,\r\n StartDate: new Date(rentalDates[0].startDate),\r\n RentalType: 4,\r\n EndDate: new Date(rentalDates[rentalDates.length - 1].startDate),\r\n Monday: this.LayoutData.Monday ? true : false,\r\n Tuesday: this.LayoutData.Tuesday ? true : false,\r\n Wednesday: this.LayoutData.Wednesday ? true : false,\r\n Thursday: this.LayoutData.Thursday ? true : false,\r\n Friday: this.LayoutData.Friday ? true : false,\r\n Saturday: this.LayoutData.Saturday ? true : false,\r\n Sunday: this.LayoutData.Sunday ? true : false\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n }\r\n }\r\n });\r\n };\r\n }\r\n }\r\n \r\n async getMonthEndingDateFromSetting(rentalYearMonth: string): Promise {\r\n if (this.monthEndDateCache.has(rentalYearMonth)) {\r\n return this.monthEndDateCache.get(rentalYearMonth);\r\n }\r\n const response = await this.rentalService.GetSelectedMonthEndDate(rentalYearMonth, this.marketId).toPromise();\r\n if (response) {\r\n const monthEndDate = new Date(response.MonthEndDateSelected);\r\n this.monthEndDateCache.set(rentalYearMonth, monthEndDate);\r\n return monthEndDate;\r\n }\r\n else {\r\n return null\r\n }\r\n }\r\n\r\n getDaysDifference(date1: Date, date2: Date): number {\r\n // Normalize both dates to start of the day (midnight)\r\n const start = new Date(date1.getFullYear(), date1.getMonth(), date1.getDate());\r\n const end = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());\r\n // Calculate the difference in time (milliseconds)\r\n const timeDiff = Math.abs(end.getTime() - start.getTime());\r\n // Convert time difference from milliseconds to days\r\n const dayDiff = Math.ceil(timeDiff / (1000 * 3600 * 24));\r\n return dayDiff;\r\n }\r\n\r\n insertDataToTemp(BoothNumber, RentalStartDate, RentalEndDate, el) {\r\n var tempData = [];\r\n if (this.rentalType == \"D\") {\r\n this.sharedDataService.dailyRentalSelectedDays.forEach(date => {\r\n tempData.push({\r\n BoothNo: BoothNumber,\r\n TempRecordNo: this.sharedDataService.tempRecordNo.toString(),\r\n StartDate: new Date(date),\r\n EndDate: new Date(date),\r\n Sunday: new Date(date).getDay() == 0 ? true : false,\r\n Monday: new Date(date).getDay() == 1 ? true : false,\r\n Tuesday: new Date(date).getDay() == 2 ? true : false,\r\n Wednesday: new Date(date).getDay() == 3 ? true : false,\r\n Thursday: new Date(date).getDay() == 4 ? true : false,\r\n Friday: new Date(date).getDay() == 5 ? true : false,\r\n Saturday: new Date(date).getDay() == 6 ? true : false,\r\n RentalRenewal: true,\r\n BoothSearch: true,\r\n IsOnline: false\r\n });\r\n });\r\n } else if (this.rentalType == \"M\") {\r\n tempData.push({\r\n BoothNo: BoothNumber,\r\n TempRecordNo: this.LayoutData.tempRecordNo.toString(),\r\n StartDate: new Date(RentalStartDate),\r\n EndDate: new Date(RentalEndDate),\r\n Sunday: el == 1 ? true : false,\r\n Monday: el == 2 ? true : false,\r\n Tuesday: el == 3 ? true : false,\r\n Wednesday: el == 4 ? true : false,\r\n Thursday: el == 5 ? true : false,\r\n Friday: el == 6 ? true : false,\r\n Saturday: el == 7 ? true : false,\r\n RentalRenewal: true,\r\n BoothSearch: true,\r\n IsOnline: false\r\n });\r\n } else if (this.rentalType == \"CM\") {\r\n tempData.push({\r\n BoothNo: BoothNumber,\r\n TempRecordNo: this.LayoutData.tempRecordNo.toString(),\r\n StartDate: new Date(RentalStartDate),\r\n EndDate: new Date(RentalEndDate),\r\n Monday: this.LayoutData.Monday ? true : false,\r\n Tuesday: this.LayoutData.Tuesday ? true : false,\r\n Wednesday: this.LayoutData.Wednesday ? true : false,\r\n Thursday: this.LayoutData.Thursday ? true : false,\r\n Friday: this.LayoutData.Friday ? true : false,\r\n Saturday: this.LayoutData.Saturday ? true : false,\r\n Sunday: this.LayoutData.Sunday ? true : false,\r\n RentalRenewal: true,\r\n BoothSearch: true,\r\n IsOnline: false\r\n });\r\n }\r\n else if (this.rentalType == \"CW\" || this.rentalType == \"W\") {\r\n tempData.push({\r\n BoothNo: BoothNumber,\r\n TempRecordNo: this.LayoutData.tempRecordNo.toString(),\r\n StartDate: new Date(RentalStartDate),\r\n EndDate: new Date(RentalEndDate),\r\n Monday: this.LayoutData.Monday ? true : false,\r\n Tuesday: this.LayoutData.Tuesday ? true : false,\r\n Wednesday: this.LayoutData.Wednesday ? true : false,\r\n Thursday: this.LayoutData.Thursday ? true : false,\r\n Friday: this.LayoutData.Friday ? true : false,\r\n Saturday: this.LayoutData.Saturday ? true : false,\r\n Sunday: this.LayoutData.Sunday ? true : false,\r\n RentalRenewal: true,\r\n BoothSearch: true,\r\n IsOnline: false\r\n });\r\n }\r\n this.subscriptions.push(this.rentalService.insertDataToTemp(tempData).subscribe((res: any) => {\r\n }));\r\n }\r\n\r\n getMonthIndex(monthString: string): number {\r\n const months = [\r\n 'January', 'February', 'March', 'April', 'May', 'June',\r\n 'July', 'August', 'September', 'October', 'November', 'December'\r\n ];\r\n const monthIndex = months.findIndex(month => month.toLowerCase() === monthString.toLowerCase());\r\n return monthIndex !== -1 ? monthIndex : 0;\r\n }\r\n\r\n getBuildingForLayout() {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.allExistingBuilding = [];\r\n const sub = this.marketInfoService.getBuildingAreasInLayOut(this.partId, this.marketId).subscribe((res: any) => {\r\n this.allExistingBuilding = res;\r\n let data = res;\r\n if (data.length > 0) {\r\n for(const item of data){\r\n const nodeId = 'node_building' + item.BuildingId;\r\n const diagramNode: NodeModel = {\r\n id: nodeId,\r\n shape: {\r\n type: 'Basic',\r\n shape: this.boothShapes.filter(e => e.Id == item.ShapeId)[0].Name\r\n },\r\n style: {\r\n fill: item.BuildingBackColor != 0 ? this.convertColor(item.BuildingBackColor) : \"#000\",\r\n strokeColor: item.BuildingBackColor != 0 ? this.convertColor(item.BuildingBorderColor) : \"#000\",\r\n strokeWidth: 1,\r\n fontSize: item.BuildingFontSize,\r\n textWrapping: 'Wrap',\r\n fontFamily: this.fontName.filter(e => e.Id == item.BuildingFontNameId)[0].Name\r\n },\r\n annotations:\r\n [{\r\n content: item.Caption,\r\n style: {\r\n fontSize: item.BuildingFontSize,\r\n fontFamily: this.fontName.filter(e => e.Id == item.BuildingFontNameId)[0].Name,\r\n textWrapping: 'Wrap',\r\n bold: this.fontStyle.filter(e => e.Id == item.BuildingFontStyleId)[0].Name.toLowerCase().includes('bold'),\r\n italic: this.fontStyle.filter(e => e.Id == item.BuildingFontStyleId)[0].Name.toLowerCase().includes('italic')\r\n },\r\n constraints: AnnotationConstraints.ReadOnly\r\n }],\r\n width: item.BuildingWidth * 3,\r\n height: item.BuildingLength * 3,\r\n addInfo: {\r\n allowDrag: false, // Enable drag-and-drop for this shape\r\n id: item.BuildingId,\r\n name: 'building'\r\n },\r\n constraints: NodeConstraints.Default & ~(NodeConstraints.Drag),\r\n offsetX: item.LeftCoordinate,\r\n offsetY: item.TopCoordinate,\r\n rotateAngle: item.BuildingVerticalDisplay == true ? 90 : 0\r\n };\r\n this.diagram.add(diagramNode);\r\n }\r\n this.diagram.fitToPage();\r\n if (this.defaultZoomFactor) {\r\n let zoomOptions: ZoomOptions = {\r\n type: 'ZoomIn',\r\n zoomFactor: this.defaultZoomFactor\r\n };\r\n this.diagram.zoomTo(zoomOptions);\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getImagesForLayout() {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.marketInfoService.getLayoutImages(this.partId, this.marketId).subscribe((response: any) => {\r\n if (response) {\r\n let data = response;\r\n if (data.length > 0) {\r\n\r\n for (let i = 0; i < data.length; i++) {\r\n let node = {\r\n id: 'node_images' + data[i].ImagesForLayoutId,\r\n addInfo: {\r\n status: this.layoutImages.filter(e => e.ImageId == data[i].LayoutImagesId)[0].ImagePath,\r\n id: data[i].ImagesForLayoutId,\r\n name: \"image\",\r\n ImageId: data[i].LayoutImagesId,\r\n },\r\n style: {\r\n strokeWidth: 0\r\n },\r\n annotations: [\r\n {\r\n // content: this.layoutImages.filter(e => e.ImageId == data[i].LayoutImagesId)[0].ImageName,\r\n constraints: AnnotationConstraints.ReadOnly,\r\n offset: { x: 0.05, y: -0.07 }\r\n }\r\n ],\r\n constraints: NodeConstraints.Default & ~(NodeConstraints.Drag),\r\n shape: { type: 'Image', shape: 'Image' } as ImageModel, // Type assertion to ImageModel\r\n width: data[i].ImageWidth * 3,\r\n height: data[i].ImageLength * 3,\r\n offsetX: data[i].ImageLeftCoordinate,\r\n offsetY: data[i].ImageTopCoordinate,\r\n };\r\n\r\n if ((node.shape as { type: string }).type === 'Image') {\r\n (node.shape as ImageModel).source = node.addInfo.status;\r\n }\r\n\r\n this.diagram.add(node);\r\n }\r\n this.diagram.fitToPage();\r\n if (this.defaultZoomFactor) {\r\n let zoomOptions: ZoomOptions = {\r\n type: 'ZoomIn',\r\n zoomFactor: this.defaultZoomFactor\r\n };\r\n this.diagram.zoomTo(zoomOptions);\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n }\r\n\r\n getImages() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.marketInfoService.getImages().subscribe((res: any) => {\r\n if (res) {\r\n this.layoutImages = res;\r\n let data = this.layoutImages;\r\n if (this.layoutImages.length > 0) {\r\n for (let i = 0; i < this.layoutImages.length; i++) {\r\n const nodeId = 'node_' + data[i].ImageId;\r\n let node = {\r\n id: nodeId, addInfo: {\r\n status: data[i].ImagePath, id: 'z' + data[i].ImageId, name: \"image\", ImageId: data[i].ImageId,\r\n },\r\n annotations: [{ content: data[i].ImageName, constraints: AnnotationConstraints.ReadOnly, offset: { x: 0.5, y: -0.07 } }],\r\n shape: { type: 'Image', shape: 'Image' },\r\n width: 50, height: 50, offsetX: 50, offsetY: 50,\r\n };\r\n if (node.shape.type === 'Image') {\r\n (node.shape as ImageModel).source = node.addInfo.status;\r\n }\r\n this.images.push(node);\r\n }\r\n\r\n this.palettes = [\r\n {\r\n id: 'Images',\r\n expanded: true,\r\n symbols: this.images,\r\n title: 'Images'\r\n },\r\n ]\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n layoutZoomInClick(event) {\r\n let zoomOptions: ZoomOptions = {\r\n type: \"ZoomIn\",\r\n zoomFactor: 0.2\r\n }\r\n if (event.detail > 0) {\r\n this.diagram.zoomTo(zoomOptions)\r\n }\r\n }\r\n\r\n layoutZoomOutClick(flag = false) {\r\n let zoomOptions: ZoomOptions = {\r\n type: \"ZoomOut\",\r\n zoomFactor: 0.2\r\n }\r\n if (flag) {\r\n this.diagram.zoomTo(zoomOptions)\r\n }\r\n }\r\n \r\n searchNodes(): void {\r\n const nodes = this.diagram.nodes as any[];\r\n var nodeExist = false\r\n this.stopBlinking();\r\n if (this.layoutForm.controls['layoutDiagramFilter'].value['searchBooth']) {\r\n nodes.forEach(node => {\r\n if (node.properties.addInfo.name == \"booth\") {\r\n if (node.annotations && node.annotations[0].content.toLowerCase() == this.layoutForm.controls['layoutDiagramFilter'].value['searchBooth'].toLowerCase()) {\r\n this.blinkingNode = node.id;\r\n this.startBlinking();\r\n nodeExist = true;\r\n }\r\n }\r\n });\r\n if (!nodeExist)\r\n // this.toastr.warning($localize`There is no space having this number`, $localize`Error`, this.toasterConfig);\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`There is no booth having this number`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Please enter the booth number to search`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n }\r\n\r\n changeSearchText() {\r\n if (this.layoutForm.controls['layoutDiagramFilter'].value['searchBooth'] == '') {\r\n this.stopBlinking();\r\n }\r\n }\r\n\r\n startBlinking(): void {\r\n this.stopBlinking(); // Ensure no previous intervals are running\r\n\r\n this.blinkInterval = setInterval(() => {\r\n const node = this.diagram.getObject(this.blinkingNode) as NodeModel;\r\n if (node) {\r\n node.style.fill = node.style.fill === 'red' ? 'transparent' : 'red';\r\n }\r\n }, 500); // Blink every 500 milliseconds\r\n\r\n setTimeout(() => {\r\n this.stopBlinking();\r\n this.layoutForm.controls['layoutDiagramFilter'].get('searchBooth').setValue('');\r\n }, 5000); // Stop blinking after 5 seconds\r\n }\r\n\r\n stopBlinking(): void {\r\n if (this.blinkInterval) {\r\n clearInterval(this.blinkInterval);\r\n this.blinkInterval = null;\r\n\r\n const node = this.diagram.getObject(this.blinkingNode) as NodeModel;\r\n if (node) {\r\n const nodeId = node.id.replace(\"node_\",\"\");\r\n const boothData = this.allBooths.find(item => item.BoothNumber == nodeId);\r\n if (boothData) {\r\n const fontColor = boothData.Status.toLowerCase() == \"r\" ? \"#fff\" : \"#000\";\r\n node.style.fill = this.convertColor(boothData.BackColor);\r\n node.style.strokeColor = this.convertColor(boothData.BorderColor);\r\n }\r\n }\r\n }\r\n }\r\n \r\n ngOnDestroy(): void {\r\n this.subscriptions.forEach((subscription) => {\r\n if (subscription) {\r\n subscription.unsubscribe();\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n * Select Market Day(s) Here\r\n
\r\n
    \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
\r\n
\r\n
\r\n
\r\n Rental Day(s):\r\n
\r\n
    \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
Other Charges
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
ItemsBooth#ChargesQtyTotalReference
\r\n \r\n \r\n {{item.OtherItem}}\r\n \r\n \r\n \r\n \r\n \r\n {{item.OtherItemtotal}}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n
{{ResaleOrBusinessHeader}}
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { DatePipe } from '@angular/common';\r\nimport { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, Renderer2, ViewChild } from '@angular/core';\r\nimport { FormBuilder, FormGroup } from '@angular/forms';\r\nimport { ActivatedRoute, Params, Router } from '@angular/router';\r\nimport { GridComponent, SortSettingsModel } from '@syncfusion/ej2-angular-grids';\r\nimport { forkJoin, Subscription } from 'rxjs';\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\nimport { RentalService } from 'src/app/services/Rental.service';\r\nimport { VendorService } from 'src/app/services/Vendor.service';\r\nimport { customCurrencyPipe } from 'src/app/Shared/customCurrency.pipe';\r\nimport Swal from 'sweetalert2';\r\nimport { SharedDataService } from 'src/app/Shared/SharedData.service';\r\ndeclare var $: any;\r\nimport { DiscountType } from 'src/app/Shared/enum';\r\n\r\n@Component({\r\n selector: 'app-dailyrental-online',\r\n templateUrl: './dailyrental-online.component.html',\r\n styleUrls: ['./dailyrental-online.component.scss', '../rent-online.component.scss']\r\n})\r\nexport class DailyrentalOnlineComponent implements OnInit, OnDestroy {\r\n marketId;\r\n sunday = false;\r\n monday = false;\r\n isdirty = false;\r\n tuesday = false;\r\n wednesday = false;\r\n thursay = false;\r\n friday = false;\r\n saturday = false;\r\n @Input() newVendor;\r\n rentalForm: FormGroup;\r\n dailyMarketDays = [];\r\n exclusivedates = [];\r\n filteredMarketDays = [];\r\n ResaleOrBusinessHeader = \"\";\r\n private subscriptions: Subscription[] = [];\r\n public loaderIcon: Promise;\r\n defaultPart;\r\n parts = [];\r\n selectedDays: Set = new Set();\r\n vendorId;\r\n otherRentalCharges = [];\r\n otherItemList = [];\r\n displayOtherChargeByBooth;\r\n otherChargeMarketDay;\r\n otherItemSearchText;\r\n selectedOtherCharges = [];\r\n AllowRentingOtherItems = false;\r\n selectedOtherItems = [];\r\n OtherChargesPeriod = false;\r\n @ViewChild('modalOtherCharges', { static: false }) modalAddNewItems: ElementRef;\r\n @ViewChild('gridOtherRental', { static: false }) public gridOtherRental: GridComponent;\r\n @ViewChild('gridDailyRental', { static: false }) public gridDailyRental: GridComponent;\r\n @ViewChild('modalResaleNo', { static: false }) modalResaleNo: ElementRef;\r\n @ViewChild('modalDiscountPlans', { static: false }) modalDiscountPlans: ElementRef;\r\n @Output() isFormDirty = new EventEmitter(); \r\n @Output() isCancelClicked = new EventEmitter(); \r\n @Output() bookingFormCompleted = new EventEmitter(); \r\n @Output() rentalBookingData = new EventEmitter();\r\n @Output() resaleNoInputRequired = new EventEmitter();\r\n @Output() businessLicenseRequired = new EventEmitter();\r\n selectedBoothData = []\r\n allAvailableBooths = [];\r\n isboothSelected = true;\r\n defaultPartId;\r\n selectedBoothsForRental = [];\r\n tempRecordNo = 0;\r\n selectedMarketDays = [];\r\n selectedBooths = [];\r\n displayLayout = false;\r\n resaleAndBusiPopupDisable = true;\r\n layoutParts;\r\n warnExcessPayment = false;\r\n warnZeroPayment = false;\r\n ResaleNumberRequired = false;\r\n DaysSellWithoutResaleNumber;\r\n BusinessLicenseNumberRequired = false;\r\n DaysSellWithoutBusiLicNumber;\r\n displaySalesTax = false;\r\n displayCityTax = false;\r\n displayOtherChargeSalesTax = false;\r\n displayOtherChargeCityTax = false;\r\n exemptResale = false;\r\n resaleNo = \"\";\r\n resaleNoDisplay = false;\r\n businessLicenseDisplay = false;\r\n businessLicenseNumber;\r\n businessLicenseExpiryDate;\r\n vendorRentalDays = [];\r\n marketDayCountForResale = 0;\r\n resaleOptionSelected = false;\r\n DisplayPayDueDate = false;\r\n DisplaySpecificDate = false;\r\n DisplayOptionValue;\r\n vendorProducts;\r\n defaultProduct;\r\n totalRentalCharge = 0.00;\r\n totalOtherRentalCharge = 0.00;\r\n totalSalesTax = 0.00;\r\n totalSecondLeveltax = 0.00\r\n totalCharge = 0.00;\r\n priorBalance = 0.00;\r\n public textWrapSettings: any = { wrapMode: 'Both' }; // Enable text wrapping\r\n vendorDiscountPlans =[];\r\n disableDiscountAmount = true;\r\n totalDiscountCharge;\r\n secondTaxName = \"\";\r\n\r\n constructor(private renderer: Renderer2,\r\n private formbuilder: FormBuilder,\r\n private route: ActivatedRoute,\r\n public router: Router,\r\n public rentalService: RentalService,\r\n public vendorService: VendorService,\r\n private customCurrency: customCurrencyPipe,\r\n private datePipe: DatePipe,\r\n private sharedDataService: SharedDataService,\r\n private marketInfoService: MarketInfoService) {\r\n this.rentalForm = this.formbuilder.group({\r\n marketWeekSunday: [0],\r\n marketWeekMonday: [0],\r\n marketWeekTuesday: [0],\r\n marketWeekWednesday: [0],\r\n marketWeekThursday: [0],\r\n marketWeekFriday: [0],\r\n marketWeekSaturday: [0],\r\n marketParts: ['']\r\n })\r\n }\r\n sortOptions: SortSettingsModel = {\r\n columns: [{ field: 'RentalDay', direction: 'Ascending' }, { field: 'BoothNumber', direction: 'Ascending' }]\r\n };\r\n sortOtherItemsOptions: SortSettingsModel = {\r\n columns: [{ field: 'OtherItem', direction: 'Ascending' }, { field: 'BoothNo', direction: 'Ascending' }]\r\n };\r\n minExpiryDate = new Date();\r\n ngOnInit(): void \r\n {\r\n this.route.params.subscribe((params: Params) => {\r\n this.marketId = params['marketId'];\r\n this.vendorId = params['vendorId'];\r\n });\r\n this.generateTempRecordNumber(); \r\n this.getMarketDays();\r\n this.getVendorProducts();\r\n this.getParts();\r\n this.getMarketVendorSettings();\r\n this.getVendorBusinessLicenseSettings();\r\n this.getVendorBalances();\r\n this.getOtherRentalItems();\r\n if (this.sharedDataService.paymentSharedData)\r\n this.loadSelectedBooths();\r\n }\r\n\r\n getVendorProducts() {\r\n if(this.vendorId){\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.rentalService.GetVendorProductsById(this.marketId, this.vendorId).subscribe((res: any) => {\r\n if (res) {\r\n this.vendorProducts = res.body;\r\n this.defaultProduct = this.vendorProducts[0].ProductId;\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n }\r\n\r\n generateTempRecordNumber() {\r\n this.subscriptions.push(this.rentalService.generateTempRecordNumber(this.marketId).subscribe((response) => {\r\n if (response.Success) {\r\n this.tempRecordNo = response.Message;\r\n }\r\n }));\r\n }\r\n\r\n getVendorBalances() {\r\n this.vendorDiscountPlans =[];\r\n forkJoin({\r\n vendorBalanceRes: this.rentalService.getVendorBalances(this.vendorId, this.marketId),\r\n discountPlansRes: this.vendorService.GetDiscountPlan(this.vendorId,this.marketId)\r\n }).subscribe(\r\n ({ vendorBalanceRes, discountPlansRes }: any) => {\r\n if (vendorBalanceRes) {\r\n this.priorBalance = vendorBalanceRes.PriorBalance;\r\n }\r\n if(discountPlansRes){\r\n if (discountPlansRes) {\r\n for (const el of discountPlansRes) {\r\n if (el.Daily && el.OnlineTransactions) {\r\n const ob = {\r\n PlanSeqId: el.PlanSeqId,\r\n PlanId: el.PlanId,\r\n PlanName: el.PlanName,\r\n EffectiveFrom: this.datePipe.transform(el.EffectiveFrom, 'MM/dd/yyyy'),\r\n ExpiryDate: this.datePipe.transform(el.ExpiryDate, 'MM/dd/yyyy'),\r\n DiscountType: el.DiscountType == 0 ? DiscountType.Percentage : DiscountType.FixedAmount,\r\n DiscountValue: el.DiscountValue,\r\n OtherItems: el.OtherItems,\r\n Daily: el.Daily,\r\n Weekly: el.Weekly,\r\n Monthly: el.Monthly,\r\n CombinedWeekly: el.CombinedWeekly,\r\n CombinedMonthly: el.CombinedMonthly,\r\n IsExceedAmount: el.IsExceedAmount,\r\n ExceedAmount: el.ExceedAmount,\r\n BalanceDue: el.BalanceDue,\r\n Notes: el.Notes,\r\n QDR: el.QDR,\r\n CheckAll: el.Selected,\r\n AutoSelected: el.Selected,\r\n DisableDiscount: el.Selected,\r\n AppliedDiscount: this.customCurrency.transform(\"0.00\"),\r\n SalesTaxAmount: this.customCurrency.transform(\"0.00\"),\r\n SecondLevelTaxAmount: this.customCurrency.transform(\"0.00\"),\r\n SalesTaxApplied: el.SalesTax,\r\n SecondLevelTaxApplied: el.SecondLevelTax,\r\n }\r\n this.vendorDiscountPlans.push(ob);\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n this.disableDiscountAmount = this.vendorDiscountPlans.length > 0 ? false : true;\r\n }\r\n this.getDiscounts();\r\n }\r\n })\r\n }\r\n\r\n getParts() {\r\n const sub = this.marketInfoService.getParts(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.parts = res;\r\n this.getWebRentalSetting();\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getWebRentalSetting() {\r\n const sub = this.marketInfoService.getWebRentalSetting(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.defaultPart = res.DefaultLayoutPart;\r\n this.rentalForm.get('marketParts').setValue(this.defaultPart);\r\n this.AllowRentingOtherItems = res.AllowRentingOtherItems;\r\n this.getRentalPaymentSettings();\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n openLayoutPopup() {\r\n this.refreshAddBooth();\r\n }\r\n\r\n getMarketDays() {\r\n const sub = this.marketInfoService.getMarketDays(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.sunday = res.Sunday;\r\n this.monday = res.Monday;\r\n this.tuesday = res.Tuesday;\r\n this.wednesday = res.Wednesday;\r\n this.thursay = res.Thursday;\r\n this.friday = res.Friday;\r\n this.saturday = res.Saturday;\r\n this.selectedDays[\"Sunday\"] = res.Sunday;\r\n this.selectedDays[\"Monday\"] = res.Monday;\r\n this.selectedDays[\"Tuesday\"] = res.Tuesday;\r\n this.selectedDays[\"Wednesday\"] = res.Wednesday;\r\n this.selectedDays[\"Thursday\"] = res.Thursday;\r\n this.selectedDays[\"Friday\"] = res.Friday;\r\n this.selectedDays[\"Saturday\"] = res.Saturday;\r\n this.rentalForm.get('marketWeekSunday').setValue(this.sunday);\r\n this.rentalForm.get('marketWeekMonday').setValue(this.monday);\r\n this.rentalForm.get('marketWeekTuesday').setValue(this.tuesday);\r\n this.rentalForm.get('marketWeekWednesday').setValue(this.wednesday);\r\n this.rentalForm.get('marketWeekThursday').setValue(this.thursay);\r\n this.rentalForm.get('marketWeekFriday').setValue(this.friday);\r\n this.rentalForm.get('marketWeekSaturday').setValue(this.saturday);\r\n this.getDailyMarkets();\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n openLayout() {\r\n if (this.selectedMarketDays.length == 0) {\r\n Swal.fire({\r\n text: $localize`Please select a Rental Day`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else if (this.rentalForm.value['marketParts'] == 0) {\r\n Swal.fire({\r\n text: $localize`Please select a part`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n // this.hideTopHeaders.emit(true);\r\n this.layoutParts = this.rentalForm.value['marketParts'];\r\n this.sharedDataService.dailyRentalSelectedDays = this.selectedMarketDays;\r\n this.sharedDataService.dailyRentalSelectedBooths = this.selectedBooths.filter(e => e.NewBooth == true);\r\n this.sharedDataService.tempRecordNo = this.tempRecordNo;\r\n this.displayLayout = true;\r\n }\r\n }\r\n\r\n getDailyMarkets() {\r\n this.subscriptions.push(this.marketInfoService.getDailyMarketDays(this.marketId).subscribe((response) => {\r\n if (response) {\r\n this.dailyMarketDays = response;\r\n this.filteredMarketDays = this.dailyMarketDays;\r\n this.otherChargeMarketDay = this.dailyMarketDays[0].MarketDays;\r\n }\r\n }, (err) => {\r\n }));\r\n }\r\n\r\n toggleDaySelection(day: string, event: any) {\r\n this.selectedDays[day] = event.target.checked;\r\n this.filterDates();\r\n }\r\n\r\n filterDates() {\r\n this.filteredMarketDays = this.dailyMarketDays.filter(item => {\r\n const dayName = this.getDayNameFromDate(item.MarketDays);\r\n return this.selectedDays[dayName];\r\n });\r\n }\r\n\r\n getDayNameFromDate(dateString: string): string {\r\n const date = new Date(dateString);\r\n return date.toLocaleDateString('en-US', { weekday: 'long' });\r\n }\r\n\r\n checkboxChanged(args, item: any) {\r\n if (args.srcElement.checked) {\r\n this.selectedMarketDays.push(new Date(item.MarketDays));\r\n } else {\r\n this.selectedMarketDays = this.selectedMarketDays.filter(day => day.getTime() !== new Date(item.MarketDays).getTime());\r\n }\r\n this.allAvailableBooths = [];\r\n }\r\n\r\n refreshAddBooth() {\r\n // this.getDailyMarkets();\r\n this.selectedBoothData = [];\r\n this.allAvailableBooths = [];\r\n this.isboothSelected = true; \r\n this.rentalForm.get('marketParts').setValue(!this.defaultPart ? this.parts[0].PartId : this.defaultPart);\r\n if (this.selectedBoothsForRental.length > 0) {\r\n this.selectedBoothsForRental.forEach(ele => {\r\n this.selectedMarketDays.forEach(date => {\r\n const temp = {\r\n TempRecordNo: this.tempRecordNo.toString(),\r\n BoothNumber: ele.BoothNumber,\r\n StartDate: new Date(date),\r\n RentalType: 1\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n });\r\n });\r\n }\r\n this.selectedMarketDays = [];\r\n this.selectedBoothsForRental = [];\r\n }\r\n\r\n searchOtherItem() {\r\n this.otherRentalCharges = this.otherItemList;\r\n if (this.otherItemSearchText != '') {\r\n this.otherRentalCharges = this.otherItemList.filter((ele) => ele.OtherItem.toString().toLowerCase().indexOf(this.otherItemSearchText.toLowerCase()) !== -1);\r\n }\r\n }\r\n\r\n getOtherRentalItems() {\r\n var rentalDate = '';\r\n if (this.otherChargeMarketDay)\r\n rentalDate = this.datePipe.transform(this.otherChargeMarketDay, 'MM/dd/yyyy');\r\n this.subscriptions.push(this.rentalService.getOtherRentalItems(this.marketId,rentalDate).subscribe((response) => {\r\n if (response) {\r\n response.map((el, i) => {\r\n if (el.WebRental) {\r\n const ob = {\r\n Id: el.OtherItemId,\r\n OtherItem: el.OtherItem,\r\n OtherItemCharge: this.customCurrency.transform(el.OtherItemCharge),\r\n Quantity: 0,\r\n OtherItemtotal: this.customCurrency.transform('0'),\r\n othChgBooths: \"none\"\r\n }\r\n this.otherRentalCharges.push(ob);\r\n this.otherItemList.push(ob);\r\n }\r\n });\r\n }\r\n }, (err) => {\r\n }));\r\n }\r\n\r\n addOtherCharges() {\r\n if (this.selectedOtherCharges) {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedOtherCharges.map((el, i) => {\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: el.Id,\r\n VendorId: this.vendorId,\r\n Quantity: el.Quantity,\r\n OtherItemCharge: el.OtherItemCharge.includes('(') && el.OtherItemCharge.includes(')') ? (-1) * parseFloat(el.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(el.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n WRNewVendorRequest: this.newVendor\r\n }\r\n\r\n const index = this.selectedOtherItems.findIndex(item => item.Id === el.Id && this.datePipe.transform(item.RentalDay, 'MM/dd/yyyy') == this.datePipe.transform(this.otherChargeMarketDay, 'MM/dd/yyyy') && item.NewItem == true && item.BoothNo === el.othChgBooths && item.Reference == el.Reference);\r\n this.subscriptions.push(this.rentalService.getOtherItemsRentalCharges(obj).subscribe((res: any) => {\r\n var newItem = [];\r\n if (index !== -1) {\r\n var otherItemTotal = this.selectedOtherItems[index].OtherItemtotal;\r\n var salesTax = this.selectedOtherItems[index].SalesTax;\r\n var cityTax = this.selectedOtherItems[index].CityTax;\r\n this.totalOtherRentalCharge -= otherItemTotal.toString().includes('(') && otherItemTotal.toString().includes(')') ? -1 * parseFloat(otherItemTotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(otherItemTotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= salesTax.toString().includes('(') && salesTax.toString().includes(')') ? -1 * parseFloat(salesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(salesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= cityTax.toString().includes('(') && cityTax.toString().includes(')') ? -1 * parseFloat(cityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(cityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n const ob = {\r\n Id: el.Id,\r\n OtherItem: el.OtherItem,\r\n OtherItemCharge: el.OtherItemCharge,\r\n Quantity: el.Quantity,\r\n OtherItemtotal: el.OtherItemtotal,\r\n RentalDay: this.datePipe.transform(el.RentalDay, \"MM/dd/YYYY\"),\r\n SalesTax: this.customCurrency.transform(res.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(res.CityTax.toString()),\r\n BoothNo: el.othChgBooths,\r\n Reference: el.Reference,\r\n NewItem: true\r\n }\r\n this.selectedOtherItems[index] = ob;\r\n this.gridOtherRental.refresh();\r\n }\r\n else {\r\n const ob = {\r\n Id: el.Id,\r\n OtherItem: el.OtherItem,\r\n OtherItemCharge: el.OtherItemCharge,\r\n Quantity: el.Quantity,\r\n OtherItemtotal: el.OtherItemtotal,\r\n RentalDay: this.datePipe.transform(el.RentalDay, \"MM/dd/YYYY\"),\r\n SalesTax: this.customCurrency.transform(res.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(res.CityTax.toString()),\r\n BoothNo: el.othChgBooths,\r\n Reference: el.Reference,\r\n NewItem: true\r\n }\r\n newItem.push(JSON.parse(JSON.stringify(ob)));\r\n }\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n if (newItem.length > 0) {\r\n this.selectedOtherItems = this.selectedOtherItems.concat(newItem);\r\n }\r\n this.totalOtherRentalCharge += el.OtherItemtotal.toString().includes('(') && el.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(el.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(el.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax; \r\n this.getDiscounts();\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n }));\r\n });\r\n\r\n this.loaderIcon = Promise.resolve(false);\r\n const modal = this.modalAddNewItems.nativeElement;\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'none';\r\n modal.classList.remove('show');\r\n }\r\n }\r\n }\r\n\r\n async getBoothsAndItemsForOtherCharges() {\r\n if (this.OtherChargesPeriod) {\r\n this.otherRentalCharges = [];\r\n this.otherItemList = [];\r\n await this.getOtherRentalItems();\r\n }\r\n }\r\n\r\n isDateSelected(item: any): boolean {\r\n var isItemSelected = this.selectedOtherItems.some(\r\n (element) =>\r\n this.datePipe.transform(element.RentalDay, 'MM/dd/yyyy') ===\r\n this.datePipe.transform(this.otherChargeMarketDay, 'MM/dd/yyyy') &&\r\n element.Id === item.Id && element.NewItem == true\r\n );\r\n\r\n if (!isItemSelected) {\r\n isItemSelected = this.selectedOtherCharges.some(\r\n (element) =>\r\n this.datePipe.transform(element.RentalDay, 'MM/dd/yyyy') ===\r\n this.datePipe.transform(this.otherChargeMarketDay, 'MM/dd/yyyy') &&\r\n element.Id === item.Id\r\n );\r\n }\r\n\r\n !isItemSelected ? item.otherItemChecked = false : item.otherItemChecked = true;\r\n item.othChgBooths = \"none\";\r\n return isItemSelected;\r\n }\r\n\r\n setDefaultRentalItem(args, selectedItems) {\r\n selectedItems.Quantity = 0;\r\n selectedItems.OtherItemtotal = this.customCurrency.transform(\"0\").toString();\r\n selectedItems.Reference = \"\";\r\n if (args.srcElement.checked) {\r\n selectedItems.otherItemChecked = true;\r\n selectedItems.Quantity = 1\r\n const isNegative = selectedItems.OtherItemCharge.includes('(') && selectedItems.OtherItemCharge.includes(')');\r\n const totalValue = parseFloat(selectedItems.OtherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n selectedItems.OtherItemtotal = this.customCurrency.transform((finalCharge * selectedItems.Quantity).toString());\r\n this.selectedOtherCharges.push({\r\n Id: selectedItems.Id,\r\n OtherItem: selectedItems.OtherItem,\r\n OtherItemCharge: selectedItems.OtherItemCharge,\r\n Quantity: selectedItems.Quantity,\r\n OtherItemtotal: selectedItems.OtherItemtotal,\r\n othChgBooths: selectedItems.othChgBooths,\r\n RentalDay: this.datePipe.transform(this.otherChargeMarketDay, \"MM/dd/YYYY\"),\r\n });\r\n } else {\r\n selectedItems.otherItemChecked = false;\r\n const index = this.selectedOtherCharges.findIndex(item => item.Id === selectedItems.Id);\r\n if (index !== -1) {\r\n this.selectedOtherCharges.splice(index, 1);\r\n }\r\n\r\n this.subscriptions.push(this.rentalService.getOtherRentalItems(this.marketId).subscribe((response) => {\r\n if (response) {\r\n const masterChargeRecord = response.filter(item => item.OtherItemId == selectedItems.Id);\r\n if (masterChargeRecord) {\r\n selectedItems.OtherItemCharge = this.customCurrency.transform(masterChargeRecord[0].OtherItemCharge);\r\n }\r\n }\r\n }, (err) => {\r\n }));\r\n }\r\n }\r\n\r\n otherItemUpdate(selectedItems) {\r\n if (selectedItems.select) {\r\n if (selectedItems.Quantity > 0) {\r\n const index = this.selectedOtherCharges.findIndex(item => item.Id === selectedItems.Id && this.datePipe.transform(item.RentalDay, \"MM/dd/YYYY\") == this.datePipe.transform(this.otherChargeMarketDay, \"MM/dd/YYYY\"));\r\n const isNegative = selectedItems.OtherItemCharge.includes('(') && selectedItems.OtherItemCharge.includes(')');\r\n const totalValue = parseFloat(selectedItems.OtherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n selectedItems.OtherItemCharge = this.customCurrency.transform(finalCharge.toString())\r\n selectedItems.OtherItemtotal = this.customCurrency.transform((finalCharge * selectedItems.Quantity).toString())\r\n if (index !== -1) {\r\n var obj = {\r\n Id: selectedItems.Id,\r\n OtherItem: selectedItems.OtherItem,\r\n OtherItemCharge: selectedItems.OtherItemCharge,\r\n Quantity: selectedItems.Quantity,\r\n OtherItemtotal: selectedItems.OtherItemtotal,\r\n othChgBooths: selectedItems.othChgBooths,\r\n RentalDay: this.datePipe.transform(this.otherChargeMarketDay, \"MM/dd/YYYY\"),\r\n Reference: selectedItems.Reference\r\n };\r\n this.selectedOtherCharges[index] = obj;\r\n }\r\n else {\r\n var objNew = {\r\n Id: selectedItems.Id,\r\n OtherItem: selectedItems.OtherItem,\r\n OtherItemCharge: selectedItems.OtherItemCharge,\r\n Quantity: selectedItems.Quantity,\r\n OtherItemtotal: selectedItems.OtherItemtotal,\r\n othChgBooths: selectedItems.othChgBooths,\r\n RentalDay: this.datePipe.transform(this.otherChargeMarketDay, \"MM/dd/YYYY\"),\r\n Reference: selectedItems.Reference\r\n };\r\n this.selectedOtherCharges.push(objNew);\r\n }\r\n }\r\n }\r\n }\r\n\r\n selectedBoothsFromLayout(data) {\r\n window.scrollTo(0, 0);\r\n this.selectedMarketDays.forEach(date => {\r\n this.selectedBooths = this.selectedBooths.filter(e => !e.NewBooth);\r\n });\r\n this.selectedBooths = this.selectedBooths.concat(this.sharedDataService.dailyRentalSelectedBooths);\r\n\r\n data.forEach(el => {\r\n this.selectedMarketDays.forEach(date => {\r\n var recordExist = this.sharedDataService.dailyRentalSelectedBooths.filter(e => e.BoothNumber == el.BoothNumber && this.datePipe.transform(e.RentalDay, 'MM/dd/yyyy') == this.datePipe.transform(date, 'MM/dd/yyyy'));\r\n if (recordExist.length == 0) {\r\n var index = this.selectedBoothData.findIndex(e => e.BoothNumber == el.BoothNumber && e.BoothTypeId == el.BoothTypeId)\r\n if (index == -1) {\r\n this.selectedBoothData.push(\r\n {\r\n BoothNumber: el.BoothNumber,\r\n BoothType: el.BoothType,\r\n BoothTypeId: el.BoothTypeId,\r\n BoothDescription: el.BoothDescription,\r\n });\r\n }\r\n }\r\n });\r\n });\r\n this.displayLayout = false;\r\n // this.hideTopHeaders.emit(false);\r\n this.getRentalPaymentSettings(); \r\n if (this.selectedBoothData.length > 0)\r\n this.validateAndAddSelectedBoothsToGrid();\r\n }\r\n\r\n getRentalPaymentSettings() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.rentalService.getRentalSettings(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.warnExcessPayment = res.WarnExcessPayment;\r\n this.warnZeroPayment = res.WarnZeroPayment;\r\n this.displayOtherChargeByBooth = res.DisplayOtherChargesByBooth;\r\n this.displaySalesTax = res.RentalTaxable;\r\n this.displayCityTax = res.RentalSecondTaxable;\r\n this.displayOtherChargeSalesTax = res.OtherRentalTaxable;\r\n this.displayOtherChargeCityTax = res.OtherRentalSecondTaxable;\r\n this.gridDailyRental.getColumnByField(\"SalesTax\").visible = this.displaySalesTax;\r\n this.gridDailyRental.getColumnByField(\"CityTax\").visible = this.displayCityTax; \r\n if(this.newVendor){\r\n this.gridDailyRental.getColumnByField(\"Product\").visible = false;\r\n }\r\n this.ResaleNumberRequired = res.ResaleNumberRequired;\r\n this.DaysSellWithoutResaleNumber = res.DaysSellWithoutResaleNumber;\r\n this.BusinessLicenseNumberRequired = res.BusinessLicenseNumberRequired;\r\n this.DaysSellWithoutBusiLicNumber = res.DaysSellWithoutBusiLicNumber;\r\n this.DisplayPayDueDate = res.DisplayPayDueDate;\r\n this.DisplaySpecificDate = res.DisplaySpecificDate;\r\n this.DisplayOptionValue = res.DisplayOptionValue;\r\n this.secondTaxName = res.SecondTaxName ? res.SecondTaxName: \"Sec Level Tax\"\r\n var secLevelTaxRentHeader = this.gridDailyRental.getColumnByField(\"CityTax\"); \r\n secLevelTaxRentHeader.headerText = this.secondTaxName;\r\n this.OtherChargesPeriod = res.OtherChargesPeriod;\r\n if (this.AllowRentingOtherItems) {\r\n var secLevelTaxOtherRentHeader = this.gridOtherRental.getColumnByField(\"CityTax\");\r\n this.gridOtherRental.getColumnByField(\"BoothNo\").visible = res.DisplayOtherChargesByBooth;\r\n this.gridOtherRental.getColumnByField(\"SalesTax\").visible = this.displayOtherChargeSalesTax;\r\n this.gridOtherRental.getColumnByField(\"CityTax\").visible = this.displayOtherChargeCityTax;\r\n secLevelTaxOtherRentHeader.headerText = this.secondTaxName;\r\n }\r\n const nextDate = this.getNextDate(this.DisplayOptionValue);\r\n this.gridDailyRental.refresh();\r\n if (this.AllowRentingOtherItems) {\r\n this.gridOtherRental.refresh();\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getNextDate(day: number): Date {\r\n if (this.DisplaySpecificDate) {\r\n const today = new Date();\r\n let nextDate = new Date(today.getFullYear(), today.getMonth(), day);\r\n // If the nextDate is in the past or today, move to the next month\r\n if (nextDate < today) {\r\n nextDate.setMonth(nextDate.getMonth() + 1);\r\n }\r\n // Handle cases where the day is not valid in the next month (e.g., 31st in February)\r\n while (nextDate.getDate() !== day) {\r\n nextDate.setMonth(nextDate.getMonth() + 1);\r\n nextDate.setDate(day);\r\n }\r\n return nextDate;\r\n }\r\n else {\r\n const today = new Date();\r\n let nextDate = new Date(today.setDate(today.getDate() + day));\r\n return nextDate;\r\n }\r\n }\r\n\r\n validateAndAddSelectedBoothsToGrid() {\r\n let noResale = true;\r\n this.vendorRentalDays = [];\r\n this.marketDayCountForResale = 0\r\n if ((this.ResaleNumberRequired && !this.exemptResale) || (this.BusinessLicenseNumberRequired)) {\r\n\r\n const currentYear = new Date().getFullYear();\r\n var selectedBoothRecord = this.selectedBooths.filter(e => e.NewBooth == true && new Date(e.RentalDay).getFullYear() == currentYear);\r\n if (selectedBoothRecord.length > 0) {\r\n selectedBoothRecord.forEach(record => {\r\n const targetDateString = this.datePipe.transform(record.RentalDay, \"MM/dd/yyyy\");\r\n const dateExist = this.vendorRentalDays.find(el => {\r\n const rentalDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(record.RentalDay, \"MM/dd/yyyy\");\r\n this.vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n if (this.marketDayCountForResale > this.DaysSellWithoutResaleNumber) {\r\n return; // exits the forEach loop when the condition is met\r\n }\r\n }\r\n });\r\n }\r\n\r\n this.selectedMarketDays.map(date => {\r\n const targetDateString = this.datePipe.transform(date, \"MM/dd/yyyy\");\r\n const dateExist = this.vendorRentalDays.find(el => {\r\n const rentalDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(date, \"MM/dd/yyyy\");\r\n this.vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n if (this.marketDayCountForResale > this.DaysSellWithoutResaleNumber) {\r\n return; // exits the forEach loop when the condition is met\r\n }\r\n }\r\n });\r\n\r\n const obj = {\r\n VendorID: this.vendorId,\r\n VendorRentalDate: new Date(),\r\n MarketId: this.marketId\r\n };\r\n\r\n this.subscriptions.push(this.rentalService.getVendorRentalDays(obj).subscribe((res: any[]) => {\r\n if (this.marketDayCountForResale <= this.DaysSellWithoutResaleNumber || this.marketDayCountForResale <= this.DaysSellWithoutBusiLicNumber) {\r\n if (res && res.length > 0) {\r\n res.forEach(el => {\r\n const targetDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n const dateExist = this.vendorRentalDays.find(data => {\r\n const rentalDateString = this.datePipe.transform(data.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n this.vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n }\r\n });\r\n }\r\n }\r\n\r\n if (!this.newVendor) {\r\n if (this.ResaleNumberRequired && !this.exemptResale && !this.resaleNo && this.marketDayCountForResale > this.DaysSellWithoutResaleNumber && !this.resaleOptionSelected) {\r\n const modal = this.modalResaleNo.nativeElement;\r\n modal.classList.add('show');\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'block';\r\n this.ResaleOrBusinessHeader = \"Resale Number\"\r\n this.resaleNoDisplay = true;\r\n this.businessLicenseDisplay = false;\r\n }\r\n noResale = false;\r\n }\r\n else if (this.BusinessLicenseNumberRequired && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n if (!this.businessLicenseNumber || !this.businessLicenseExpiryDate) {\r\n const modal = this.modalResaleNo.nativeElement;\r\n modal.classList.add('show');\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'block';\r\n this.ResaleOrBusinessHeader = \"Business License Number\";\r\n this.resaleNoDisplay = false;\r\n this.businessLicenseDisplay = true;\r\n }\r\n noResale = false;\r\n }\r\n else {\r\n if (this.getDateFromDateTime(new Date(this.businessLicenseExpiryDate)) < this.getDateFromDateTime(new Date())) {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Business License is expired! Please contact the market`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n }\r\n else {\r\n noResale = true;\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n else {\r\n if (this.ResaleNumberRequired && !this.exemptResale && !this.resaleNo && this.marketDayCountForResale > this.DaysSellWithoutResaleNumber && !this.resaleOptionSelected) {\r\n this.resaleNoInputRequired.emit(true)\r\n }\r\n if (this.BusinessLicenseNumberRequired && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n this.businessLicenseRequired.emit(true);\r\n }\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }));\r\n } else {\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n\r\n updateOtherTotalRent(data) {\r\n if (parseFloat(data.Quantity) == 0) {\r\n data.Quantity = \"1\"\r\n }\r\n this.totalSalesTax -= data.SalesTax.toString().includes('(') && data.SalesTax.toString().includes(')') ? -1 * parseFloat(data.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= data.CityTax.toString().includes('(') && data.CityTax.toString().includes(')') ? -1 * parseFloat(data.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalOtherRentalCharge -= data.OtherItemtotal.toString().includes('(') && data.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n const index = this.selectedOtherItems.findIndex(item => item.Id === data.Id && this.datePipe.transform(item.RentalDay, 'MM/dd/yyyy') == this.datePipe.transform(this.otherChargeMarketDay, 'MM/dd/yyyy') && item.NewItem == true && item.BoothNo ==data.BoothNo && item.Reference == data.Reference);\r\n if (index !== -1) {\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: data.Id,\r\n VendorId: this.vendorId,\r\n Quantity: data.Quantity,\r\n OtherItemCharge: data.OtherItemCharge.includes('(') && data.OtherItemCharge.includes(')') ? (-1) * parseFloat(data.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n WRNewVendorRequest: this.newVendor\r\n }\r\n this.subscriptions.push(this.rentalService.getOtherItemsRentalCharges(obj).subscribe((res: any) => {\r\n this.selectedOtherItems[index].SalesTax = this.customCurrency.transform(res.SalesTax.toString());\r\n this.selectedOtherItems[index].CityTax = this.customCurrency.transform(res.CityTax.toString());\r\n const isNegative = data.OtherItemCharge.includes('(') && data.OtherItemCharge.includes(')');\r\n const totalValue = parseFloat(data.OtherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n data.OtherItemtotal = this.customCurrency.transform((finalCharge * data.Quantity).toString());\r\n this.selectedOtherItems[index].OtherItemtotal = data.OtherItemtotal;\r\n this.selectedOtherItems[index].OtherItemCharge = this.customCurrency.transform(finalCharge.toString());\r\n this.selectedOtherItems[index].Quantity = data.Quantity;\r\n this.gridOtherRental.refresh();\r\n\r\n this.totalOtherRentalCharge += data.OtherItemtotal.toString().includes('(') && data.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax; \r\n this.getDiscounts();\r\n }));\r\n }\r\n }\r\n\r\n onCheckNumKeyPress(event: KeyboardEvent) {\r\n const allowedChars = /[0-9]/g;\r\n const key = event.key;\r\n if (event.key === 'Backspace' || event.key === 'Delete' || event.key === 'ArrowLeft' || event.key === 'ArrowRight' || event.key === '#') {\r\n return;\r\n }\r\n if (!key.match(allowedChars)) {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n addSelectedBoothsToGrid() {\r\n this.selectedBoothsForRental = [];\r\n if (this.selectedBoothData) {\r\n this.loaderIcon = Promise.resolve(true);\r\n for (const date of this.selectedMarketDays) {\r\n this.selectedBoothData.map((el, i) => {\r\n var obj = {\r\n RentalDate: new Date(date),\r\n MarketId: this.marketId,\r\n BoothTypeId: el.BoothTypeId,\r\n VendorId: this.vendorId,\r\n WRNewVendorRequest: this.newVendor\r\n }\r\n this.subscriptions.push(this.rentalService.getBoothrentalCharges(obj).subscribe((res: any) => {\r\n var vendorProducts = !this.newVendor ? this.vendorProducts.filter(x => x.Priority) ? this.vendorProducts.filter(x => x.Priority)[0].ProductId : this.vendorProducts[0].ProductId:\"\";\r\n var newbooths = [];\r\n const ob = {\r\n DailyRentalId: 0,\r\n BoothNumber: el.BoothNumber,\r\n BoothType: el.BoothType,\r\n BoothTypeId: el.BoothTypeId,\r\n Product: vendorProducts,\r\n RentalDay: this.datePipe.transform(date, \"MM/dd/YYYY\"),\r\n Rent: this.customCurrency.transform(res.Rent),\r\n SalesTax: this.customCurrency.transform(res.SalesTax),\r\n CityTax: this.customCurrency.transform(res.CityTax),\r\n NewBooth: true\r\n }\r\n this.totalRentalCharge += res.Rent.toString().includes('(') && res.Rent.toString().includes(')') ? -1 * parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.getDiscounts();\r\n newbooths.push(JSON.parse(JSON.stringify(ob)));\r\n this.selectedBooths = this.selectedBooths.concat(newbooths);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n }));\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n });\r\n } \r\n this.loaderIcon = Promise.resolve(false);\r\n this.refreshAddBooth();\r\n }\r\n }\r\n\r\n closeLayoutForm() {\r\n this.displayLayout = false;\r\n this.selectedMarketDays = [];\r\n }\r\n\r\n getMarketVendorSettings(){\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.vendorService.getMarketVendorSettings(this.vendorId, this.marketId).subscribe((res: any) => {\r\n var response = res.body;\r\n if (response) {\r\n this.exemptResale = response.ExemptResale;\r\n this.resaleNo = response.Resale;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getVendorBusinessLicenseSettings(){\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.vendorService.getVendorBusinessLicenseSettings(this.vendorId, this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.businessLicenseNumber = res.LicenseNumber;\r\n this.businessLicenseExpiryDate = res.ExpiryDate;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n AddBoothsOnGridOnValidationSucess() {\r\n var addToGrid = false;\r\n var closeModalPopup = false;\r\n const modal = this.modalResaleNo.nativeElement;\r\n if (this.resaleNoDisplay) {\r\n if (!this.resaleNo || this.resaleNo.trim() === '') {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Enter the resale number`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n addToGrid = true;\r\n closeModalPopup = true;\r\n this.resaleOptionSelected = true;\r\n }\r\n\r\n if (closeModalPopup) {\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'none';\r\n modal.classList.remove('show');\r\n }\r\n }\r\n\r\n if (addToGrid) {\r\n const obj = {\r\n VendorID: this.vendorId,\r\n ExemptResaleNo: false,\r\n ExemptResaleReason: \"\",\r\n ResaleNo: this.resaleNo,\r\n MarketId: this.marketId\r\n }\r\n\r\n this.subscriptions.push(this.rentalService.UpdateVendorResaleInfo(obj).subscribe((res: any) => {\r\n }));\r\n }\r\n }\r\n else{\r\n addToGrid = true;\r\n }\r\n\r\n if (addToGrid) {\r\n if (this.BusinessLicenseNumberRequired && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n var addToGrid = false;\r\n var closeModalPopup = false;\r\n if ((!this.businessLicenseNumber || this.businessLicenseNumber.trim() === '') || !this.businessLicenseExpiryDate) {\r\n this.ResaleOrBusinessHeader = \"Business License Number\"\r\n const modal = this.modalResaleNo.nativeElement;\r\n this.resaleNoDisplay = false; \r\n this.businessLicenseDisplay = true;\r\n modal.classList.add('show');\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'block';\r\n this.ResaleOrBusinessHeader = \"Business License Number\" \r\n }\r\n }\r\n else if (this.getDateFromDateTime(new Date(this.businessLicenseExpiryDate)) < this.getDateFromDateTime(new Date())) {\r\n this.closeResaleModal();\r\n Swal.fire({\r\n text: $localize`Business License is expired! Please contact the market.`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n addToGrid = true;\r\n this.closeResaleModal();\r\n if (this.businessLicenseDisplay) {\r\n const obj = {\r\n VendorID: this.vendorId,\r\n LicenseNameId: 1,\r\n LicenseName: \"\",\r\n ExpiryDate: new Date(this.businessLicenseExpiryDate),\r\n LicenseNumber: this.businessLicenseNumber\r\n }\r\n\r\n this.subscriptions.push(this.rentalService.updateVendorBusinessLicense(this.marketId, obj).subscribe((res: any) => {\r\n }));\r\n }\r\n this.addSelectedBoothsToGrid();\r\n } \r\n }\r\n else {\r\n addToGrid = true;\r\n closeModalPopup = true;\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n }\r\n\r\n getDateFromDateTime(date){\r\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\r\n }\r\n\r\n closeResaleModal(){\r\n const modal = this.modalResaleNo.nativeElement;\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'none';\r\n modal.classList.remove('show');\r\n }\r\n }\r\n\r\n loadSelectedBooths() { \r\n if (this.sharedDataService.paymentSharedData.DailyRentalBooth.length > 0) {\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n this.sharedDataService.paymentSharedData.DailyRentalBooth.forEach((item) => {\r\n var newbooths = [];\r\n var ob = {\r\n DailyRentalId: item.DailyRentalId,\r\n BoothType: item.BoothType,\r\n BoothNumber: item.BoothNumber,\r\n BoothTypeId: item.BoothTypeId,\r\n Product: item.ProductId,\r\n OtherItemCharge: this.datePipe.transform(item.OtherItemCharge),\r\n OtherItemName: item.OtherItem,\r\n RentalDay: this.datePipe.transform(item.RentalDay, 'MM/dd/yyyy'),\r\n Rent: this.customCurrency.transform(item.RentalCharge),\r\n SalesTax: this.customCurrency.transform(item.SalesTax),\r\n CityTax: this.customCurrency.transform(item.SecLevelTax),\r\n NewBooth: true\r\n };\r\n newbooths.push(JSON.parse(JSON.stringify(ob)));\r\n this.selectedBooths = this.selectedBooths.concat(newbooths);\r\n });\r\n // this.gridDailyRental.refresh();\r\n }\r\n if (this.sharedDataService.paymentSharedData.DailyRentalOtherCharges.length > 0) {\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n this.sharedDataService.paymentSharedData.DailyRentalOtherCharges.forEach((el) => {\r\n var newItem =[];\r\n var ob = {\r\n Id: el.OtherItemId,\r\n OtherItem: el.OtherItemName,\r\n OtherItemCharge: this.customCurrency.transform(el.OtherCharge),\r\n Quantity: el.Quantity,\r\n OtherItemtotal: this.customCurrency.transform(el.OtherItemCharge),\r\n RentalDay: this.datePipe.transform(el.RentalDay, \"MM/dd/YYYY\"),\r\n SalesTax: this.customCurrency.transform(el.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(el.SecLevelTax.toString()),\r\n BoothNo: el.BoothNumber,\r\n Reference: el.Reference,\r\n NewItem: true\r\n }\r\n newItem.push(JSON.parse(JSON.stringify(ob)));\r\n\r\n if (newItem.length > 0) {\r\n this.selectedOtherItems = this.selectedOtherItems.concat(newItem);\r\n }\r\n });\r\n // this.gridOtherRental.refresh();\r\n }\r\n\r\n this.totalRentalCharge = parseFloat(this.sharedDataService.paymentSharedData.RentalCharge);\r\n this.totalOtherRentalCharge = parseFloat(this.sharedDataService.paymentSharedData.OtherCharge.toString());\r\n this.totalSalesTax = parseFloat(this.sharedDataService.paymentSharedData.SalesTax.toString());\r\n this.totalSecondLeveltax = parseFloat(this.sharedDataService.paymentSharedData.SecLevelTax.toString());\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.sharedDataService.paymentSharedData = \"\";\r\n }\r\n\r\n deleteSelectedBooth(data) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to delete the selected Booth?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n const index = this.selectedBooths.findIndex(selectedBooth => selectedBooth.BoothNumber === data.BoothNumber && selectedBooth.RentalDay == data.RentalDay);\r\n if (index !== -1) {\r\n this.selectedBooths.splice(index, 1);\r\n }\r\n\r\n const temp = {\r\n TempRecordNo: this.tempRecordNo.toString(),\r\n BoothNumber: data.BoothNumber,\r\n StartDate: new Date(data.RentalDay),\r\n RentalType: 1\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n this.totalRentalCharge -= data.Rent.includes('(') && data.Rent.includes(')') ? -1 * parseFloat(data.Rent.replace(/[^0-9.-]/g, '')) : parseFloat(data.Rent.replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= data.SalesTax.includes('(') && data.SalesTax.includes(')') ? -1 * parseFloat(data.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.SalesTax.replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= data.CityTax.includes('(') && data.CityTax.includes(')') ? -1 * parseFloat(data.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.CityTax.replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.gridDailyRental.refresh();\r\n this.getDiscounts();\r\n }\r\n });\r\n }\r\n\r\n deleteOtherRentalCharges(data) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to delete the selected Other Charges?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n const index = this.selectedOtherItems.findIndex(oth => oth.Id === data.Id && oth.RentalDay == data.RentalDay && oth.NewItem);\r\n if (index !== -1) {\r\n this.selectedOtherItems.splice(index, 1);\r\n }\r\n\r\n var selectedItems = this.otherRentalCharges.findIndex(item => item.Id == data.Id);\r\n if (selectedItems != -1) {\r\n this.subscriptions.push(this.rentalService.getOtherRentalItems(this.marketId).subscribe((response) => {\r\n if (response) {\r\n const masterChargeRecord = response.filter(item => item.OtherItemId == data.Id);\r\n if (masterChargeRecord) {\r\n this.otherRentalCharges[selectedItems].Quantity = 0;\r\n this.otherRentalCharges[selectedItems].othChgBooths = \"none\";\r\n this.otherRentalCharges[selectedItems].OtherItemCharge = this.customCurrency.transform(masterChargeRecord[0].OtherItemCharge);\r\n this.otherRentalCharges[selectedItems].OtherItemtotal = this.customCurrency.transform('0');\r\n this.otherRentalCharges[selectedItems].Reference = \"\"\r\n }\r\n }\r\n }, (err) => {\r\n }));\r\n }\r\n\r\n this.totalOtherRentalCharge -= data.OtherItemtotal.includes('(') && data.OtherItemtotal.includes(')') ? -1 * parseFloat(data.OtherItemtotal.replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemtotal.replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= data.SalesTax.includes('(') && data.SalesTax.includes(')') ? -1 * parseFloat(data.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.SalesTax.replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= data.CityTax.includes('(') && data.CityTax.includes(')') ? -1 * parseFloat(data.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.CityTax.replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.gridOtherRental.refresh();\r\n this.getDiscounts();\r\n }\r\n });\r\n }\r\n\r\n disableSavePayment(){\r\n var vendorBalance = this.priorBalance + this.totalCharge;\r\n if ((vendorBalance > 0) || (this.priorBalance < 0 && vendorBalance <= 0)){\r\n return false\r\n }\r\n else\r\n return true\r\n }\r\n\r\n getDiscounts() {\r\n var totalRentalCharge = this.totalRentalCharge;\r\n var totalSalesTax = this.totalSalesTax;\r\n var totalSecondLeveltax = this.totalSecondLeveltax;\r\n var totalOtherRentalCharge = this.totalOtherRentalCharge;\r\n var priorBalance = 0;\r\n var totalChargeWithDue = this.priorBalance + (totalRentalCharge)\r\n + (totalSalesTax)\r\n + (totalSecondLeveltax)\r\n + (totalOtherRentalCharge)\r\n\r\n var totalCharge = (totalRentalCharge) + (totalSalesTax) + (totalSecondLeveltax) + (totalOtherRentalCharge)\r\n // totalCharge = totalCharge.toString().includes('(') && totalCharge.toString().includes(')') ? -1 * parseFloat(totalCharge.toString().replace(/[^0-9.-]/g, '')) : parseFloat(totalCharge.toString().replace(/[^0-9.-]/g, ''));\r\n\r\n if (this.vendorDiscountPlans.length > 0 && totalCharge > 0) {\r\n var discountTotalAmount = 0;\r\n var totalAmountForDiscount = 0;\r\n for (const disc of this.vendorDiscountPlans) {\r\n disc.CheckAll = disc.AutoSelected;\r\n if (disc.CheckAll && disc.Daily) {\r\n var currentDiscountValue = 0;\r\n if (!disc.BalanceDue || (disc.BalanceDue && priorBalance <= 0)) {\r\n if (!disc.IsExceedAmount || (disc.IsExceedAmount && totalCharge > disc.ExceedAmount)) {\r\n const discountValue = disc.DiscountValue;\r\n totalAmountForDiscount = totalRentalCharge\r\n if (disc.OtherItems) {\r\n totalAmountForDiscount += totalOtherRentalCharge\r\n }\r\n if (disc.DiscountType == 'Percentage') {\r\n discountTotalAmount += totalAmountForDiscount * (discountValue / 100);\r\n currentDiscountValue = totalAmountForDiscount * (discountValue / 100);\r\n }\r\n else {\r\n discountTotalAmount += discountValue;\r\n currentDiscountValue = discountValue;\r\n }\r\n }\r\n else {\r\n disc.CheckAll = false;\r\n }\r\n }\r\n else {\r\n disc.CheckAll = false;\r\n }\r\n disc.AppliedDiscount = this.customCurrency.transform(currentDiscountValue.toString());\r\n }\r\n else {\r\n disc.AppliedDiscount = this.customCurrency.transform(\"0\");\r\n }\r\n\r\n this.totalDiscountCharge = discountTotalAmount.toString();\r\n }\r\n }\r\n else {\r\n // this.rentalForm.controls['vendorBalances'].patchValue({\r\n // totalDiscountCharge: this.customCurrency.transform(\"0\"),\r\n // totalCharge: this.customCurrency.transform((totalChargeWithDue - 0).toString())\r\n // });\r\n }\r\n }\r\n\r\n cancelRental() {\r\n if (this.isdirty) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Unsaved changes will be lost. Are you sure you want to cancel?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.isFormDirty.emit(false);\r\n this.isCancelClicked.emit('1');\r\n } else {\r\n //do nothing\r\n }\r\n });\r\n } else {\r\n this.isFormDirty.emit(false);\r\n this.isCancelClicked.emit('1');\r\n }\r\n }\r\n\r\n rentOnlineNextTab(){\r\n this.saveRentalWithPayment();\r\n this.bookingFormCompleted.emit(true);\r\n }\r\n\r\n saveRentalWithPayment(){\r\n this.isdirty = false;\r\n this.isFormDirty.emit(false);\r\n var bookingReceipt = this.selectedBooths.some(e=>e.NewBooth == true) || this.selectedOtherItems.some(e=>e.NewItem == true);\r\n var paymentDueDate = null;\r\n var totalDiscountCharge = 0\r\n \r\n var obj = {\r\n RentalType: 1,\r\n VendorId: this.vendorId,\r\n PriorBalance:this.priorBalance,\r\n RentalCharge: this.totalRentalCharge,\r\n SalesTax: this.totalSalesTax,\r\n SecLevelTax: this.totalSecondLeveltax,\r\n OtherCharge: this.totalOtherRentalCharge,\r\n TotalBalanceDue: this.totalCharge,\r\n RentalNotes: \"\",\r\n RentalMethod: \"\",\r\n DailyRentalBooth: [],\r\n DailyRentalOtherCharges: [],\r\n TempRecordNo: this.tempRecordNo,\r\n ReceiptSettings: \"\",\r\n PaymentOnly:!bookingReceipt,\r\n ExemptResaleNo:false,\r\n ExemptResaleReason: \"\",\r\n ResaleNo: this.resaleNo,\r\n PaymentDueDate: this.DisplayPayDueDate ? paymentDueDate : null,\r\n AppliedDiscountModel: [],\r\n DiscountAmount: this.totalDiscountCharge ?? 0\r\n }\r\n\r\n var objSelectedBooth = [];\r\n if (this.selectedBooths.length > 0) {\r\n this.selectedBooths.forEach((item) => {\r\n if (item.NewBooth) {\r\n objSelectedBooth.push({\r\n DailyRentalId: item.DailyRentalId,\r\n BoothNumber: item.BoothNumber,\r\n BoothTypeId: item.BoothTypeId,\r\n ProductId: item.Product,\r\n BoothType: item.BoothType,\r\n RentalDay: new Date(item.RentalDay),\r\n RentalCharge: item.Rent.includes('(') && item.Rent.includes(')') ? -1 * parseFloat(item.Rent.replace(/[^0-9.-]/g, '')) : parseFloat(item.Rent.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n })\r\n }\r\n });\r\n }\r\n\r\n if (objSelectedBooth.length > 0)\r\n obj.DailyRentalBooth = objSelectedBooth;\r\n\r\n var objSelectedOtherCharge = [];\r\n if (this.selectedOtherItems.length > 0) {\r\n this.selectedOtherItems.forEach((item) => {\r\n if (item.NewItem) {\r\n objSelectedOtherCharge.push({\r\n OtherItemId: item.Id,\r\n OtherItemName: item.OtherItem,\r\n OtherItemCharge: item.OtherItemtotal.includes('(') && item.OtherItemtotal.includes(')') ? -1 * parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')),\r\n Quantity: item.Quantity,\r\n RentalDay: new Date(item.RentalDay),\r\n BoothNumber: item.BoothNo,\r\n OtherCharge: item.OtherItemCharge.includes('(') && item.OtherItemCharge.includes(')') ? -1 * parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n Reference: item.Reference\r\n })\r\n }\r\n });\r\n }\r\n if (objSelectedOtherCharge.length > 0)\r\n obj.DailyRentalOtherCharges = objSelectedOtherCharge;\r\n\r\n var objDiscountData = [];\r\n if(this.vendorDiscountPlans.length > 0 && this.totalDiscountCharge > 0){\r\n this.vendorDiscountPlans.forEach((item) => {\r\n if(item.CheckAll){\r\n objDiscountData.push({\r\n PlanId: item.PlanSeqId,\r\n DiscountAmount:item.AppliedDiscount.includes('(') && item.AppliedDiscount.includes(')') ? -1 * parseFloat(item.AppliedDiscount.replace(/[^0-9.-]/g, '')) : parseFloat(item.AppliedDiscount.replace(/[^0-9.-]/g, '')),\r\n OtherCharges: item.OtherItems,\r\n SalesTax: item.SalesTaxApplied,\r\n SecondLevelTax: item.SecondLevelTaxApplied,\r\n DiscountType:item.DiscountType== DiscountType.Percentage ? \"0\" : \"1\",\r\n DiscountValue : item.DiscountValue,\r\n SalesTaxAmount:item.SalesTaxAmount.includes('(') && item.SalesTaxAmount.includes(')') ? -1 * parseFloat(item.SalesTaxAmount.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTaxAmount.replace(/[^0-9.-]/g, '')),\r\n SecondLevelTaxAmount:item.SecondLevelTaxAmount.includes('(') && item.SecondLevelTaxAmount.includes(')') ? -1 * parseFloat(item.SecondLevelTaxAmount.replace(/[^0-9.-]/g, '')) : parseFloat(item.SecondLevelTaxAmount.replace(/[^0-9.-]/g, ''))\r\n })\r\n }\r\n });\r\n }\r\n if (objDiscountData.length > 0)\r\n obj.AppliedDiscountModel = objDiscountData;\r\n if (!this.newVendor) {\r\n this.sharedDataService.paymentSharedData = obj;\r\n var url = 'vendor-payments/' + this.marketId + '/' + this.vendorId;\r\n this.router.navigate([url]);\r\n }\r\n else{\r\n this.rentalBookingData.emit(obj);\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscriptions.forEach((subscription) => {\r\n if (subscription) {\r\n subscription.unsubscribe();\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n * Select Market Day(s) Here\r\n
\r\n
    \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
\r\n
\r\n
\r\n
\r\n Weekly Market(s):\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n {{data.RentEndPeriod}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
Other Charges
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
ItemsRecBooth#Charges\r\n QtyTotalReference\r\n
\r\n \r\n {{item.OtherItem}}\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n {{item.OtherItemtotal}}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n
{{ResaleOrBusinessHeader}}
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { DatePipe } from '@angular/common';\r\nimport { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, Renderer2, ViewChild } from '@angular/core';\r\nimport { FormBuilder, FormGroup } from '@angular/forms';\r\nimport { ActivatedRoute, Params, Router } from '@angular/router';\r\nimport { GridComponent, GridLine, SortSettingsModel } from '@syncfusion/ej2-angular-grids';\r\nimport { catchError, forkJoin, of, Subscription } from 'rxjs';\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\nimport { RentalService } from 'src/app/services/Rental.service';\r\nimport { VendorService } from 'src/app/services/Vendor.service';\r\nimport { customCurrencyPipe } from 'src/app/Shared/customCurrency.pipe';\r\nimport { DiscountType } from 'src/app/Shared/enum';\r\nimport { SharedDataService } from 'src/app/Shared/SharedData.service';\r\nimport Swal from 'sweetalert2';\r\ninterface DateString {\r\n startDate: string;\r\n}\r\n@Component({\r\n selector: 'app-weeklyrental-online',\r\n templateUrl: './weeklyrental-online.component.html',\r\n styleUrls: ['./weeklyrental-online.component.scss', '../rent-online.component.scss']\r\n})\r\nexport class WeeklyrentalOnlineComponent implements OnInit, OnDestroy {\r\n rentalForm : FormGroup;\r\n marketId;\r\n vendorId;\r\n sunday = false;\r\n monday = false;\r\n tuesday = false;\r\n wednesday = false;\r\n thursay = false;\r\n friday = false;\r\n saturday = false;\r\n public lines: GridLine;\r\n secondTaxName =\"\";\r\n RentalTaxPercentage = 0;\r\n OtherRentalTaxPercentage = 0;\r\n RentalSecondTaxPercentage = 0;\r\n OtherRentalSecondTaxPercentage = 0;\r\n public textWrapSettings: any = { wrapMode: 'Both' }; // Enable text wrapping\r\n exemptResaleReason = \"\";\r\n @ViewChild('modalWeeklyOtherCharges', { static: false }) modalWeeklyOtherCharges: ElementRef;\r\n @ViewChild('gridOtherRental', { static: false }) public gridOtherRental: GridComponent;\r\n @ViewChild('gridWeeklyRental', { static: false }) public gridWeeklyRental: GridComponent;\r\n @ViewChild('modalResaleNo', { static: false }) modalResaleNo: ElementRef;\r\n selectedMarketDays=[];\r\n parts=[];\r\n weeklyRentalStartDates = [];\r\n defaultPart;\r\n weeklyMarketDays = [];\r\n excludedMarketDays=[];\r\n selectedWeeklyBoothData = [];\r\n isWeeklyboothSelected=false;\r\n marketDayCountForResale = 0 \r\n vendorProducts=[];\r\n defaultProduct;\r\n layoutParts=0;\r\n totalRentalCharge = 0.00;\r\n displayOtherChargeByBooth = false;\r\n totalOtherRentalCharge = 0.00;\r\n totalSalesTax = 0.00;\r\n totalSecondLeveltax = 0.00\r\n totalCharge = 0.00;\r\n tempRecordNo=0;\r\n defaultPartId;\r\n displayLayout =false;\r\n weeklyLayoutData;\r\n selectedDates= [];\r\n ResaleNumberRequired = false;\r\n DaysSellWithoutResaleNumber;\r\n BusinessLicenseNumberRequired = false;\r\n DaysSellWithoutBusiLicNumber;\r\n resaleNoOption = \"1\";\r\n exemptResale = false;\r\n resaleNo = \"\";\r\n ResaleOrBusinessHeader = \"\";\r\n resaleNoDisplay = false;\r\n businessLicenseDisplay = false;\r\n otherRentalCharges=[];\r\n selectedBoothsForRental =[];\r\n otherItemList=[];\r\n selectedOtherCharges=[];\r\n vendorDiscountPlans =[];\r\n ApplyBookingFee = false;\r\n selectedOtherItems=[];\r\n ApplyBookingFeeId;\r\n bookingFeeAmount;\r\n priorBalance = 0.00;\r\n totalDiscountCharge;\r\n boothsForOtherCharge = [];\r\n businessLicenseNumber;\r\n selectedWeeklyBooths = []\r\n businessLicenseExpiryDate;\r\n resaleOptionSelected = false;\r\n warnExcessPayment = false;\r\n warnZeroPayment = false; \r\n displayOtherChargeSalesTax=false;\r\n displayOtherChargeCityTax=false;\r\n displaySalesTax=false;\r\n displayCityTax = false;\r\n DisplayPayDueDate = false;\r\n DisplaySpecificDate = false;\r\n DisplayOptionValue = 0;\r\n AllowRentingOtherItems = false;\r\n OtherChargesPeriod = false;\r\n isdirty = false;\r\n @Input() newVendor;\r\n @Output() bookingFormCompleted = new EventEmitter(); \r\n @Output() rentalBookingData = new EventEmitter();\r\n @Output() isFormDirty = new EventEmitter(); \r\n @Output() isCancelClicked = new EventEmitter(); \r\n @Output() resaleNoInputRequired = new EventEmitter();\r\n @Output() businessLicenseRequired = new EventEmitter();\r\n public loaderIcon: Promise;\r\n sortOptions: SortSettingsModel = {\r\n columns: [{ field: 'RentalStartDate', direction: 'Ascending' },{ field: 'BoothNumber', direction: 'Ascending' }]\r\n };\r\n sortOtherItemsOptions: SortSettingsModel = {\r\n columns: [{ field: 'OtherItem', direction: 'Ascending' },{ field: 'BoothNo', direction: 'Ascending' }]\r\n };\r\n private subscriptions: Subscription[] = [];\r\n constructor(private renderer: Renderer2,\r\n private formbuilder: FormBuilder,\r\n private route: ActivatedRoute,\r\n private datePipe: DatePipe,\r\n public router: Router,\r\n public rentalService: RentalService,\r\n private customCurrency: customCurrencyPipe,\r\n private sharedDataService: SharedDataService,\r\n public vendorService: VendorService,\r\n private marketInfoService: MarketInfoService){\r\n this.rentalForm = this.formbuilder.group({\r\n marketWeekSunday: [0],\r\n marketWeekMonday: [0],\r\n marketWeekTuesday: [0],\r\n marketWeekWednesday: [0],\r\n marketWeekThursday: [0],\r\n marketWeekFriday: [0],\r\n marketWeekSaturday: [0],\r\n marketParts:[''],\r\n rentalStartDate:[],\r\n rentalEndDate:[],\r\n weeklyRentalStartDates:[],\r\n otherItemsScreen: this.formbuilder.group({\r\n otherChargeMarketWeek: [''],\r\n otherItemSearchText: ['']\r\n })\r\n })\r\n }\r\n\r\n ngOnInit(): void {\r\n this.route.params.subscribe((params: Params) => {\r\n this.marketId = params['marketId'];\r\n this.vendorId = params['vendorId'];\r\n });\r\n this.getMarketDays();\r\n this.getRentalPaymentSettings();\r\n this.getParts();\r\n this.getMarketVendorSettings();\r\n this.getVendorBusinessLicenseSettings();\r\n this.generateTempRecordNumber();\r\n this.getVendorProducts();\r\n this.getVendorBalances();\r\n this.getOtherRentalItems();\r\n if (this.sharedDataService.paymentSharedData)\r\n this.loadSelectedBooths();\r\n }\r\n\r\n generateTempRecordNumber() {\r\n this.rentalService.generateTempRecordNumber(this.marketId).subscribe((response) => {\r\n if (response) {\r\n this.tempRecordNo = response;\r\n }\r\n });\r\n }\r\n\r\n onCheckNumKeyPress(event: KeyboardEvent) {\r\n const allowedChars = /[0-9]/g;\r\n const key = event.key;\r\n if (event.key === 'Backspace' || event.key === 'Delete' || event.key === 'ArrowLeft' || event.key === 'ArrowRight' || event.key === '#') {\r\n return;\r\n }\r\n if (!key.match(allowedChars)) {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n cancelRental() {\r\n if (this.isdirty) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Unsaved changes will be lost. Are you sure you want to cancel?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.isFormDirty.emit(false);\r\n this.isCancelClicked.emit('3');\r\n } else {\r\n //do nothing\r\n }\r\n });\r\n } else {\r\n this.isFormDirty.emit(false);\r\n this.isCancelClicked.emit('3');\r\n }\r\n }\r\n\r\n updateOtherItem(data) {\r\n if (parseFloat(data.Quantity) == 0) {\r\n data.Quantity = \"1\"\r\n }\r\n this.totalSalesTax -= data.SalesTax.toString().includes('(') && data.SalesTax.toString().includes(')') ? -1 * parseFloat(data.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= data.CityTax.toString().includes('(') && data.CityTax.toString().includes(')') ? -1 * parseFloat(data.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalOtherRentalCharge -= data.OtherItemtotal.toString().includes('(') && data.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n\r\n var index;\r\n if (data.NewItem == true)\r\n index = this.selectedOtherItems.findIndex(oth => oth.Id === data.Id && oth.RentalMonth == data.RentalMonth && oth.NewItem == true && oth.BoothNo == data.BoothNo);\r\n else\r\n index = this.selectedOtherItems.findIndex(oth => oth.Id === data.Id && oth.RentalMonth == data.RentalMonth && oth.MonthlyRentalIds == data.MonthlyRentalIds && oth.BoothNo == data.BoothNo);\r\n\r\n if (index !== -1) {\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: data.Id,\r\n VendorId: this.vendorId,\r\n Quantity: data.Quantity,\r\n OtherItemCharge: data.OtherItemCharge.includes('(') && data.OtherItemCharge.includes(')') ? (-1) * parseFloat(data.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n WRNewVendorRequest: this.newVendor\r\n }\r\n this.rentalService.getOtherItemsRentalCharges(obj).subscribe((res: any) => {\r\n this.selectedOtherItems[index].SalesTax = this.customCurrency.transform(res.SalesTax.toString());\r\n this.selectedOtherItems[index].CityTax = this.customCurrency.transform(res.CityTax.toString());\r\n const isNegative = data.OtherItemCharge.includes('(') && data.OtherItemCharge.includes(')');\r\n const totalValue = parseFloat(data.OtherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n data.OtherItemtotal = this.customCurrency.transform((finalCharge * data.Quantity).toString());\r\n this.selectedOtherItems[index].OtherItemtotal = data.OtherItemtotal;\r\n this.selectedOtherItems[index].OtherItemCharge = this.customCurrency.transform((finalCharge).toString());\r\n this.selectedOtherItems[index].Recurring = data.Recurring;\r\n this.selectedOtherItems[index].Reference = data.Reference;\r\n this.selectedOtherItems[index].Quantity = data.Quantity;\r\n this.selectedOtherItems[index].SalesTax = this.customCurrency.transform(res.SalesTax.toString());\r\n this.selectedOtherItems[index].CityTax = this.customCurrency.transform(res.CityTax.toString());\r\n this.gridOtherRental.refresh();\r\n this.getDiscounts();\r\n this.totalOtherRentalCharge += data.OtherItemtotal.toString().includes('(') && data.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n });\r\n }\r\n }\r\n\r\n getRentalPaymentSettings() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.rentalService.getRentalSettings(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.warnExcessPayment = res.WarnExcessPayment;\r\n this.warnZeroPayment = res.WarnZeroPayment;\r\n this.displayOtherChargeByBooth = res.DisplayOtherChargesByBooth; \r\n this.displayCityTax = res.RentalSecondTaxable;\r\n this.displaySalesTax = res.RentalTaxable;\r\n this.gridWeeklyRental.getColumnByField(\"SalesTax\").visible = this.displaySalesTax;\r\n this.gridWeeklyRental.getColumnByField(\"CityTax\").visible = this.displayCityTax; \r\n this.gridWeeklyRental.refreshColumns(); \r\n this.displayOtherChargeSalesTax = res.OtherRentalTaxable;\r\n this.displayOtherChargeCityTax = res.OtherRentalSecondTaxable; \r\n this.ResaleNumberRequired = res.ResaleNumberRequired;\r\n this.DaysSellWithoutResaleNumber = res.DaysSellWithoutResaleNumber;\r\n this.BusinessLicenseNumberRequired = res.BusinessLicenseNumberRequired;\r\n this.DaysSellWithoutBusiLicNumber = res.DaysSellWithoutBusiLicNumber; \r\n this.DisplayPayDueDate = res.DisplayPayDueDate;\r\n this.DisplaySpecificDate = res.DisplaySpecificDate;\r\n this.DisplayOptionValue = res.DisplayOptionValue;\r\n const nextDate = this.getNextDate(this.DisplayOptionValue);\r\n this.secondTaxName = res.SecondTaxName ? res.SecondTaxName: \"Sec Level Tax\"\r\n var secLevelTaxRentHeader = this.gridWeeklyRental.getColumnByField(\"CityTax\"); \r\n secLevelTaxRentHeader.headerText = this.secondTaxName; \r\n this.RentalTaxPercentage = res.RentalTaxPercentage;\r\n this.OtherRentalTaxPercentage = res.OtherRentalTaxPercentage;\r\n this.RentalSecondTaxPercentage = res.RentalSecondTaxPercentage;\r\n this.OtherRentalSecondTaxPercentage = res.OtherRentalSecondTaxPercentage;\r\n this.OtherChargesPeriod = res.OtherChargesPeriod;\r\n if(this.newVendor){\r\n this.gridWeeklyRental.getColumnByField(\"Product\").visible = false;\r\n }\r\n this.gridWeeklyRental.refresh();\r\n if (this.AllowRentingOtherItems) {\r\n this.gridOtherRental.getColumnByField(\"BoothNo\").visible = res.DisplayOtherChargesByBooth;\r\n this.gridOtherRental.getColumnByField(\"SalesTax\").visible = this.displayOtherChargeSalesTax;\r\n this.gridOtherRental.getColumnByField(\"CityTax\").visible = this.displayOtherChargeCityTax;\r\n var secLevelTaxOtherRentHeader = this.gridOtherRental.getColumnByField(\"CityTax\");\r\n secLevelTaxOtherRentHeader.headerText = this.secondTaxName;\r\n this.gridOtherRental.refreshColumns();\r\n this.gridOtherRental.refresh();\r\n } \r\n } \r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getNextDate(day: number): Date {\r\n if (this.DisplaySpecificDate) {\r\n const today = new Date();\r\n let nextDate = new Date(today.getFullYear(), today.getMonth(), day);\r\n // If the nextDate is in the past or today, move to the next month\r\n if (nextDate < today) {\r\n nextDate.setMonth(nextDate.getMonth() + 1);\r\n }\r\n // Handle cases where the day is not valid in the next month (e.g., 31st in February)\r\n while (nextDate.getDate() !== day) {\r\n nextDate.setMonth(nextDate.getMonth() + 1);\r\n nextDate.setDate(day);\r\n }\r\n return nextDate;\r\n }\r\n else{\r\n const today = new Date();\r\n let nextDate = new Date(today.setDate(today.getDate() + day));\r\n return nextDate;\r\n }\r\n }\r\n\r\n getOtherRentalItems() {\r\n var rentalDatePeriod = '';\r\n if (this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek'])\r\n rentalDatePeriod = this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek'].split('-')[0];\r\n this.subscriptions.push(this.rentalService.getOtherRentalItems(this.marketId, rentalDatePeriod).subscribe((response) => {\r\n if (response) {\r\n response.map((el, i) => {\r\n if (el.WebRental) {\r\n const ob = {\r\n Id: el.OtherItemId,\r\n OtherItem: el.OtherItem,\r\n OtherItemCharge: this.customCurrency.transform(el.OtherItemWeeklyCharge),\r\n Quantity: 0,\r\n OtherItemtotal: this.customCurrency.transform('0'),\r\n Recurring: el.Recurring,\r\n othChgBooths: \"none\"\r\n }\r\n this.otherRentalCharges.push(ob);\r\n this.otherItemList.push(ob);\r\n }\r\n });\r\n }\r\n }, (err) => {\r\n }));\r\n }\r\n\r\n getVendorProducts() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.rentalService.GetVendorProductsById(this.marketId, this.vendorId).subscribe((res: any) => {\r\n if (res) {\r\n this.vendorProducts = res.body;\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getParts() {\r\n const sub = this.marketInfoService.getParts(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.parts = res;\r\n this.getWebRentalSetting();\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getMarketVendorSettings(){\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.vendorService.getMarketVendorSettings(this.vendorId, this.marketId).subscribe((res: any) => {\r\n var response = res.body;\r\n if (response) {\r\n this.exemptResale = response.ExemptResale;\r\n this.resaleNo = response.Resale;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getVendorBusinessLicenseSettings(){\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.vendorService.getVendorBusinessLicenseSettings(this.vendorId, this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.businessLicenseNumber = res.LicenseNumber;\r\n this.businessLicenseExpiryDate = res.ExpiryDate;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getWebRentalSetting(){\r\n const sub = this.marketInfoService.getWebRentalSetting(this.marketId).subscribe((res: any) => {\r\n if (res) { \r\n this.defaultPart = res.DefaultLayoutPart; \r\n this.rentalForm.get('marketParts').setValue(this.defaultPart);\r\n this.rentalForm.get('marketParts').setValue(this.defaultPart);\r\n this.ApplyBookingFee = res.ApplyBookingFee;\r\n this.ApplyBookingFeeId = res.ApplyBookingFeeId;\r\n this.AllowRentingOtherItems = res.AllowRentingOtherItems;\r\n if (this.ApplyBookingFee) {\r\n this.subscriptions.push(this.rentalService.getBookingFeeById(this.marketId, this.ApplyBookingFeeId).subscribe((resFee: any) => {\r\n if (resFee) {\r\n this.bookingFeeAmount = resFee.OtherItemCharge;\r\n }\r\n }));\r\n }\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n } \r\n\r\n refreshAddBooth() { \r\n this.getMarketDays();\r\n this.selectedWeeklyBoothData = [];\r\n if (this.selectedBoothsForRental.length > 0) {\r\n this.selectedBoothsForRental.forEach(ele => {\r\n const temp = {\r\n TempRecordNo: this.tempRecordNo.toString(),\r\n BoothNumber: ele.BoothNumber,\r\n StartDate: new Date(ele.StartDate),\r\n RentalType: 5,\r\n EndDate: new Date(ele.EndDate),\r\n Sunday: this.rentalForm.value['marketWeekSunday'] ?? false,\r\n Monday: this.rentalForm.value['marketWeekMonday'] ?? false,\r\n Tuesday: this.rentalForm.value['marketWeekTuesday'] ?? false,\r\n Wednesday: this.rentalForm.value['marketWeekWednesday'] ?? false,\r\n Thursday: this.rentalForm.value['marketWeekThursday'] ?? false,\r\n Friday: this.rentalForm.value['marketWeekFriday'] ?? false,\r\n Saturday: this.rentalForm.value['marketWeekSaturday'] ?? false\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n });\r\n }\r\n this.selectedBoothsForRental = [];\r\n this.rentalForm.reset();\r\n this.rentalForm.patchValue({\r\n rentalStartDate: this.weeklyMarketDays[0].RentalStartDays,\r\n rentalEndDate: this.weeklyMarketDays[0].RentalEndDays,\r\n marketParts: this.defaultPart\r\n })\r\n }\r\n\r\n getVendorBalances() {\r\n this.vendorDiscountPlans =[];\r\n forkJoin({\r\n vendorBalanceRes: this.rentalService.getVendorBalances(this.vendorId, this.marketId),\r\n discountPlansRes: this.vendorService.GetDiscountPlan(this.vendorId,this.marketId)\r\n }).subscribe(\r\n ({ vendorBalanceRes, discountPlansRes }: any) => {\r\n if (vendorBalanceRes) {\r\n this.priorBalance = vendorBalanceRes.PriorBalance;\r\n }\r\n if(discountPlansRes){\r\n if (discountPlansRes) {\r\n for (const el of discountPlansRes) {\r\n if (el.Weekly && el.OnlineTransactions) {\r\n const ob = {\r\n PlanSeqId: el.PlanSeqId,\r\n PlanId: el.PlanId,\r\n PlanName: el.PlanName,\r\n EffectiveFrom: this.datePipe.transform(el.EffectiveFrom, 'MM/dd/yyyy'),\r\n ExpiryDate: this.datePipe.transform(el.ExpiryDate, 'MM/dd/yyyy'),\r\n DiscountType: el.DiscountType == 0 ? DiscountType.Percentage : DiscountType.FixedAmount,\r\n DiscountValue: el.DiscountValue,\r\n OtherItems: el.OtherItems,\r\n Daily: el.Daily,\r\n Weekly: el.Weekly,\r\n Monthly: el.Monthly,\r\n CombinedWeekly: el.CombinedWeekly,\r\n CombinedMonthly: el.CombinedMonthly,\r\n IsExceedAmount: el.IsExceedAmount,\r\n ExceedAmount: el.ExceedAmount,\r\n BalanceDue: el.BalanceDue,\r\n Notes: el.Notes,\r\n QDR: el.QDR,\r\n CheckAll: el.Selected,\r\n AutoSelected: el.Selected,\r\n DisableDiscount: el.Selected,\r\n AppliedDiscount: this.customCurrency.transform(\"0.00\"),\r\n SalesTaxAmount: this.customCurrency.transform(\"0.00\"),\r\n SecondLevelTaxAmount: this.customCurrency.transform(\"0.00\"),\r\n SalesTaxApplied: el.SalesTax,\r\n SecondLevelTaxApplied: el.SecondLevelTax,\r\n }\r\n this.vendorDiscountPlans.push(ob);\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n // this.disableDiscountAmount = this.vendorDiscountPlans.length > 0 ? false : true;\r\n }\r\n this.getDiscounts();\r\n }\r\n })\r\n }\r\n\r\n getDiscounts() {\r\n var totalRentalCharge = this.totalRentalCharge;\r\n var totalSalesTax = this.totalSalesTax;\r\n var totalSecondLeveltax = this.totalSecondLeveltax;\r\n var totalOtherRentalCharge = this.totalOtherRentalCharge;\r\n var priorBalance = 0;\r\n var totalChargeWithDue = this.priorBalance + (totalRentalCharge)\r\n + (totalSalesTax)\r\n + (totalSecondLeveltax)\r\n + (totalOtherRentalCharge)\r\n\r\n var totalCharge = (totalRentalCharge) + (totalSalesTax) + (totalSecondLeveltax) + (totalOtherRentalCharge)\r\n // totalCharge = totalCharge.toString().includes('(') && totalCharge.toString().includes(')') ? -1 * parseFloat(totalCharge.toString().replace(/[^0-9.-]/g, '')) : parseFloat(totalCharge.toString().replace(/[^0-9.-]/g, ''));\r\n\r\n if (this.vendorDiscountPlans.length > 0 && totalCharge > 0) {\r\n var discountTotalAmount = 0;\r\n var totalAmountForDiscount = 0;\r\n for (const disc of this.vendorDiscountPlans) {\r\n disc.CheckAll = disc.AutoSelected;\r\n if (disc.CheckAll && disc.Weekly) {\r\n var currentDiscountValue = 0;\r\n if (!disc.BalanceDue || (disc.BalanceDue && priorBalance <= 0)) {\r\n if (!disc.IsExceedAmount || (disc.IsExceedAmount && totalCharge > disc.ExceedAmount)) {\r\n const discountValue = disc.DiscountValue;\r\n totalAmountForDiscount = totalRentalCharge\r\n if (disc.OtherItems) {\r\n totalAmountForDiscount += totalOtherRentalCharge\r\n }\r\n if (disc.DiscountType == 'Percentage') {\r\n discountTotalAmount += totalAmountForDiscount * (discountValue / 100);\r\n currentDiscountValue = totalAmountForDiscount * (discountValue / 100);\r\n }\r\n else {\r\n discountTotalAmount += discountValue;\r\n currentDiscountValue = discountValue;\r\n }\r\n }\r\n else {\r\n disc.CheckAll = false;\r\n }\r\n }\r\n else {\r\n disc.CheckAll = false;\r\n }\r\n disc.AppliedDiscount = this.customCurrency.transform(currentDiscountValue.toString());\r\n }\r\n else {\r\n disc.AppliedDiscount = this.customCurrency.transform(\"0\");\r\n }\r\n\r\n this.totalDiscountCharge = parseFloat(discountTotalAmount.toFixed(2)).toString()\r\n }\r\n }\r\n }\r\n\r\n created(args) {\r\n if(this.newVendor){\r\n this.gridWeeklyRental.getColumnByField(\"Product\").visible = false;\r\n }\r\n }\r\n\r\n getMarketDays() {\r\n const sub = this.marketInfoService.getMarketDays(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.sunday = res.Sunday;\r\n this.monday = res.Monday;\r\n this.tuesday = res.Tuesday;\r\n this.wednesday = res.Wednesday;\r\n this.thursay = res.Thursday;\r\n this.friday = res.Friday;\r\n this.saturday = res.Saturday;\r\n this.rentalForm.get('marketWeekSunday').setValue(this.sunday);\r\n this.rentalForm.get('marketWeekMonday').setValue(this.monday);\r\n this.rentalForm.get('marketWeekTuesday').setValue(this.tuesday);\r\n this.rentalForm.get('marketWeekWednesday').setValue(this.wednesday);\r\n this.rentalForm.get('marketWeekThursday').setValue(this.thursay);\r\n this.rentalForm.get('marketWeekFriday').setValue(this.friday);\r\n this.rentalForm.get('marketWeekSaturday').setValue(this.saturday); \r\n this.gridWeeklyRental.getColumnByField(\"Sunday\").visible = this.sunday;\r\n this.gridWeeklyRental.getColumnByField(\"Monday\").visible = this.monday;\r\n this.gridWeeklyRental.getColumnByField(\"Tuesday\").visible = this.tuesday;\r\n this.gridWeeklyRental.getColumnByField(\"Wednesday\").visible = this.wednesday;\r\n this.gridWeeklyRental.getColumnByField(\"Thursday\").visible = this.thursay;\r\n this.gridWeeklyRental.getColumnByField(\"Friday\").visible = this.friday;\r\n this.gridWeeklyRental.getColumnByField(\"Saturday\").visible = this.saturday; \r\n this.getWeeklyMarkets();\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getWeeklyMarkets() {\r\n this.marketInfoService.getWeeklyMarketDays(this.marketId).subscribe((response) => {\r\n if (response) {\r\n this.weeklyMarketDays = response;\r\n this.rentalForm.patchValue({\r\n rentalStartDate: response[0].RentalStartDays,\r\n rentalEndDate: response[0].RentalEndDays,\r\n });\r\n this.rentalForm.controls['otherItemsScreen'].patchValue({\r\n otherChargeMarketWeek: response[0].RentalStartDays\r\n });\r\n this.selectedWeeklyMarketDays();\r\n }\r\n }, (err) => {\r\n });\r\n }\r\n\r\n checkSelectedDates() {\r\n const rentalStartDate = new Date(this.rentalForm.value['rentalStartDate'].split('-')[0]);\r\n const rentalEndDate = new Date(this.rentalForm.value['rentalEndDate'].split('-')[0]);\r\n if (rentalEndDate < rentalStartDate) {\r\n this.rentalForm.get('rentalEndDate').setValue(this.rentalForm.value['rentalStartDate']);\r\n }\r\n this.selectedWeeklyMarketDays(); \r\n }\r\n\r\n selectedWeeklyMarketDays(){\r\n this.selectedMarketDays = [];\r\n this.rentalForm.value['marketWeekSunday'] == true ? this.selectedMarketDays.push(1) : 0;\r\n this.rentalForm.value['marketWeekMonday'] == true ? this.selectedMarketDays.push(2) : 0;\r\n this.rentalForm.value['marketWeekTuesday'] == true ? this.selectedMarketDays.push(3) : 0;\r\n this.rentalForm.value['marketWeekWednesday'] == true ? this.selectedMarketDays.push(4) : 0;\r\n this.rentalForm.value['marketWeekThursday'] == true ? this.selectedMarketDays.push(5) : 0;\r\n this.rentalForm.value['marketWeekFriday'] == true ? this.selectedMarketDays.push(6) : 0;\r\n this.rentalForm.value['marketWeekSaturday'] == true ? this.selectedMarketDays.push(7) : 0;\r\n\r\n const rentalStartDate = new Date(this.rentalForm.value['rentalStartDate'].split('-')[0]);\r\n const rentalEndDate = new Date(this.rentalForm.value['rentalEndDate'].split('-')[0]);\r\n if (rentalEndDate < rentalStartDate) {\r\n this.rentalForm.get('rentalEndDate').setValue(this.rentalForm.value['rentalStartDate']);\r\n }\r\n const today: Date = new Date(new Date().toDateString())\r\n this.weeklyRentalStartDates = [];\r\n this.selectedMarketDays.map((el, i) => {\r\n const startDate = new Date(this.rentalForm.value['rentalStartDate'].split(\"-\")[0]);\r\n const endDate = new Date(this.rentalForm.value['rentalEndDate'].split(\"-\")[1]);\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay >= today) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n this.weeklyRentalStartDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = this.weeklyRentalStartDates.sort(compareDates);\r\n\r\n if (this.weeklyRentalStartDates.length)\r\n this.rentalForm.get('weeklyRentalStartDates').setValue(this.weeklyRentalStartDates[0].startDate); \r\n }); \r\n }\r\n\r\n getMonthIndex(monthString: string): number {\r\n const months = [\r\n 'January', 'February', 'March', 'April', 'May', 'June',\r\n 'July', 'August', 'September', 'October', 'November', 'December'\r\n ];\r\n const monthIndex = months.findIndex(month => month.toLowerCase() === monthString.toLowerCase());\r\n return monthIndex !== -1 ? monthIndex : 0;\r\n }\r\n\r\n setDefaultRentalItem(args, selectedItems) {\r\n selectedItems.Quantity = 0\r\n selectedItems.OtherItemtotal = 0\r\n if (args.srcElement.checked) {\r\n selectedItems.Quantity = 1\r\n const isNegative = selectedItems.OtherItemCharge.includes('(') && selectedItems.OtherItemCharge.includes(')');\r\n const totalValue = parseFloat(selectedItems.OtherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n selectedItems.OtherItemtotal = this.customCurrency.transform((finalCharge * selectedItems.Quantity).toString());\r\n this.selectedOtherCharges.push({\r\n Id: selectedItems.Id,\r\n OtherItem: selectedItems.OtherItem,\r\n OtherItemCharge: selectedItems.OtherItemCharge,\r\n Quantity: selectedItems.Quantity,\r\n OtherItemtotal: selectedItems.OtherItemtotal,\r\n othChgBooths: selectedItems.othChgBooths,\r\n Recurring: selectedItems.Recurring,\r\n RentalWeek:this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek']\r\n });\r\n } else {\r\n const index = this.selectedOtherCharges.findIndex(item => item.Id === selectedItems.Id);\r\n if (index !== -1) {\r\n this.selectedOtherCharges.splice(index, 1);\r\n }\r\n }\r\n }\r\n\r\n async getBoothsAndItemsForOtherCharges() {\r\n this.boothsForOtherCharge = [];\r\n this.selectedOtherCharges = [];\r\n if (this.OtherChargesPeriod) {\r\n this.otherRentalCharges = [];\r\n this.otherItemList = [];\r\n await this.getOtherRentalItems();\r\n }\r\n const uniqueBoothNumbers = new Map();\r\n if (this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek']) {\r\n this.selectedWeeklyBooths.forEach((item) => {\r\n if (item.RentStartPeriod == this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek']) {\r\n const boothNumber = item.BoothNumber;\r\n if (!uniqueBoothNumbers.has(boothNumber)) {\r\n this.boothsForOtherCharge.push({ BoothNumber: item.BoothNumber })\r\n uniqueBoothNumbers.set(boothNumber, true);\r\n }\r\n }\r\n });\r\n }\r\n this.boothsForOtherCharge.sort((a, b) => {\r\n if (a.BoothNumber < b.BoothNumber) {\r\n return -1;\r\n }\r\n if (a.BoothNumber > b.BoothNumber) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n }\r\n\r\n addOtherCharges() {\r\n if (this.selectedOtherCharges) {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedOtherCharges.map((el, i) => {\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: el.Id,\r\n VendorId: this.vendorId,\r\n Quantity: el.Quantity,\r\n OtherItemCharge: el.OtherItemCharge.includes('(') && el.OtherItemCharge.includes(')') ? (-1) * parseFloat(el.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(el.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n WRNewVendorRequest: this.newVendor\r\n }\r\n const index = this.selectedOtherItems.findIndex(item => item.Id === el.Id && item.RentalWeek == this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek'] && item.BoothNo == el.othChgBooths);\r\n this.rentalService.getOtherItemsRentalCharges(obj).subscribe((res: any) => {\r\n var newItem = [];\r\n if (index !== -1) {\r\n var otherItemTotal = this.selectedOtherItems[index].OtherItemtotal;\r\n var salesTax = this.selectedOtherItems[index].SalesTax;\r\n var cityTax = this.selectedOtherItems[index].CityTax;\r\n this.totalOtherRentalCharge -= otherItemTotal.toString().includes('(') && otherItemTotal.toString().includes(')') ? -1 * parseFloat(otherItemTotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(otherItemTotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= salesTax.toString().includes('(') && salesTax.toString().includes(')') ? -1 * parseFloat(salesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(salesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= cityTax.toString().includes('(') && cityTax.toString().includes(')') ? -1 * parseFloat(cityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(cityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n \r\n const ob = {\r\n Id: el.Id,\r\n WeekOtherRentalId: 0,\r\n OtherItemCharge: el.OtherItemCharge,\r\n OtherItem: el.OtherItem,\r\n Quantity: el.Quantity,\r\n OtherItemtotal: el.OtherItemtotal,\r\n RentalWeek: el.RentalWeek,\r\n SalesTax: this.customCurrency.transform(res.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(res.CityTax.toString()),\r\n BoothNo: el.othChgBooths,\r\n Recurring: el.Recurring,\r\n Reference:el.Reference,\r\n NewItem: true,\r\n WeeklyOtherRentalIds:''\r\n }\r\n this.selectedOtherItems[index] = ob;\r\n this.gridOtherRental.refresh();\r\n }\r\n else {\r\n const ob = {\r\n Id: el.Id,\r\n WeekOtherRentalId: 0,\r\n OtherItem: el.OtherItem,\r\n OtherItemCharge: el.OtherItemCharge,\r\n Quantity: el.Quantity,\r\n OtherItemtotal: el.OtherItemtotal,\r\n RentalWeek: el.RentalWeek,\r\n SalesTax: this.customCurrency.transform(res.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(res.CityTax.toString()),\r\n BoothNo: el.othChgBooths,\r\n Recurring: el.Recurring,\r\n Reference:el.Reference,\r\n NewItem: true,\r\n WeeklyOtherRentalIds: ''\r\n }\r\n newItem.push(JSON.parse(JSON.stringify(ob)));\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n }\r\n this.totalOtherRentalCharge += el.OtherItemtotal.toString().includes('(') && el.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(el.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(el.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.getDiscounts();\r\n if (newItem.length > 0) {\r\n this.selectedOtherItems = this.selectedOtherItems.concat(newItem);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n });\r\n\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }\r\n\r\n isDateSelected(item: any): boolean {\r\n var isItemSelected = this.selectedOtherItems.some(\r\n (element) =>\r\n (element.RentalWeek === this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek']) &&\r\n element.Id === item.Id && element.NewItem == true\r\n );\r\n\r\n if(!isItemSelected){\r\n isItemSelected = this.selectedOtherCharges.some(\r\n (element) =>\r\n (element.RentalWeek === this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek']) &&\r\n element.Id === item.Id\r\n );\r\n }\r\n\r\n !isItemSelected? item.otherItemChecked = false : item.otherItemChecked = true;\r\n item.othChgBooths = \"none\";\r\n return isItemSelected;\r\n }\r\n\r\n checkMarketDaysSelected() {\r\n const sunday = this.rentalForm.value['marketWeekSunday'];\r\n const monday = this.rentalForm.value['marketWeekMonday'];\r\n const tuesday = this.rentalForm.value['marketWeekTuesday'];\r\n const wednesday = this.rentalForm.value['marketWeekWednesday'];\r\n const thursday = this.rentalForm.value['marketWeekThursday'];\r\n const friday = this.rentalForm.value['marketWeekFriday'];\r\n const saturday = this.rentalForm.value['marketWeekSaturday'];\r\n return sunday || monday || tuesday || wednesday || thursday || friday || saturday;\r\n }\r\n\r\n openLayout() {\r\n this.layoutParts = this.rentalForm.value['marketParts'];\r\n var marketDaysSelected = this.checkMarketDaysSelected();\r\n if (!marketDaysSelected) {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Please select a market day!`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n if (this.selectedMarketDays.length > 0) { \r\n this.selectedDates=[]; \r\n this.selectedMarketDays.map((el, i) => {\r\n const startDate = new Date(this.rentalForm.value['rentalStartDate'].split(\"-\")[0]);\r\n const endDate = new Date(this.rentalForm.value['rentalEndDate'].split(\"-\")[1]);\r\n const selectedDayOfWeek = el-1; \r\n let currentDay = new Date(startDate); \r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n this.selectedDates.push(this.datePipe.transform(new Date(currentDay),'MM/dd/yyyy'));\r\n } \r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n });\r\n }\r\n this.weeklyLayoutData = {\r\n Sunday: this.rentalForm.value['marketWeekSunday'],\r\n Monday: this.rentalForm.value['marketWeekMonday'],\r\n Tuesday: this.rentalForm.value['marketWeekTuesday'],\r\n Wednesday: this.rentalForm.value['marketWeekWednesday'],\r\n Thursday: this.rentalForm.value['marketWeekThursday'],\r\n Friday: this.rentalForm.value['marketWeekFriday'],\r\n Saturday: this.rentalForm.value['marketWeekSaturday'],\r\n weeklyRentalStartDate: this.rentalForm.value['rentalStartDate'],\r\n weeklyRentalEndDate: this.rentalForm.value['rentalEndDate'],\r\n weeklyRentalMarketDays : this.selectedMarketDays,\r\n selectedDates :this.selectedDates,\r\n weeklyRentalFirstDay:new Date(this.rentalForm.value['rentalStartDate'].split(\"-\")[0]),\r\n weeklyRentalSelectedBooths:this.selectedWeeklyBooths.filter(e => e.NewBooth == true),\r\n tempRecordNo: this.tempRecordNo\r\n }\r\n this.displayLayout = true;\r\n }\r\n }\r\n\r\n selectedBoothsFromLayout(data) {\r\n window.scrollTo(0, 0);\r\n this.selectedWeeklyBoothData = data;\r\n this.displayLayout = false;\r\n const sub = this.marketInfoService.getMarketDays(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.sunday = res.Sunday;\r\n this.monday = res.Monday;\r\n this.tuesday = res.Tuesday;\r\n this.wednesday = res.Wednesday;\r\n this.thursay = res.Thursday;\r\n this.friday = res.Friday;\r\n this.saturday = res.Saturday;\r\n this.rentalForm.get('marketWeekSunday').setValue(this.sunday);\r\n this.rentalForm.get('marketWeekMonday').setValue(this.monday);\r\n this.rentalForm.get('marketWeekTuesday').setValue(this.tuesday);\r\n this.rentalForm.get('marketWeekWednesday').setValue(this.wednesday);\r\n this.rentalForm.get('marketWeekThursday').setValue(this.thursay);\r\n this.rentalForm.get('marketWeekFriday').setValue(this.friday);\r\n this.rentalForm.get('marketWeekSaturday').setValue(this.saturday);\r\n this.gridWeeklyRental.getColumnByField(\"Sunday\").visible = this.sunday;\r\n this.gridWeeklyRental.getColumnByField(\"Monday\").visible = this.monday;\r\n this.gridWeeklyRental.getColumnByField(\"Tuesday\").visible = this.tuesday;\r\n this.gridWeeklyRental.getColumnByField(\"Wednesday\").visible = this.wednesday;\r\n this.gridWeeklyRental.getColumnByField(\"Thursday\").visible = this.thursay;\r\n this.gridWeeklyRental.getColumnByField(\"Friday\").visible = this.friday;\r\n this.gridWeeklyRental.getColumnByField(\"Saturday\").visible = this.saturday;\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n this.validateAndAddSelectedBoothsToGrid();\r\n }\r\n\r\n validateAndAddSelectedBoothsToGrid() {\r\n let noResale = true;\r\n var rentalDates = [];\r\n var marketDay;\r\n var vendorRentalDays = [];\r\n if ((this.ResaleNumberRequired && !this.exemptResale) || (this.BusinessLicenseNumberRequired)) {\r\n var rentalstartDate = \"\";\r\n var selectedBoothRecord = this.selectedWeeklyBooths.filter(e => e.NewBooth == true || e.ExtendRental == true);\r\n if (selectedBoothRecord.length > 0) {\r\n selectedBoothRecord.forEach(record => {\r\n var selectedDaysOfWeek;\r\n record.Sunday == true ? selectedDaysOfWeek = 0 :\r\n record.Monday == true ? selectedDaysOfWeek = 1 :\r\n record.Tuesday == true ? selectedDaysOfWeek = 2 :\r\n record.Wednesday == true ? selectedDaysOfWeek = 3 :\r\n record.Thursday == true ? selectedDaysOfWeek = 4 :\r\n record.Friday == true ? selectedDaysOfWeek = 5 :\r\n record.Saturday == true ? selectedDaysOfWeek = 6 : 0;\r\n const startDate = new Date(record.RentStartPeriod.split('-')[0]);\r\n const endDate = new Date(record.RentEndPeriod.split('-')[1]);\r\n while (new Date(startDate) <= new Date(endDate)) {\r\n if (startDate.getDay() === selectedDaysOfWeek) {\r\n rentalDates.push(this.datePipe.transform(new Date(startDate), 'MMM d, y'));\r\n }\r\n startDate.setDate(startDate.getDate() + 1);\r\n } \r\n\r\n rentalDates.map(date => {\r\n const targetDateString = this.datePipe.transform(date, \"MM/dd/yyyy\");\r\n const dateExist = vendorRentalDays.find(el => {\r\n const rentalDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(date, \"MM/dd/yyyy\");\r\n vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n if (this.marketDayCountForResale > this.DaysSellWithoutResaleNumber) {\r\n return; // exits the forEach loop when the condition is met\r\n }\r\n }\r\n });\r\n });\r\n }\r\n \r\n rentalDates=[];\r\n for(const el of this.selectedMarketDays){\r\n switch (el) {\r\n case 1: marketDay = 'Sun'\r\n break;\r\n case 2: marketDay = 'Mon'\r\n break;\r\n case 3: marketDay = 'Tue'\r\n break;\r\n case 4: marketDay = 'Wed'\r\n break;\r\n case 5: marketDay = 'Thu'\r\n break;\r\n case 6: marketDay = 'Fri'\r\n break;\r\n case 7: marketDay = 'Sat'\r\n break;\r\n } \r\n const startDate = new Date(this.rentalForm.value['weeklyRentalStartDates']);\r\n const endDate = new Date(this.rentalForm.value['rentalEndDate'].split(\"-\")[1]);\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n const excludedDates = this.excludedMarketDays.map(dateString => new Date(dateString));\r\n while (currentDay <= endDate) {\r\n var exludedDate = excludedDates.some(date => {\r\n return this.datePipe.transform(date, 'MM/dd/yyyy') === this.datePipe.transform(currentDay, 'MM/dd/yyyy');\r\n });\r\n if (currentDay.getDay() === selectedDayOfWeek && !exludedDate) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n const apiCalls = rentalDates.map(date => {\r\n const obj = {\r\n VendorID: this.vendorId,\r\n VendorRentalDate: new Date(date.startDate)\r\n };\r\n\r\n return this.rentalService.getVendorRentalDays(obj).pipe(\r\n catchError(error => {\r\n console.error('API call failed for date:', date.startDate, error);\r\n return of([]); // Return an empty array in case of error\r\n })\r\n );\r\n });\r\n\r\n forkJoin(apiCalls).subscribe((responses: any[][]) => {\r\n responses.forEach((res, index) => {\r\n if (this.marketDayCountForResale <= this.DaysSellWithoutResaleNumber) {\r\n const date = rentalDates[index].startDate;\r\n if (res && res.length > 0) {\r\n res.forEach(el => {\r\n const targetDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n const dateExist = vendorRentalDays.find(data => {\r\n const rentalDateString = this.datePipe.transform(data.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n }\r\n });\r\n }\r\n\r\n const targetDateString = this.datePipe.transform(date, \"MM/dd/yyyy\");\r\n const dateExist = vendorRentalDays.find(el => {\r\n const rentalDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(date, \"MM/dd/yyyy\");\r\n vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n }\r\n }\r\n });\r\n\r\n if (!this.newVendor) {\r\n if (this.ResaleNumberRequired && !this.exemptResale && !this.resaleNo && this.marketDayCountForResale > this.DaysSellWithoutResaleNumber && !this.resaleOptionSelected) {\r\n const modal = this.modalResaleNo.nativeElement;\r\n modal.classList.add('show');\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'block';\r\n this.ResaleOrBusinessHeader = \"Resale Number\"\r\n this.resaleNoDisplay = true;\r\n this.businessLicenseDisplay = false;\r\n }\r\n noResale = false;\r\n }\r\n else if (this.BusinessLicenseNumberRequired && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n if (!this.businessLicenseNumber || !this.businessLicenseExpiryDate) {\r\n const modal = this.modalResaleNo.nativeElement;\r\n modal.classList.add('show');\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'block';\r\n this.ResaleOrBusinessHeader = \"Business License Number\";\r\n this.resaleNoDisplay = false;\r\n this.businessLicenseDisplay = true;\r\n }\r\n noResale = false;\r\n }\r\n else {\r\n if (this.getDateFromDateTime(new Date(this.businessLicenseExpiryDate)) < this.getDateFromDateTime(new Date())) {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Business License is expired! Please contact the market`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n }\r\n else {\r\n noResale = true;\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n else {\r\n if (this.ResaleNumberRequired && !this.exemptResale && !this.resaleNo && this.marketDayCountForResale > this.DaysSellWithoutResaleNumber && !this.resaleOptionSelected) {\r\n this.resaleNoInputRequired.emit(true)\r\n }\r\n if (this.BusinessLicenseNumberRequired && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n this.businessLicenseRequired.emit(true);\r\n }\r\n this.addSelectedBoothsToGrid();\r\n }\r\n });\r\n } else {\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n\r\n getDateFromDateTime(date){\r\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\r\n }\r\n\r\n AddBoothsOnGridOnValidationSucess() {\r\n var addToGrid = false;\r\n var closeModalPopup = false;\r\n const modal = this.modalResaleNo.nativeElement;\r\n if (this.resaleNoDisplay) {\r\n if (!this.resaleNo || this.resaleNo.trim() === '') {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Enter the resale number`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n addToGrid = true;\r\n closeModalPopup = true;\r\n this.resaleOptionSelected = true;\r\n }\r\n\r\n if (closeModalPopup) {\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'none';\r\n modal.classList.remove('show');\r\n }\r\n }\r\n\r\n if (addToGrid) {\r\n const obj = {\r\n VendorID: this.vendorId,\r\n ExemptResaleNo: false,\r\n ExemptResaleReason: \"\",\r\n ResaleNo: this.resaleNo,\r\n MarketId: this.marketId\r\n }\r\n\r\n this.subscriptions.push(this.rentalService.UpdateVendorResaleInfo(obj).subscribe((res: any) => {\r\n }));\r\n }\r\n }\r\n else{\r\n addToGrid = true;\r\n }\r\n\r\n if (addToGrid) {\r\n if (this.BusinessLicenseNumberRequired && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n var addToGrid = false;\r\n var closeModalPopup = false;\r\n if ((!this.businessLicenseNumber || this.businessLicenseNumber.trim() === '') || !this.businessLicenseExpiryDate) {\r\n this.ResaleOrBusinessHeader = \"Business License Number\"\r\n const modal = this.modalResaleNo.nativeElement;\r\n this.resaleNoDisplay = false; \r\n this.businessLicenseDisplay = true;\r\n modal.classList.add('show');\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'block';\r\n this.ResaleOrBusinessHeader = \"Business License Number\" \r\n }\r\n }\r\n else if (this.getDateFromDateTime(new Date(this.businessLicenseExpiryDate)) < this.getDateFromDateTime(new Date())) {\r\n this.closeResaleModal();\r\n Swal.fire({\r\n text: $localize`Business License is expired! Please contact the market.`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n addToGrid = true;\r\n this.closeResaleModal();\r\n if (this.businessLicenseDisplay) {\r\n const obj = {\r\n VendorID: this.vendorId,\r\n LicenseNameId: 1,\r\n LicenseName: \"\",\r\n ExpiryDate: new Date(this.businessLicenseExpiryDate),\r\n LicenseNumber: this.businessLicenseNumber\r\n }\r\n \r\n this.subscriptions.push(this.rentalService.updateVendorBusinessLicense(this.marketId, obj).subscribe((res: any) => {\r\n }));\r\n }\r\n this.addSelectedBoothsToGrid();\r\n } \r\n }\r\n else {\r\n addToGrid = true;\r\n closeModalPopup = true;\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n }\r\n\r\n closeResaleModal(){\r\n const modal = this.modalResaleNo.nativeElement;\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'none';\r\n modal.classList.remove('show');\r\n }\r\n }\r\n\r\n closeLayoutForm() {\r\n this.displayLayout = false;\r\n this.getMarketDays();\r\n }\r\n\r\n searchOtherItem() {\r\n this.otherRentalCharges = this.otherItemList;\r\n const otherItemSearchText = this.rentalForm.controls['otherItemsScreen'].value['otherItemSearchText'];\r\n if (otherItemSearchText != '') {\r\n this.otherRentalCharges = this.otherItemList.filter((ele) => ele.OtherItem.toString().toLowerCase().indexOf(otherItemSearchText.toLowerCase()) !== -1);\r\n }\r\n }\r\n\r\n addSelectedBoothsToGrid() {\r\n this.selectedBoothsForRental = [];\r\n if (this.selectedWeeklyBoothData) {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedWeeklyBoothData.map((el, i) => {\r\n var obj = {\r\n BoothTypeId: el.BoothTypeId,\r\n VendorId: this.vendorId,\r\n RentalStartPeriod: new Date(this.rentalForm.value['rentalStartDate'].split('-')[0]),\r\n RentalEndPeriod: new Date(this.rentalForm.value['rentalEndDate'].split('-')[1]),\r\n RentalMarketDay: el.MarketDay,\r\n WRNewVendorRequest: this.newVendor\r\n }\r\n\r\n this.rentalService.getBoothRentalWeeklyCharges(this.marketId,obj).subscribe((res: any) => {\r\n var newbooths = [];\r\n var vendorProducts = !this.newVendor ? this.vendorProducts.filter(x => x.Priority) ? this.vendorProducts.filter(x => x.Priority)[0].ProductId : this.vendorProducts[0].ProductId:\"\";\r\n const ob = {\r\n WeeklyRentalId: 0,\r\n BoothNumber: el.BoothNumber,\r\n BoothType: el.BoothType,\r\n BoothDescription: el.BoothDescription,\r\n BoothTypeId: el.BoothTypeId,\r\n Product: vendorProducts,\r\n RentStartPeriod: this.rentalForm.value['rentalStartDate'],\r\n RentEndPeriod: this.rentalForm.value['rentalEndDate'],\r\n Rent: this.customCurrency.transform(res.Rent),\r\n SalesTax: this.customCurrency.transform(res.SalesTax),\r\n CityTax: this.customCurrency.transform(res.CityTax),\r\n Sunday: el.Sunday,\r\n Monday: el.Monday,\r\n Tuesday: el.Tuesday,\r\n Wednesday: el.Wednesday,\r\n Thursday: el.Thursday,\r\n Friday: el.Friday,\r\n Saturday: el.Saturday,\r\n Reservation: true,\r\n Drop: false,\r\n January: this.customCurrency.transform(res.JanRent),\r\n February: this.customCurrency.transform(res.FebRent),\r\n March: this.customCurrency.transform(res.MarRent),\r\n April: this.customCurrency.transform(res.AprRent),\r\n May: this.customCurrency.transform(res.MayRent),\r\n June: this.customCurrency.transform(res.JunRent),\r\n July: this.customCurrency.transform(res.JulRent),\r\n August: this.customCurrency.transform(res.AugRent),\r\n September: this.customCurrency.transform(res.SepRent),\r\n October: this.customCurrency.transform(res.OctRent),\r\n November: this.customCurrency.transform(res.NovRent),\r\n December: this.customCurrency.transform(res.DecRent),\r\n JanuaryMonthPresent: res.JanuaryMonthPresent,\r\n FebruaryMonthPresent: res.FebruaryMonthPresent,\r\n MarchMonthPresent: res.MarchMonthPresent,\r\n AprilMonthPresent: res.AprilMonthPresent,\r\n MayMonthPresent: res.MayMonthPresent,\r\n JuneMonthPresent: res.JuneMonthPresent,\r\n JulyMonthPresent: res.JulyMonthPresent,\r\n AugustMonthPresent: res.AugustMonthPresent,\r\n SeptemberMonthPresent: res.SeptemberMonthPresent,\r\n OctoberMonthPresent: res.OctoberMonthPresent,\r\n NovemberMonthPresent: res.NovemberMonthPresent,\r\n DecemberMonthPresent: res.DecemberMonthPresent,\r\n NewBooth: true,\r\n ExtendRental: false,\r\n RentalMarketDay: el.MarketDay,\r\n TaxModel: res.TaxModel\r\n }\r\n this.totalRentalCharge += res.Rent.toString().includes('(') && res.Rent.toString().includes(')') ? -1 * parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n newbooths.push(JSON.parse(JSON.stringify(ob)));\r\n this.getDiscounts();\r\n this.gridWeeklyRental.refresh();\r\n this.selectedWeeklyBooths = this.selectedWeeklyBooths.concat(newbooths);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n });\r\n\r\n this.loaderIcon = Promise.resolve(false);\r\n // this.refreshAddBooth();\r\n }\r\n }\r\n\r\n loadSelectedBooths() {\r\n var newItem = [];\r\n if (this.sharedDataService.paymentSharedData.ReturnData.length > 0) {\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n this.sharedDataService.paymentSharedData.ReturnData.forEach((item) => {\r\n var newbooths = [];\r\n var ob = {\r\n BoothNumber: item.BoothNumber,\r\n BoothType: item.BoothType,\r\n BoothTypeId: item.BoothTypeId,\r\n BoothDescription: item.BoothDescription,\r\n Product: item.Product,\r\n RentStartPeriod: item.RentStartPeriod,\r\n RentEndPeriod: item.RentEndPeriod,\r\n Rent: item.Rent,\r\n SalesTax: item.SalesTax,\r\n CityTax: item.CityTax,\r\n PerDiem: false,\r\n Sunday: item.Sunday,\r\n Monday: item.Monday,\r\n Tuesday: item.Tuesday,\r\n Wednesday: item.Wednesday,\r\n Thursday: item.Thursday,\r\n Friday: item.Friday,\r\n Saturday: item.Saturday,\r\n Reservation: item.Reservation,\r\n Drop: item.Drop,\r\n January: item.January,\r\n February: item.February,\r\n March: item.March,\r\n April: item.April,\r\n May: item.May,\r\n June: item.June,\r\n July: item.July,\r\n August: item.August,\r\n September: item.September,\r\n October: item.October,\r\n November: item.November,\r\n December: item.December,\r\n JanuaryMonthPresent: item.JanuaryMonthPresent,\r\n FebruaryMonthPresent: item.FebruaryMonthPresent,\r\n MarchMonthPresent: item.MarchMonthPresent,\r\n AprilMonthPresent: item.AprilMonthPresent,\r\n MayMonthPresent: item.MayMonthPresent,\r\n JuneMonthPresent: item.JuneMonthPresent,\r\n JulyMonthPresent: item.JulyMonthPresent,\r\n AugustMonthPresent: item.AugustMonthPresent,\r\n SeptemberMonthPresent: item.SeptemberMonthPresent,\r\n OctoberMonthPresent: item.OctoberMonthPresent,\r\n NovemberMonthPresent: item.NovemberMonthPresent,\r\n DecemberMonthPresent: item.DecemberMonthPresent,\r\n NewBooth: true,\r\n Status: \"N\",\r\n TaxModel: item.TaxModel\r\n }\r\n newbooths.push(JSON.parse(JSON.stringify(ob)));\r\n this.selectedWeeklyBooths = this.selectedWeeklyBooths.concat(newbooths);\r\n });\r\n }\r\n if (this.sharedDataService.paymentSharedData.WeeklyRentalOtherCharges.length > 0) {\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n this.sharedDataService.paymentSharedData.WeeklyRentalOtherCharges.forEach((el) => {\r\n if (el.WeekOtherRentalId == 0) {\r\n newItem = [];\r\n var ob = {\r\n Id: el.OtherItemId,\r\n WeekOtherRentalId: el.WeekOtherRentalId,\r\n OtherItem: el.OtherItemName,\r\n OtherItemCharge: this.customCurrency.transform(el.OtherCharge),\r\n Quantity: el.Quantity,\r\n OtherItemtotal: this.customCurrency.transform(el.OtherItemCharge),\r\n RentalWeek: el.RentalWeek + \"-\" + this.datePipe.transform(new Date(el.RentalWeek).setDate(new Date(el.RentalWeek).getDate() + 6), 'MMM d, y'),\r\n SalesTax: this.customCurrency.transform(el.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(el.SecLevelTax.toString()),\r\n BoothNo: el.BoothNumber,\r\n Reference: el.Reference,\r\n NewItem: true\r\n }\r\n newItem.push(JSON.parse(JSON.stringify(ob)));\r\n }\r\n\r\n if (newItem.length > 0) {\r\n this.selectedOtherItems = this.selectedOtherItems.concat(newItem);\r\n }\r\n });\r\n }\r\n\r\n this.totalRentalCharge = parseFloat(this.sharedDataService.paymentSharedData.RentalCharge);\r\n this.totalOtherRentalCharge = parseFloat(this.sharedDataService.paymentSharedData.OtherCharge.toString());\r\n this.totalSalesTax = parseFloat(this.sharedDataService.paymentSharedData.SalesTax.toString());\r\n this.totalSecondLeveltax = parseFloat(this.sharedDataService.paymentSharedData.SecLevelTax.toString());\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.sharedDataService.paymentSharedData = \"\";\r\n this.getDiscounts();\r\n }\r\n\r\n rentOnlineNextTab(){\r\n this.saveRentalWithPayment();\r\n this.bookingFormCompleted.emit(true);\r\n }\r\n\r\n saveRentalWithPayment() {\r\n this.isdirty = false;\r\n this.isFormDirty.emit(false);\r\n var obj = {\r\n VendorId: this.vendorId,\r\n RentalType: 3,\r\n PriorBalance: this.priorBalance,\r\n RentalCharge: this.totalRentalCharge,\r\n SalesTax: this.totalSalesTax,\r\n SecLevelTax: this.totalSecondLeveltax,\r\n OtherCharge: this.totalOtherRentalCharge,\r\n RentalNotes: \"\",\r\n PaymentDone: false,\r\n ExemptResaleNo: this.resaleNoOption == \"2\" ? true : false,\r\n ExemptResaleReason: this.exemptResaleReason,\r\n ResaleNo: this.resaleNo,\r\n PaymentDueDate: null,\r\n AppliedDiscountModel: [],\r\n ReturnData: [],\r\n ReceiptSettings: \"\",\r\n PaymentOnly: false,\r\n WeeklyRentalBooth: [],\r\n WeeklyRentalOtherCharges: [],\r\n DiscountAmount: this.totalDiscountCharge ?? 0,\r\n BookingFee: this.bookingFeeAmount ?? 0\r\n }\r\n\r\n var objSelectedBooth = [];\r\n var objReturnData = [];\r\n if (this.selectedWeeklyBooths.length > 0) {\r\n this.selectedWeeklyBooths.forEach((item, i) => {\r\n //if (item.NewBooth) {\r\n objSelectedBooth.push({\r\n WeeklyRentalId: item.WeeklyRentalId,\r\n BoothNumber: item.BoothNumber,\r\n BoothTypeId: item.BoothTypeId,\r\n ProductId: item.Product,\r\n BoothType: item.BoothType,\r\n RentalStartDate: new Date(item.RentStartPeriod.split('-')[0]),\r\n RentalEndDate: new Date(item.RentEndPeriod.split('-')[1]),\r\n BoothReserved: item.Reservation,\r\n DoNotRenew: item.Drop,\r\n Monday: item.Monday,\r\n Tuesday: item.Tuesday,\r\n Wednesday: item.Wednesday,\r\n Thursday: item.Thursday,\r\n Friday: item.Friday,\r\n Saturday: item.Saturday,\r\n Sunday: item.Sunday,\r\n RentalCharge: item.Rent.includes('(') && item.Rent.includes(')') ? -1 * parseFloat(item.Rent.replace(/[^0-9.-]/g, '')) : parseFloat(item.Rent.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n JanRent: item.January ? (item.January.includes('(') && item.January.includes(')') ? -1 * parseFloat(item.January.replace(/[^0-9.-]/g, '')) : parseFloat(item.January.replace(/[^0-9.-]/g, ''))) : 0,\r\n FebRent: item.February ? (item.February.includes('(') && item.February.includes(')') ? -1 * parseFloat(item.February.replace(/[^0-9.-]/g, '')) : parseFloat(item.February.replace(/[^0-9.-]/g, ''))) : 0,\r\n MarRent: item.March ? (item.March.includes('(') && item.March.includes(')') ? -1 * parseFloat(item.March.replace(/[^0-9.-]/g, '')) : parseFloat(item.March.replace(/[^0-9.-]/g, ''))) : 0,\r\n AprRent: item.April ? (item.April.includes('(') && item.April.includes(')') ? -1 * parseFloat(item.April.replace(/[^0-9.-]/g, '')) : parseFloat(item.April.replace(/[^0-9.-]/g, ''))) : 0,\r\n MayRent: item.May ? (item.May.includes('(') && item.May.includes(')') ? -1 * parseFloat(item.May.replace(/[^0-9.-]/g, '')) : parseFloat(item.May.replace(/[^0-9.-]/g, ''))) : 0,\r\n JunRent: item.June ? (item.June.includes('(') && item.June.includes(')') ? -1 * parseFloat(item.June.replace(/[^0-9.-]/g, '')) : parseFloat(item.June.replace(/[^0-9.-]/g, ''))) : 0,\r\n JulRent: item.July ? (item.July.includes('(') && item.July.includes(')') ? -1 * parseFloat(item.July.replace(/[^0-9.-]/g, '')) : parseFloat(item.July.replace(/[^0-9.-]/g, ''))) : 0,\r\n AugRent: item.August ? (item.August.includes('(') && item.August.includes(')') ? -1 * parseFloat(item.August.replace(/[^0-9.-]/g, '')) : parseFloat(item.August.replace(/[^0-9.-]/g, ''))) : 0,\r\n SepRent: item.September ? (item.September.includes('(') && item.September.includes(')') ? -1 * parseFloat(item.September.replace(/[^0-9.-]/g, '')) : parseFloat(item.September.replace(/[^0-9.-]/g, ''))) : 0,\r\n OctRent: item.October ? (item.October.includes('(') && item.October.includes(')') ? -1 * parseFloat(item.October.replace(/[^0-9.-]/g, '')) : parseFloat(item.October.replace(/[^0-9.-]/g, ''))) : 0,\r\n NovRent: item.November ? (item.November.includes('(') && item.November.includes(')') ? -1 * parseFloat(item.November.replace(/[^0-9.-]/g, '')) : parseFloat(item.November.replace(/[^0-9.-]/g, ''))) : 0,\r\n DecRent: item.December ? (item.December.includes('(') && item.December.includes(')') ? -1 * parseFloat(item.December.replace(/[^0-9.-]/g, '')) : parseFloat(item.December.replace(/[^0-9.-]/g, ''))) : 0,\r\n BookingLog: i + 1,\r\n TaxModel: item.TaxModel\r\n })\r\n\r\n if (item.NewBooth) {\r\n objReturnData.push({\r\n WeeklyRentalId: 0,\r\n BoothNumber: item.BoothNumber,\r\n BoothType: item.BoothType,\r\n BoothTypeId: item.BoothTypeId,\r\n BoothDescription: item.BoothDescription,\r\n Product: item.Product,\r\n RentStartPeriod: item.RentStartPeriod,\r\n RentEndPeriod: item.RentEndPeriod,\r\n Rent: item.Rent,\r\n SalesTax: item.SalesTax,\r\n CityTax: item.CityTax,\r\n PerDiem: false,\r\n Sunday: item.Sunday,\r\n Monday: item.Monday,\r\n Tuesday: item.Tuesday,\r\n Wednesday: item.Wednesday,\r\n Thursday: item.Thursday,\r\n Friday: item.Friday,\r\n Saturday: item.Saturday,\r\n Reservation: item.Reservation,\r\n Drop: item.Drop,\r\n January: item.January,\r\n February: item.February,\r\n March: item.March,\r\n April: item.April,\r\n May: item.May,\r\n June: item.June,\r\n July: item.July,\r\n August: item.August,\r\n September: item.September,\r\n October: item.October,\r\n November: item.November,\r\n December: item.December,\r\n JanuaryMonthPresent: item.January ? true : false,\r\n FebruaryMonthPresent: item.February ? true : false,\r\n MarchMonthPresent: item.March ? true : false,\r\n AprilMonthPresent: item.April ? true : false,\r\n MayMonthPresent: item.May ? true : false,\r\n JuneMonthPresent: item.June ? true : false,\r\n JulyMonthPresent: item.July ? true : false,\r\n AugustMonthPresent: item.August ? true : false,\r\n SeptemberMonthPresent: item.September ? true : false,\r\n OctoberMonthPresent: item.October ? true : false,\r\n NovemberMonthPresent: item.November ? true : false,\r\n DecemberMonthPresent: item.December ? true : false,\r\n NewBooth: true,\r\n Status: \"N\",\r\n TaxModel: item.TaxModel\r\n });\r\n }\r\n // }\r\n });\r\n }\r\n\r\n if (objSelectedBooth.length > 0)\r\n obj.WeeklyRentalBooth = objSelectedBooth;\r\n\r\n if (objReturnData.length > 0) {\r\n obj.ReturnData = objReturnData;\r\n }\r\n\r\n var objSelectedOtherCharge = [];\r\n if (this.selectedOtherItems.length > 0) {\r\n this.selectedOtherItems.forEach((item) => {\r\n objSelectedOtherCharge.push({\r\n OtherItemId: item.Id,\r\n WeekOtherRentalId: item.WeekOtherRentalId,\r\n OtherItemName: item.OtherItem,\r\n OtherItemCharge: item.OtherItemtotal.includes('(') && item.OtherItemtotal.includes(')') ? -1 * parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')),\r\n Quantity: item.Quantity,\r\n RentalWeek: item.RentalWeek.split('-')[0],\r\n BoothNumber: item.BoothNo,\r\n Recurring: item.Recurring,\r\n OtherCharge: item.OtherItemCharge.includes('(') && item.OtherItemCharge.includes(')') ? -1 * parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n Reference: item.Reference,\r\n WeeklyOtherRentalIds: item.WeeklyOtherRentalIds\r\n })\r\n });\r\n }\r\n if (objSelectedOtherCharge.length > 0)\r\n obj.WeeklyRentalOtherCharges = objSelectedOtherCharge;\r\n\r\n var objDiscountData = [];\r\n if (this.vendorDiscountPlans.length > 0 && this.totalDiscountCharge > 0) {\r\n this.vendorDiscountPlans.forEach((item) => {\r\n if (item.CheckAll) {\r\n objDiscountData.push({\r\n PlanId: item.PlanSeqId,\r\n DiscountAmount: item.AppliedDiscount.includes('(') && item.AppliedDiscount.includes(')') ? -1 * parseFloat(item.AppliedDiscount.replace(/[^0-9.-]/g, '')) : parseFloat(item.AppliedDiscount.replace(/[^0-9.-]/g, '')),\r\n OtherCharges: item.OtherItems,\r\n SalesTax: item.SalesTaxApplied,\r\n SecondLevelTax: item.SecondLevelTaxApplied,\r\n DiscountType: item.DiscountType == DiscountType.Percentage ? \"0\" : \"1\",\r\n DiscountValue: item.DiscountValue,\r\n SalesTaxAmount: item.SalesTaxAmount.includes('(') && item.SalesTaxAmount.includes(')') ? -1 * parseFloat(item.SalesTaxAmount.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTaxAmount.replace(/[^0-9.-]/g, '')),\r\n SecondLevelTaxAmount: item.SecondLevelTaxAmount.includes('(') && item.SecondLevelTaxAmount.includes(')') ? -1 * parseFloat(item.SecondLevelTaxAmount.replace(/[^0-9.-]/g, '')) : parseFloat(item.SecondLevelTaxAmount.replace(/[^0-9.-]/g, ''))\r\n })\r\n }\r\n });\r\n }\r\n if (objDiscountData.length > 0)\r\n obj.AppliedDiscountModel = objDiscountData;\r\n\r\n if (!this.newVendor) {\r\n this.sharedDataService.paymentSharedData = obj;\r\n var url = 'vendor-payments/' + this.marketId;\r\n this.router.navigate([url]);\r\n }\r\n else {\r\n this.rentalBookingData.emit(obj);\r\n }\r\n\r\n var temp = {\r\n TempRecordNo: this.tempRecordNo.toString(),\r\n BoothNumber: \"\"\r\n }\r\n this.subscriptions.push(this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n }));\r\n }\r\n\r\n disableSavePayment() {\r\n var vendorBalance = this.priorBalance + this.totalCharge;\r\n if (vendorBalance > 0) {\r\n return false\r\n }\r\n else\r\n return true\r\n }\r\n\r\n deleteOtherRentalCharges(data) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to delete the selected Other Charges?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n const index = this.selectedOtherItems.findIndex(oth => oth.Id === data.Id && oth.RentalWeek == data.RentalWeek);\r\n if (index !== -1) {\r\n this.selectedOtherItems.splice(index, 1);\r\n }\r\n var selectedItems = this.otherRentalCharges.findIndex(item => item.Id == data.Id);\r\n if (selectedItems != -1) {\r\n this.rentalService.getOtherRentalItems(this.marketId).subscribe((response) => {\r\n if (response) {\r\n const masterChargeRecord = response.filter(item => item.OtherItemId == data.Id);\r\n if (masterChargeRecord) {\r\n this.otherRentalCharges[selectedItems].Quantity = 0;\r\n this.otherRentalCharges[selectedItems].othChgBooths = \"none\";\r\n this.otherRentalCharges[selectedItems].OtherItemCharge = this.customCurrency.transform(masterChargeRecord[0].OtherItemWeeklyCharge);\r\n this.otherRentalCharges[selectedItems].OtherItemtotal = this.customCurrency.transform('0');\r\n this.otherRentalCharges[selectedItems].Reference = \"\"\r\n this.otherRentalCharges[selectedItems].Recurring = masterChargeRecord[0].Recurring\r\n }\r\n }\r\n }, (err) => {\r\n });\r\n }\r\n\r\n this.totalOtherRentalCharge -= data.OtherItemtotal.includes('(') && data.OtherItemtotal.includes(')') ? -1 * parseFloat(data.OtherItemtotal.replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemtotal.replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= data.SalesTax.includes('(') && data.SalesTax.includes(')') ? -1 * parseFloat(data.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.SalesTax.replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= data.CityTax.includes('(') && data.CityTax.includes(')') ? -1 * parseFloat(data.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.CityTax.replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.gridOtherRental.refresh();\r\n this.getDiscounts();\r\n }\r\n });\r\n }\r\n\r\n deleteSelectedBooth(data) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to delete the selected Booth?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n const index = this.selectedWeeklyBooths.findIndex(selectedBooth => selectedBooth.BoothNumber === data.BoothNumber && selectedBooth.RentStartPeriod == data.RentStartPeriod && selectedBooth.RentEndPeriod == data.RentEndPeriod\r\n && selectedBooth.Sunday == data.Sunday && selectedBooth.Monday == data.Monday && selectedBooth.Tuesday == data.Tuesday && selectedBooth.Wednesday == data.Wednesday\r\n && selectedBooth.Thursday == data.Thursday && selectedBooth.Friday == data.Friday && selectedBooth.Saturday == data.Saturday\r\n );\r\n if (index !== -1) {\r\n this.selectedWeeklyBooths.splice(index, 1);\r\n var selectedRentalDates = [];\r\n var marketDay; \r\n \r\n const startDate = new Date(this.rentalForm.value['rentalStartDate'].split('-')[0]);\r\n const endDate = new Date(this.rentalForm.value['rentalEndDate'].split('-')[1]);\r\n var selectedDayOfWeek =0;\r\n selectedDayOfWeek = data.Sunday ? 0\r\n : data.Monday ? 1 \r\n : data.Tuesday ? 2\r\n : data.Wednesday ? 3\r\n : data.Thursday ? 4\r\n : data.Friday ? 5\r\n : data.Saturday ? 6\r\n :0\r\n while (new Date(startDate) <= new Date(endDate)) {\r\n if (startDate.getDay() === selectedDayOfWeek) {\r\n selectedRentalDates.push(this.datePipe.transform(new Date(startDate), 'MMM d, y'));\r\n }\r\n startDate.setDate(startDate.getDate() + 1);\r\n }\r\n\r\n if (this.tempRecordNo) {\r\n const temp = {\r\n TempRecordNo: this.tempRecordNo.toString(),\r\n BoothNumber: data.BoothNumber,\r\n StartDate: new Date(selectedRentalDates[0]),\r\n RentalType: 3,\r\n EndDate: new Date(selectedRentalDates[selectedRentalDates.length -1]),\r\n Sunday: data.Sunday,\r\n Monday: data.Monday,\r\n Tuesday: data.Tuesday,\r\n Wednesday: data.Wednesday,\r\n Thursday: data.Thursday,\r\n Friday: data.Friday,\r\n Saturday: data.Saturday\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n } \r\n }\r\n this.totalRentalCharge -= data.Rent.includes('(') && data.Rent.includes(')') ? -1 * parseFloat(data.Rent.replace(/[^0-9.-]/g, '')) : parseFloat(data.Rent.replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= data.SalesTax.includes('(') && data.SalesTax.includes(')') ? -1 * parseFloat(data.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.SalesTax.replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= data.CityTax.includes('(') && data.CityTax.includes(')') ? -1 * parseFloat(data.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.CityTax.replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.gridWeeklyRental.refresh();\r\n this.getDiscounts();\r\n }\r\n });\r\n } \r\n\r\n ngOnDestroy(): void {\r\n this.subscriptions.forEach((subscription) => {\r\n if (subscription) {\r\n subscription.unsubscribe();\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n * Select Market Day(s) Here\r\n
\r\n
    \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
\r\n
\r\n
\r\n
\r\n Monthly Market(s):\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{data.RentEndPeriod}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
Other Charges
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
ItemsRecBooth#Charges\r\n QtyTotalReference\r\n
\r\n \r\n {{item.OtherItem}}\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n {{item.OtherItemtotal}}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n
{{ResaleOrBusinessHeader}}
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { DatePipe } from '@angular/common';\r\nimport { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, Renderer2, ViewChild } from '@angular/core';\r\nimport { FormBuilder, FormGroup } from '@angular/forms';\r\nimport { ActivatedRoute, Params, Router } from '@angular/router';\r\nimport { GridComponent, GridLine, SortSettingsModel } from '@syncfusion/ej2-angular-grids';\r\nimport { forkJoin, Subscription } from 'rxjs';\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\nimport { RentalService } from 'src/app/services/Rental.service';\r\nimport { VendorService } from 'src/app/services/Vendor.service';\r\nimport { customCurrencyPipe } from 'src/app/Shared/customCurrency.pipe';\r\nimport { SharedDataService } from 'src/app/Shared/SharedData.service';\r\nimport { DiscountType } from 'src/app/Shared/enum';\r\nimport Swal from 'sweetalert2';\r\ninterface DateString {\r\n startDate: string;\r\n}\r\n@Component({\r\n selector: 'app-monthlyrental-online',\r\n templateUrl: './monthlyrental-online.component.html',\r\n styleUrls: ['./monthlyrental-online.component.scss', '../rent-online.component.scss']\r\n})\r\n\r\nexport class MonthlyrentalOnlineComponent implements OnInit, OnDestroy {\r\n rentalForm : FormGroup;\r\n marketId;\r\n vendorId;\r\n sunday = false;\r\n monday = false;\r\n tuesday = false;\r\n wednesday = false;\r\n thursay = false;\r\n friday = false;\r\n saturday = false;\r\n selectedMarketDays=[];\r\n selectedOtherItems = []\r\n parts = [];\r\n monthlyMarketDays = [];\r\n excludedMarketDays=[];\r\n selectedMonthlyBooths = []\r\n displaySalesTax = false;\r\n displayCityTax = false;\r\n tempRecordNo = 0;\r\n otherRentalCharges = [];\r\n otherItemList = [];\r\n vendorProducts = [];\r\n defaultProduct;\r\n vendorDiscountPlans =[];\r\n priorBalance = 0.00;\r\n AllowRentingOtherItems = false;\r\n layoutParts = 0;\r\n totalRentalCharge = 0.00;\r\n totalOtherRentalCharge = 0.00;\r\n totalSalesTax = 0.00;\r\n totalSecondLeveltax = 0.00\r\n totalCharge = 0.00;\r\n selectedDates = [];\r\n private subscriptions: Subscription[] = [];\r\n MonthlyLayoutData;\r\n combinedMonthlyBookingEndDate;\r\n displayLayout = false;\r\n totalDiscountCharge;\r\n isdirty = false;\r\n @Input() newVendor;\r\n @Output() bookingFormCompleted = new EventEmitter(); \r\n @Output() rentalBookingData = new EventEmitter();\r\n @Output() isFormDirty = new EventEmitter(); \r\n @Output() isCancelClicked = new EventEmitter(); \r\n @Output() resaleNoInputRequired = new EventEmitter();\r\n @Output() businessLicenseRequired = new EventEmitter();\r\n ApplyBookingFee = false;\r\n ApplyBookingFeeId;\r\n boothsForOtherCharge = [];\r\n bookingFeeAmount;\r\n displayOtherChargeByBooth = false;\r\n displayOtherChargeSalesTax = false;\r\n displayOtherChargeCityTax = false;\r\n ResaleNumberRequired = false;\r\n DaysSellWithoutResaleNumber;\r\n monthlyRentalStartDates;\r\n BusinessLicenseNumberRequired = false;\r\n DaysSellWithoutBusiLicNumber;\r\n resaleNoOption = \"1\";\r\n exemptResale = false;\r\n resaleNo = \"\";\r\n resaleNoDisplay = false;\r\n businessLicenseDisplay = false;\r\n ResaleOrBusinessHeader = \"\";\r\n businessLicenseNumber;\r\n defaultPart;\r\n businessLicenseExpiryDate;\r\n vendorRentalDays = [];\r\n marketDayCountForResale = 0;\r\n resaleOptionSelected = false;\r\n selectedBoothsForRental=[];\r\n perDiemRentApplicable = false;\r\n selectedOtherCharges = [];\r\n selectedMonthlyBoothData = [];\r\n public lines: GridLine;\r\n rentalStartDates;\r\n warnExcessPayment = false;\r\n warnZeroPayment = false;\r\n RentalTaxPercentage = 0;\r\n OtherRentalTaxPercentage = 0;\r\n RentalSecondTaxPercentage = 0;\r\n OtherRentalSecondTaxPercentage = 0;\r\n DisplayPayDueDate = false;\r\n DisplaySpecificDate = false;\r\n OtherChargesPeriod = false;\r\n DisplayOptionValue = 0;\r\n secondTaxName=\"\";\r\n public textWrapSettings: any = { wrapMode: 'Both' }; // Enable text wrapping\r\n sortOptions: SortSettingsModel = {\r\n columns: [{ field: 'RentalStartDate', direction: 'Ascending' }, { field: 'BoothNumber', direction: 'Ascending' }]\r\n };\r\n sortOtherItemsOptions: SortSettingsModel = {\r\n columns: [{ field: 'OtherItem', direction: 'Ascending' }, { field: 'BoothNo', direction: 'Ascending' }]\r\n };\r\n public loaderIcon: Promise;\r\n @ViewChild('gridMonthlyRental', { static: false }) public gridMonthlyRental: GridComponent;\r\n @ViewChild('modalResaleNo', { static: false }) modalResaleNo: ElementRef;\r\n @ViewChild('modalMonthlyOtherCharges', { static: false }) modalMonthlyOtherCharges: ElementRef;\r\n @ViewChild('gridOtherRental', { static: false }) public gridOtherRental: GridComponent;\r\n constructor(private formbuilder: FormBuilder,\r\n private route: ActivatedRoute,\r\n public router: Router,\r\n public rentalService: RentalService,\r\n public vendorService: VendorService,\r\n private customCurrency: customCurrencyPipe,\r\n private datePipe: DatePipe,\r\n private sharedDataService: SharedDataService,\r\n private marketInfoService: MarketInfoService){\r\n this.rentalForm = this.formbuilder.group({\r\n marketWeekSunday: [0],\r\n marketWeekMonday: [0],\r\n marketWeekTuesday: [0],\r\n marketWeekWednesday: [0],\r\n marketWeekThursday: [0],\r\n marketWeekFriday: [0],\r\n marketWeekSaturday: [0],\r\n marketParts:[''],\r\n rentalStartMonth:[''],\r\n rentalEndMonth: [''],\r\n monthlyRentalStartDates:[],\r\n otherItemsScreen: this.formbuilder.group({\r\n otherChargeMarketMonth: [''],\r\n otherItemSearchText: ['']\r\n })\r\n })\r\n }\r\n\r\n ngOnInit(): void {\r\n this.route.params.subscribe((params: Params) => {\r\n this.marketId = params['marketId'];\r\n this.vendorId = params['vendorId'];\r\n });\r\n this.getMarketDays();\r\n this.getRentalPaymentSettings();\r\n this.getVendorProducts();\r\n this.getParts();\r\n this.getMarketVendorSettings();\r\n this.getVendorBusinessLicenseSettings();\r\n this.generateTempRecordNumber();\r\n this.getVendorBalances();\r\n this.getOtherRentalItems();\r\n if (this.sharedDataService.paymentSharedData)\r\n this.loadSelectedBooths();\r\n }\r\n\r\n getParts() {\r\n const sub = this.marketInfoService.getParts(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.parts = res;\r\n this.getWebRentalSetting();\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getMarketVendorSettings(){\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.vendorService.getMarketVendorSettings(this.vendorId, this.marketId).subscribe((res: any) => {\r\n var response = res.body;\r\n if (response) {\r\n this.exemptResale = response.ExemptResale;\r\n this.resaleNo = response.Resale;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getVendorBusinessLicenseSettings(){\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.vendorService.getVendorBusinessLicenseSettings(this.vendorId, this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.businessLicenseNumber = res.LicenseNumber;\r\n this.businessLicenseExpiryDate = res.ExpiryDate;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getRentalPaymentSettings() {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.subscriptions.push(this.rentalService.getRentalSettings(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.warnExcessPayment = res.WarnExcessPayment;\r\n this.warnZeroPayment = res.WarnZeroPayment;\r\n this.displayOtherChargeByBooth = res.DisplayOtherChargesByBooth;\r\n this.displayCityTax = res.RentalSecondTaxable;\r\n this.displaySalesTax = res.RentalTaxable;\r\n this.perDiemRentApplicable = res.PerDiemRentApplicable;\r\n this.gridMonthlyRental.getColumnByField(\"SalesTax\").visible = this.displaySalesTax;\r\n this.gridMonthlyRental.getColumnByField(\"CityTax\").visible = this.displayCityTax;\r\n if(this.newVendor){\r\n this.gridMonthlyRental.getColumnByField(\"Product\").visible = false;\r\n }\r\n this.gridMonthlyRental.refreshColumns();\r\n this.displayOtherChargeSalesTax = res.OtherRentalTaxable;\r\n this.displayOtherChargeCityTax = res.OtherRentalSecondTaxable; \r\n this.ResaleNumberRequired = res.ResaleNumberRequired;\r\n this.DaysSellWithoutResaleNumber = res.DaysSellWithoutResaleNumber;\r\n this.BusinessLicenseNumberRequired = res.BusinessLicenseNumberRequired;\r\n this.DaysSellWithoutBusiLicNumber = res.DaysSellWithoutBusiLicNumber;\r\n this.DisplayPayDueDate = res.DisplayPayDueDate;\r\n this.DisplaySpecificDate = res.DisplaySpecificDate;\r\n this.DisplayOptionValue = res.DisplayOptionValue;\r\n const nextDate = this.getNextDate(this.DisplayOptionValue);\r\n this.secondTaxName = res.SecondTaxName ? res.SecondTaxName: \"Sec Level Tax\"\r\n var secLevelTaxRentHeader = this.gridMonthlyRental.getColumnByField(\"CityTax\"); \r\n secLevelTaxRentHeader.headerText = this.secondTaxName; \r\n this.RentalTaxPercentage = res.RentalTaxPercentage;\r\n this.OtherRentalTaxPercentage = res.OtherRentalTaxPercentage;\r\n this.RentalSecondTaxPercentage = res.RentalSecondTaxPercentage;\r\n this.OtherRentalSecondTaxPercentage = res.OtherRentalSecondTaxPercentage;\r\n this.OtherChargesPeriod = res.OtherChargesPeriod;\r\n this.gridMonthlyRental.refresh();\r\n if (this.AllowRentingOtherItems) {\r\n var secLevelTaxOtherRentHeader = this.gridOtherRental.getColumnByField(\"CityTax\");\r\n secLevelTaxOtherRentHeader.headerText = this.secondTaxName;\r\n this.gridOtherRental.getColumnByField(\"BoothNo\").visible = res.DisplayOtherChargesByBooth;\r\n this.gridOtherRental.getColumnByField(\"SalesTax\").visible = this.displayOtherChargeSalesTax;\r\n this.gridOtherRental.getColumnByField(\"CityTax\").visible = this.displayOtherChargeCityTax;\r\n this.gridOtherRental.refreshColumns();\r\n this.gridOtherRental.refresh();\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err =>{\r\n this.loaderIcon = Promise.resolve(false);\r\n }));\r\n }\r\n\r\n getNextDate(day: number): Date {\r\n if (this.DisplaySpecificDate) {\r\n const today = new Date();\r\n let nextDate = new Date(today.getFullYear(), today.getMonth(), day);\r\n // If the nextDate is in the past or today, move to the next month\r\n if (nextDate < today) {\r\n nextDate.setMonth(nextDate.getMonth() + 1);\r\n }\r\n // Handle cases where the day is not valid in the next month (e.g., 31st in February)\r\n while (nextDate.getDate() !== day) {\r\n nextDate.setMonth(nextDate.getMonth() + 1);\r\n nextDate.setDate(day);\r\n }\r\n return nextDate;\r\n }\r\n else{\r\n const today = new Date();\r\n let nextDate = new Date(today.setDate(today.getDate() + day));\r\n return nextDate;\r\n }\r\n }\r\n\r\n getOtherRentalItems() {\r\n var formattedDate;\r\n if (this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth']) {\r\n var input = this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth'];\r\n const date = new Date(`${input} 1`);\r\n formattedDate = this.datePipe.transform(`${date.getMonth() + 1}/${date.getDate()}/${date.getFullYear()}`, 'MM/dd/yyyy');\r\n }\r\n this.subscriptions.push(this.rentalService.getOtherRentalItems(this.marketId, formattedDate).subscribe((response) => {\r\n if (response) {\r\n response.map((el, i) => {\r\n if (el.WebRental) {\r\n const ob = {\r\n Id: el.OtherItemId,\r\n OtherItem: el.OtherItem,\r\n OtherItemCharge: this.customCurrency.transform(el.OtherItemCombinedMonthlyCharge),\r\n Quantity: 0,\r\n OtherItemtotal: this.customCurrency.transform('0'),\r\n othChgBooths: \"none\"\r\n }\r\n this.otherRentalCharges.push(ob);\r\n this.otherItemList.push(ob);\r\n }\r\n });\r\n }\r\n }, (err) => {\r\n }));\r\n }\r\n\r\n onCheckNumKeyPress(event: KeyboardEvent) {\r\n const allowedChars = /[0-9]/g;\r\n const key = event.key;\r\n if (event.key === 'Backspace' || event.key === 'Delete' || event.key === 'ArrowLeft' || event.key === 'ArrowRight' || event.key === '#') {\r\n return;\r\n }\r\n if (!key.match(allowedChars)) {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n updateOtherItem(data) {\r\n if (parseFloat(data.Quantity) == 0) {\r\n data.Quantity = \"1\"\r\n }\r\n\r\n this.totalSalesTax -= data.SalesTax.toString().includes('(') && data.SalesTax.toString().includes(')') ? -1 * parseFloat(data.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= data.CityTax.toString().includes('(') && data.CityTax.toString().includes(')') ? -1 * parseFloat(data.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalOtherRentalCharge -= data.OtherItemtotal.toString().includes('(') && data.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n\r\n var index;\r\n if (data.NewItem == true)\r\n index = this.selectedOtherItems.findIndex(oth => oth.Id === data.Id && oth.RentalMonth == data.RentalMonth && oth.NewItem == true && oth.BoothNo == data.BoothNo);\r\n else\r\n index = this.selectedOtherItems.findIndex(oth => oth.Id === data.Id && oth.RentalMonth == data.RentalMonth && oth.MonthlyRentalIds == data.MonthlyRentalIds && oth.BoothNo == data.BoothNo);\r\n\r\n if (index !== -1) {\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: data.Id,\r\n VendorId: this.vendorId,\r\n Quantity: data.Quantity,\r\n OtherItemCharge: data.OtherItemCharge.includes('(') && data.OtherItemCharge.includes(')') ? (-1) * parseFloat(data.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n WRNewVendorRequest: this.newVendor\r\n }\r\n this.subscriptions.push(this.rentalService.getOtherItemsRentalCharges(obj).subscribe((res: any) => {\r\n this.selectedOtherItems[index].SalesTax = this.customCurrency.transform(res.SalesTax.toString()),\r\n this.selectedOtherItems[index].CityTax = this.customCurrency.transform(res.CityTax.toString())\r\n const isNegative = data.OtherItemCharge.includes('(') && data.OtherItemCharge.includes(')');\r\n const totalValue = parseFloat(data.OtherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n data.OtherItemtotal = this.customCurrency.transform((finalCharge * data.Quantity).toString());\r\n this.selectedOtherItems[index].OtherItemtotal = data.OtherItemtotal;\r\n this.selectedOtherItems[index].OtherItemCharge = this.customCurrency.transform((finalCharge).toString());\r\n this.selectedOtherItems[index].Recurring = data.Recurring;\r\n this.selectedOtherItems[index].Reference = data.Reference;\r\n this.selectedOtherItems[index].Quantity = data.Quantity;\r\n this.selectedOtherItems[index].SalesTax = this.customCurrency.transform(res.SalesTax.toString()),\r\n this.selectedOtherItems[index].CityTax = this.customCurrency.transform(res.CityTax.toString()),\r\n this.gridOtherRental.refresh();\r\n this.getDiscounts();\r\n this.totalOtherRentalCharge += data.OtherItemtotal.toString().includes('(') && data.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n }));\r\n }\r\n }\r\n\r\n getVendorProducts() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.rentalService.GetVendorProductsById(this.marketId, this.vendorId).subscribe((res: any) => {\r\n if (res) {\r\n this.vendorProducts = res.body;\r\n this.defaultProduct = this.vendorProducts[0].ProductId;\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n generateTempRecordNumber() {\r\n this.subscriptions.push(this.rentalService.generateTempRecordNumber(this.marketId).subscribe((response) => {\r\n if (response.Success) {\r\n this.tempRecordNo = response.Message;\r\n }\r\n }));\r\n }\r\n\r\n getVendorBalances() {\r\n this.vendorDiscountPlans =[];\r\n forkJoin({\r\n vendorBalanceRes: this.rentalService.getVendorBalances(this.vendorId, this.marketId),\r\n discountPlansRes: this.vendorService.GetDiscountPlan(this.vendorId,this.marketId)\r\n }).subscribe(\r\n ({ vendorBalanceRes, discountPlansRes }: any) => {\r\n if (vendorBalanceRes) {\r\n this.priorBalance = vendorBalanceRes.PriorBalance;\r\n }\r\n if(discountPlansRes){\r\n if (discountPlansRes) {\r\n for (const el of discountPlansRes) {\r\n if (el.Monthly && el.OnlineTransactions) {\r\n const ob = {\r\n PlanSeqId: el.PlanSeqId,\r\n PlanId: el.PlanId,\r\n PlanName: el.PlanName,\r\n EffectiveFrom: this.datePipe.transform(el.EffectiveFrom, 'MM/dd/yyyy'),\r\n ExpiryDate: this.datePipe.transform(el.ExpiryDate, 'MM/dd/yyyy'),\r\n DiscountType: el.DiscountType == 0 ? DiscountType.Percentage : DiscountType.FixedAmount,\r\n DiscountValue: el.DiscountValue,\r\n OtherItems: el.OtherItems,\r\n Daily: el.Daily,\r\n Weekly: el.Weekly,\r\n Monthly: el.Monthly,\r\n CombinedWeekly: el.CombinedWeekly,\r\n CombinedMonthly: el.CombinedMonthly,\r\n IsExceedAmount: el.IsExceedAmount,\r\n ExceedAmount: el.ExceedAmount,\r\n BalanceDue: el.BalanceDue,\r\n Notes: el.Notes,\r\n QDR: el.QDR,\r\n CheckAll: el.Selected,\r\n AutoSelected: el.Selected,\r\n DisableDiscount: el.Selected,\r\n AppliedDiscount: this.customCurrency.transform(\"0.00\"),\r\n SalesTaxAmount: this.customCurrency.transform(\"0.00\"),\r\n SecondLevelTaxAmount: this.customCurrency.transform(\"0.00\"),\r\n SalesTaxApplied: el.SalesTax,\r\n SecondLevelTaxApplied: el.SecondLevelTax,\r\n }\r\n this.vendorDiscountPlans.push(ob);\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n // this.disableDiscountAmount = this.vendorDiscountPlans.length > 0 ? false : true;\r\n }\r\n this.getDiscounts();\r\n }\r\n })\r\n }\r\n\r\n getDiscounts() {\r\n var totalRentalCharge = this.totalRentalCharge;\r\n var totalSalesTax = this.totalSalesTax;\r\n var totalSecondLeveltax = this.totalSecondLeveltax;\r\n var totalOtherRentalCharge = this.totalOtherRentalCharge;\r\n var priorBalance = 0;\r\n var totalChargeWithDue = this.priorBalance + (totalRentalCharge)\r\n + (totalSalesTax)\r\n + (totalSecondLeveltax)\r\n + (totalOtherRentalCharge)\r\n\r\n var totalCharge = (totalRentalCharge) + (totalSalesTax) + (totalSecondLeveltax) + (totalOtherRentalCharge)\r\n // totalCharge = totalCharge.toString().includes('(') && totalCharge.toString().includes(')') ? -1 * parseFloat(totalCharge.toString().replace(/[^0-9.-]/g, '')) : parseFloat(totalCharge.toString().replace(/[^0-9.-]/g, ''));\r\n\r\n if (this.vendorDiscountPlans.length > 0 && totalCharge > 0) {\r\n var discountTotalAmount = 0;\r\n var totalAmountForDiscount = 0;\r\n for (const disc of this.vendorDiscountPlans) {\r\n disc.CheckAll = disc.AutoSelected;\r\n if (disc.CheckAll && disc.Monthly) {\r\n var currentDiscountValue = 0;\r\n if (!disc.BalanceDue || (disc.BalanceDue && priorBalance <= 0)) {\r\n if (!disc.IsExceedAmount || (disc.IsExceedAmount && totalCharge > disc.ExceedAmount)) {\r\n const discountValue = disc.DiscountValue;\r\n totalAmountForDiscount = totalRentalCharge\r\n if (disc.OtherItems) {\r\n totalAmountForDiscount += totalOtherRentalCharge\r\n }\r\n if (disc.DiscountType == 'Percentage') {\r\n discountTotalAmount += totalAmountForDiscount * (discountValue / 100);\r\n currentDiscountValue = totalAmountForDiscount * (discountValue / 100);\r\n }\r\n else {\r\n discountTotalAmount += discountValue;\r\n currentDiscountValue = discountValue;\r\n }\r\n }\r\n else {\r\n disc.CheckAll = false;\r\n }\r\n }\r\n else {\r\n disc.CheckAll = false;\r\n }\r\n disc.AppliedDiscount = this.customCurrency.transform(currentDiscountValue.toString());\r\n }\r\n else {\r\n disc.AppliedDiscount = this.customCurrency.transform(\"0\");\r\n }\r\n\r\n this.totalDiscountCharge = parseFloat(discountTotalAmount.toFixed(2)).toString()\r\n }\r\n }\r\n }\r\n\r\n getWebRentalSetting() {\r\n const sub = this.marketInfoService.getWebRentalSetting(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.defaultPart = res.DefaultLayoutPart;\r\n this.rentalForm.get('marketParts').setValue(this.defaultPart);\r\n this.ApplyBookingFee = res.ApplyBookingFee;\r\n this.ApplyBookingFeeId = res.ApplyBookingFeeId;\r\n this.AllowRentingOtherItems = res.AllowRentingOtherItems;\r\n if (this.ApplyBookingFee) {\r\n this.subscriptions.push(this.rentalService.getBookingFeeById(this.marketId, this.ApplyBookingFeeId).subscribe((resFee: any) => {\r\n if (resFee) {\r\n this.bookingFeeAmount = resFee.OtherItemCharge;\r\n }\r\n }));\r\n }\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n } \r\n\r\n getMarketDays() {\r\n const sub = this.marketInfoService.getMarketDays(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.sunday = res.Sunday;\r\n this.monday = res.Monday;\r\n this.tuesday = res.Tuesday;\r\n this.wednesday = res.Wednesday;\r\n this.thursay = res.Thursday;\r\n this.friday = res.Friday;\r\n this.saturday = res.Saturday;\r\n this.rentalForm.get('marketWeekSunday').setValue(this.sunday);\r\n this.rentalForm.get('marketWeekMonday').setValue(this.monday);\r\n this.rentalForm.get('marketWeekTuesday').setValue(this.tuesday);\r\n this.rentalForm.get('marketWeekWednesday').setValue(this.wednesday);\r\n this.rentalForm.get('marketWeekThursday').setValue(this.thursay);\r\n this.rentalForm.get('marketWeekFriday').setValue(this.friday);\r\n this.rentalForm.get('marketWeekSaturday').setValue(this.saturday); \r\n this.getMonthlyMarketDays();\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getMonthlyMarketDays() {\r\n this.subscriptions.push(this.marketInfoService.getMonthlyMarketDays(this.marketId).subscribe((response) => {\r\n if (response) {\r\n this.monthlyMarketDays = response;\r\n this.rentalForm.patchValue({\r\n rentalStartMonth: response[0].RentalMonths,\r\n rentalEndMonth: response[0].RentalMonths,\r\n });\r\n this.rentalForm.controls['otherItemsScreen'].patchValue({\r\n otherChargeMarketMonth: response[0].RentalMonths\r\n }); \r\n this.selectedMonthlyMarketDays(); \r\n }\r\n }, (err) => {\r\n }));\r\n }\r\n\r\n isDateSelected(item: any): boolean {\r\n var isItemSelected = this.selectedOtherItems.some(\r\n (element) =>\r\n (element.RentalMonth === this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth']) &&\r\n element.Id === item.Id && element.NewItem == true\r\n );\r\n \r\n if(!isItemSelected){\r\n isItemSelected = this.selectedOtherCharges.some(\r\n (element) =>\r\n (element.RentalMonth === this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth']) &&\r\n element.Id === item.Id\r\n );\r\n }\r\n \r\n !isItemSelected? item.otherItemChecked = false : item.otherItemChecked = true;\r\n item.othChgBooths = \"none\";\r\n return isItemSelected;\r\n }\r\n\r\n checkRentalMonths() {\r\n if (this.rentalForm.value['rentalStartMonth'] && this.rentalForm.value['rentalEndMonth']) {\r\n const startMonth = this.rentalForm.value['rentalStartMonth'];\r\n const endMonth = this.rentalForm.value['rentalEndMonth'];\r\n const [startMonthDate, startYear] = startMonth.split(' ');\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const startMonthIndex = this.getMonthIndex(startMonthDate);\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n if (endMonthYear < startYear || (endMonthYear == startYear && endMonthIndex < startMonthIndex)) {\r\n this.rentalForm.get('rentalEndMonth').setValue(startMonth);\r\n } \r\n this.selectedMonthlyMarketDays(); \r\n }\r\n } \r\n\r\n selectedMonthlyMarketDays() {\r\n this.selectedMarketDays = [];\r\n this.rentalForm.value['marketWeekSunday'] == true ? this.selectedMarketDays.push(1) : 0;\r\n this.rentalForm.value['marketWeekMonday'] == true ? this.selectedMarketDays.push(2) : 0;\r\n this.rentalForm.value['marketWeekTuesday'] == true ? this.selectedMarketDays.push(3) : 0;\r\n this.rentalForm.value['marketWeekWednesday'] == true ? this.selectedMarketDays.push(4) : 0;\r\n this.rentalForm.value['marketWeekThursday'] == true ? this.selectedMarketDays.push(5) : 0;\r\n this.rentalForm.value['marketWeekFriday'] == true ? this.selectedMarketDays.push(6) : 0;\r\n this.rentalForm.value['marketWeekSaturday'] == true ? this.selectedMarketDays.push(7) : 0;\r\n this.monthlyRentalStartDates = [];\r\n this.selectedMarketDays.map((el, i) => { \r\n const currentDate = new Date();\r\n const currentYear = currentDate.getFullYear();\r\n const currentMonth = currentDate.getMonth();\r\n const startMonth = this.rentalForm.value['rentalStartMonth'];\r\n const endMonth = this.rentalForm.value['rentalEndMonth'];\r\n const [startMonthDate, startYear] = startMonth.split(' ');\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const excludedDates = this.excludedMarketDays.map(dateString => new Date(dateString));\r\n const startMonthIndex = this.getMonthIndex(startMonthDate);\r\n const endMonthIndex = this.getMonthIndex(startMonthDate);\r\n var startDate;\r\n if (startYear === currentYear.toString() && startMonthIndex === currentMonth)\r\n startDate = currentDate\r\n else\r\n startDate = new Date(startYear, startMonthIndex, 1);\r\n const endDate = new Date(startYear, endMonthIndex + 1, 0);;\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (new Date(this.datePipe.transform(currentDay,'MM/dd/yyyy')) <= new Date(this.datePipe.transform(endDate,'MM/dd/yyyy'))) {\r\n var exludedDate = excludedDates.some(date => {\r\n return this.datePipe.transform(date, 'MM/dd/yyyy') === this.datePipe.transform(currentDay, 'MM/dd/yyyy');\r\n });\r\n if (currentDay.getDay() === selectedDayOfWeek && !exludedDate) {\r\n this.monthlyRentalStartDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = this.monthlyRentalStartDates.sort(compareDates);\r\n if (this.monthlyRentalStartDates && this.monthlyRentalStartDates.length > 0) {\r\n this.rentalForm.get('monthlyRentalStartDates').setValue(this.monthlyRentalStartDates[0].startDate)\r\n }\r\n });\r\n }\r\n\r\n getMonthIndex(monthString: string): number {\r\n const months = [\r\n 'January', 'February', 'March', 'April', 'May', 'June',\r\n 'July', 'August', 'September', 'October', 'November', 'December'\r\n ];\r\n const monthIndex = months.findIndex(month => month.toLowerCase() === monthString.toLowerCase());\r\n return monthIndex !== -1 ? monthIndex : 0;\r\n }\r\n\r\n checkMarketDaysSelected() {\r\n const sunday = this.rentalForm.value['marketWeekSunday'];\r\n const monday = this.rentalForm.value['marketWeekMonday'];\r\n const tuesday = this.rentalForm.value['marketWeekTuesday'];\r\n const wednesday = this.rentalForm.value['marketWeekWednesday'];\r\n const thursday = this.rentalForm.value['marketWeekThursday'];\r\n const friday = this.rentalForm.value['marketWeekFriday'];\r\n const saturday = this.rentalForm.value['marketWeekSaturday'];\r\n return sunday || monday || tuesday || wednesday || thursday || friday || saturday;\r\n }\r\n\r\n openLayout() {\r\n this.layoutParts = this.rentalForm.value['marketParts'];\r\n var marketDaysSelected = this.checkMarketDaysSelected();\r\n if (!marketDaysSelected) {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Please select a market day!`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n if (this.selectedMarketDays.length > 0) {\r\n this.selectedDates = [];\r\n this.selectedMarketDays.map((el, i) => { \r\n\r\n const startDate = new Date(this.rentalForm.value['monthlyRentalStartDates']);\r\n const endMonth = this.rentalForm.value['rentalEndMonth'];\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n const endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n this.selectedDates.push(this.datePipe.transform(new Date(currentDay), 'MM/dd/yyyy'));\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n\r\n const compareDates = (a, b): number => {\r\n const dateA = new Date(a.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = this.selectedDates.sort(compareDates);\r\n });\r\n }\r\n const rentalStartDateYear = new Date(this.rentalForm.value['rentalStartMonth'].split('-')[0]).getFullYear();\r\n const rentalStartDateMonth = new Date(this.rentalForm.value['rentalStartMonth'].split('-')[0]).getMonth() + 1;\r\n const rentalStartDateYearMonth = `${rentalStartDateYear}${rentalStartDateMonth < 10 ? '0' : ''}${rentalStartDateMonth}`;\r\n this.MonthlyLayoutData = {\r\n Sunday: this.rentalForm.value['marketWeekSunday'],\r\n Monday: this.rentalForm.value['marketWeekMonday'],\r\n Tuesday: this.rentalForm.value['marketWeekTuesday'],\r\n Wednesday: this.rentalForm.value['marketWeekWednesday'],\r\n Thursday: this.rentalForm.value['marketWeekThursday'],\r\n Friday: this.rentalForm.value['marketWeekFriday'],\r\n Saturday: this.rentalForm.value['marketWeekSaturday'],\r\n monthlyRentalStartDate: this.rentalForm.value['rentalStartMonth'],\r\n monthlyRentalEndDate: this.rentalForm.value['rentalEndMonth'],\r\n monthlyRentalMarketDays: this.selectedMarketDays,\r\n selectedDates: this.selectedDates,\r\n monthlyRentalSelectedBooths: this.selectedMonthlyBooths.filter(e => e.NewBooth == true),\r\n RentalStartDate: this.datePipe.transform(new Date(this.rentalForm.value['monthlyRentalStartDates']), 'MM/dd/yyyy'),\r\n RentalEndDate: this.datePipe.transform(new Date(this.monthlyRentalStartDates[this.monthlyRentalStartDates.length-1].startDate), 'MM/dd/yyyy'),\r\n RentalStartDateYearMonth:rentalStartDateYearMonth,\r\n tempRecordNo: this.tempRecordNo\r\n } \r\n this.displayLayout = true;\r\n }\r\n }\r\n\r\n validateAndAddSelectedBoothsToGrid() {\r\n let noResale = true;\r\n var rentalDates = [];\r\n var marketDay;\r\n this.vendorRentalDays = [];\r\n this.marketDayCountForResale = 0 \r\n if ((this.ResaleNumberRequired && !this.exemptResale) || (this.BusinessLicenseNumberRequired)) {\r\n var rentalstartDate = \"\";\r\n var selectedBoothRecord = this.selectedMonthlyBooths.filter(e => e.NewBooth == true || e.ExtendRental == true);\r\n if (selectedBoothRecord.length > 0) {\r\n selectedBoothRecord.forEach(record => {\r\n var selectedDaysOfWeek;\r\n record.Sunday == true ? selectedDaysOfWeek = 0 :\r\n record.Monday == true ? selectedDaysOfWeek = 1 :\r\n record.Tuesday == true ? selectedDaysOfWeek = 2 :\r\n record.Wednesday == true ? selectedDaysOfWeek = 3 :\r\n record.Thursday == true ? selectedDaysOfWeek = 4 :\r\n record.Friday == true ? selectedDaysOfWeek = 5 :\r\n record.Saturday == true ? selectedDaysOfWeek = 6 : 0;\r\n const startDate = new Date(record.RentalStartDate);\r\n const endDate = new Date(record.RentalEndDate);\r\n let currentDay = new Date(startDate);\r\n const excludedDates = this.excludedMarketDays.map(dateString => new Date(dateString));\r\n while (currentDay <= endDate) {\r\n var exludedDate = excludedDates.some(date => {\r\n return this.datePipe.transform(date, 'MM/dd/yyyy') === this.datePipe.transform(currentDay, 'MM/dd/yyyy');\r\n });\r\n if (currentDay.getDay() === selectedDaysOfWeek && !exludedDate) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }); \r\n }\r\n\r\n for (const el of this.selectedMarketDays) {\r\n switch (el) {\r\n case 1: marketDay = 'Sun'\r\n break;\r\n case 2: marketDay = 'Mon'\r\n break;\r\n case 3: marketDay = 'Tue'\r\n break;\r\n case 4: marketDay = 'Wed'\r\n break;\r\n case 5: marketDay = 'Thu'\r\n break;\r\n case 6: marketDay = 'Fri'\r\n break;\r\n case 7: marketDay = 'Sat'\r\n break;\r\n } \r\n \r\n // rentalDates=[];\r\n const startDate = new Date(this.rentalForm.value['monthlyRentalStartDates']);\r\n const endMonth = this.rentalForm.value['rentalEndMonth'];\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n const endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n const excludedDates = this.excludedMarketDays.map(dateString => new Date(dateString));\r\n while (currentDay <= endDate) {\r\n var exludedDate = excludedDates.some(date => {\r\n return this.datePipe.transform(date, 'MM/dd/yyyy') === this.datePipe.transform(currentDay, 'MM/dd/yyyy');\r\n });\r\n if (currentDay.getDay() === selectedDayOfWeek && !exludedDate) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n\r\n rentalDates.map(date => {\r\n const targetDateString = this.datePipe.transform(date.startDate, \"MM/dd/yyyy\");\r\n const dateExist = this.vendorRentalDays.find(el => {\r\n const rentalDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(date.startDate, \"MM/dd/yyyy\");\r\n this.vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n if (this.marketDayCountForResale > this.DaysSellWithoutResaleNumber) {\r\n return; // exits the forEach loop when the condition is met\r\n }\r\n }\r\n });\r\n\r\n const obj = {\r\n VendorID: this.vendorId,\r\n VendorRentalDate: new Date()\r\n };\r\n\r\n this.subscriptions.push(this.rentalService.getVendorRentalDays(obj).subscribe((res: any[]) => {\r\n if (this.marketDayCountForResale <= this.DaysSellWithoutResaleNumber || this.marketDayCountForResale <= this.DaysSellWithoutBusiLicNumber) {\r\n // const date = rentalDates[index].startDate;\r\n if (res && res.length > 0) {\r\n res.forEach(el => {\r\n const targetDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n const dateExist = this.vendorRentalDays.find(data => {\r\n const rentalDateString = this.datePipe.transform(data.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n this.vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n }\r\n });\r\n }\r\n }\r\n\r\n if (!this.newVendor) {\r\n if (this.ResaleNumberRequired && !this.exemptResale && !this.resaleNo && this.marketDayCountForResale > this.DaysSellWithoutResaleNumber && !this.resaleOptionSelected) {\r\n const modal = this.modalResaleNo.nativeElement;\r\n modal.classList.add('show');\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'block';\r\n this.ResaleOrBusinessHeader = \"Resale Number\"\r\n this.resaleNoDisplay = true;\r\n this.businessLicenseDisplay = false;\r\n }\r\n noResale = false;\r\n }\r\n else if (this.BusinessLicenseNumberRequired && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n if (!this.businessLicenseNumber || !this.businessLicenseExpiryDate) {\r\n const modal = this.modalResaleNo.nativeElement;\r\n modal.classList.add('show');\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'block';\r\n this.ResaleOrBusinessHeader = \"Business License Number\";\r\n this.resaleNoDisplay = false;\r\n this.businessLicenseDisplay = true;\r\n }\r\n noResale = false;\r\n }\r\n else {\r\n if (this.getDateFromDateTime(new Date(this.businessLicenseExpiryDate)) < this.getDateFromDateTime(new Date())) {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Business License is expired! Please contact the market`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n }\r\n else {\r\n noResale = true;\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n else {\r\n if (this.ResaleNumberRequired && !this.exemptResale && !this.resaleNo && this.marketDayCountForResale > this.DaysSellWithoutResaleNumber && !this.resaleOptionSelected) {\r\n this.resaleNoInputRequired.emit(true)\r\n }\r\n if (this.BusinessLicenseNumberRequired && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n this.businessLicenseRequired.emit(true);\r\n }\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }));\r\n } else {\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n\r\n refreshAddBooth() {\r\n this.getMarketDays();\r\n this.selectedMonthlyBoothData = [];\r\n if (this.selectedBoothsForRental.length > 0) {\r\n this.selectedBoothsForRental.forEach(ele => {\r\n const temp = {\r\n TempRecordNo: this.tempRecordNo.toString(),\r\n BoothNumber: ele.BoothNumber,\r\n StartDate: new Date(ele.StartDate),\r\n RentalType: 4,\r\n EndDate: new Date(ele.EndDate),\r\n Sunday: this.rentalForm.value['marketWeekSunday'],\r\n Monday: this.rentalForm.value['marketWeekMonday'],\r\n Tuesday: this.rentalForm.value['marketWeekTuesday'],\r\n Wednesday: this.rentalForm.value['marketWeekWednesday'],\r\n Thursday: this.rentalForm.value['marketWeekThursday'],\r\n Friday: this.rentalForm.value['marketWeekFriday'],\r\n Saturday: this.rentalForm.value['marketWeekSaturday'],\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n });\r\n }\r\n this.selectedBoothsForRental = [];\r\n this.rentalForm.reset();\r\n this.rentalForm.patchValue({\r\n rentalStartMonth: this.monthlyMarketDays[0].RentalMonths,\r\n rentalEndMonth: this.monthlyMarketDays[0].RentalMonths,\r\n marketParts: this.defaultPart\r\n })\r\n }\r\n\r\n getDateFromDateTime(date){\r\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\r\n }\r\n\r\n AddBoothsOnGridOnValidationSucess() {\r\n var addToGrid = false;\r\n var closeModalPopup = false;\r\n const modal = this.modalResaleNo.nativeElement;\r\n if (this.resaleNoDisplay) {\r\n if (!this.resaleNo || this.resaleNo.trim() === '') {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Enter the resale number`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n addToGrid = true;\r\n closeModalPopup = true;\r\n this.resaleOptionSelected = true;\r\n }\r\n\r\n if (closeModalPopup) {\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'none';\r\n modal.classList.remove('show');\r\n }\r\n }\r\n\r\n if (addToGrid) {\r\n const obj = {\r\n VendorID: this.vendorId,\r\n ExemptResaleNo: false,\r\n ExemptResaleReason: \"\",\r\n ResaleNo: this.resaleNo,\r\n MarketId: this.marketId\r\n }\r\n\r\n this.subscriptions.push(this.rentalService.UpdateVendorResaleInfo(obj).subscribe((res: any) => {\r\n }));\r\n }\r\n }\r\n else{\r\n addToGrid = true;\r\n }\r\n\r\n if (addToGrid) {\r\n if (this.BusinessLicenseNumberRequired && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n var addToGrid = false;\r\n var closeModalPopup = false;\r\n if ((!this.businessLicenseNumber || this.businessLicenseNumber.trim() === '') || !this.businessLicenseExpiryDate) {\r\n this.ResaleOrBusinessHeader = \"Business License Number\"\r\n const modal = this.modalResaleNo.nativeElement;\r\n this.resaleNoDisplay = false; \r\n this.businessLicenseDisplay = true;\r\n modal.classList.add('show');\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'block';\r\n this.ResaleOrBusinessHeader = \"Business License Number\" \r\n }\r\n }\r\n else if (this.getDateFromDateTime(new Date(this.businessLicenseExpiryDate)) < this.getDateFromDateTime(new Date())) {\r\n this.closeResaleModal();\r\n Swal.fire({\r\n text: $localize`Business License is expired! Please contact the market.`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n addToGrid = true;\r\n this.closeResaleModal();\r\n if (this.businessLicenseDisplay) {\r\n const obj = {\r\n VendorID: this.vendorId,\r\n LicenseNameId: 1,\r\n LicenseName: \"\",\r\n ExpiryDate: new Date(this.businessLicenseExpiryDate),\r\n LicenseNumber: this.businessLicenseNumber\r\n }\r\n \r\n this.subscriptions.push(this.rentalService.updateVendorBusinessLicense(this.marketId, obj).subscribe((res: any) => {\r\n }));\r\n }\r\n this.addSelectedBoothsToGrid();\r\n } \r\n }\r\n else {\r\n addToGrid = true;\r\n closeModalPopup = true;\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n }\r\n\r\n addSelectedBoothsToGrid() { \r\n this.selectedBoothsForRental = [];\r\n if (this.selectedMonthlyBoothData) {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedMonthlyBoothData.map((el, i) => {\r\n const endMonth = this.rentalForm.value['rentalEndMonth'];\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n const endDate = new Date(endMonthYear, endMonthIndex + 1, 0); \r\n\r\n var obj = {\r\n BoothTypeId: el.BoothTypeId,\r\n VendorId: this.vendorId,\r\n RentalStartPeriod: new Date(this.rentalForm.value['monthlyRentalStartDates']),\r\n RentalEndPeriod:endDate,\r\n RentalMarketDay: el.MarketDay,\r\n PerDiemApplicable: this.perDiemRentApplicable? true: false,\r\n WRNewVendorRequest: this.newVendor\r\n }\r\n\r\n this.subscriptions.push(this.rentalService.getBoothRentalMontlyCharges(this.marketId,obj).subscribe((res: any) => {\r\n var newbooths = [];\r\n var vendorProducts = !this.newVendor ? this.vendorProducts.filter(x => x.Priority) ? this.vendorProducts.filter(x => x.Priority)[0].ProductId : this.vendorProducts[0].ProductId:\"\";\r\n const ob = {\r\n MonthlyRentalId: 0,\r\n BoothNumber: el.BoothNumber,\r\n BoothType: el.BoothType,\r\n BoothTypeId: el.BoothTypeId,\r\n BoothDescription: el.BoothDescription,\r\n Product: vendorProducts,\r\n RentStartPeriod: this.rentalForm.value['rentalStartMonth'],\r\n RentEndPeriod: this.rentalForm.value['rentalEndMonth'],\r\n RentalStartDate :el.RentalStartDate,\r\n RentalEndDate : el.RentalEndDate,\r\n MktDays: el.NoOfMarketDays,\r\n PerDiem: this.perDiemRentApplicable? true: false,\r\n PerDiemRent:this.customCurrency.transform(res.PerdiemRent),\r\n Rent: this.customCurrency.transform(res.Rent),\r\n SalesTax: this.customCurrency.transform(res.SalesTax),\r\n CityTax: this.customCurrency.transform(res.CityTax),\r\n Sunday: el.Sunday,\r\n Monday: el.Monday,\r\n Tuesday: el.Tuesday,\r\n Wednesday: el.Wednesday,\r\n Thursday: el.Thursday,\r\n Friday: el.Friday,\r\n Saturday: el.Saturday,\r\n Reservation: true,\r\n Drop: false,\r\n January: this.customCurrency.transform(res.JanRent),\r\n February: this.customCurrency.transform(res.FebRent),\r\n March: this.customCurrency.transform(res.MarRent),\r\n April: this.customCurrency.transform(res.AprRent),\r\n May: this.customCurrency.transform(res.MayRent),\r\n June: this.customCurrency.transform(res.JunRent),\r\n July: this.customCurrency.transform(res.JulRent),\r\n August: this.customCurrency.transform(res.AugRent),\r\n September: this.customCurrency.transform(res.SepRent),\r\n October: this.customCurrency.transform(res.OctRent),\r\n November: this.customCurrency.transform(res.NovRent),\r\n December: this.customCurrency.transform(res.DecRent),\r\n NewBooth: true,\r\n RentalMarketDay: el.MarketDay,\r\n JanuaryMonthPresent: res.JanuaryMonthPresent,\r\n FebruaryMonthPresent: res.FebruaryMonthPresent,\r\n MarchMonthPresent: res.MarchMonthPresent,\r\n AprilMonthPresent: res.AprilMonthPresent,\r\n MayMonthPresent: res.MayMonthPresent,\r\n JuneMonthPresent: res.JuneMonthPresent,\r\n JulyMonthPresent: res.JulyMonthPresent,\r\n AugustMonthPresent: res.AugustMonthPresent,\r\n SeptemberMonthPresent: res.SeptemberMonthPresent,\r\n OctoberMonthPresent: res.OctoberMonthPresent,\r\n NovemberMonthPresent: res.NovemberMonthPresent,\r\n DecemberMonthPresent: res.DecemberMonthPresent,\r\n DisableJanMonth: res.JanRent || res.JanRent == 0?false:true, \r\n DisableFebMonth: res.FebRent || res.FebRent == 0?false:true, \r\n DisableMarMonth: res.MarRent || res.MarRent == 0?false:true, \r\n DisableAprMonth: res.AprRent || res.AprRent == 0?false:true, \r\n DisableMayMonth: res.MayRent || res.MayRent == 0?false:true, \r\n DisableJunMonth: res.JunRent || res.JunRent == 0?false:true, \r\n DisableJulMonth: res.JulRent || res.JulRent == 0?false:true, \r\n DisableAugMonth: res.AugRent || res.AugRent == 0?false:true, \r\n DisableSepMonth: res.SepRent || res.SepRent == 0?false:true, \r\n DisableOctMonth: res.OctRent || res.OctRent == 0?false:true, \r\n DisableNovMonth: res.NovRent || res.NovRent == 0?false:true, \r\n DisableDecMonth: res.DecRent || res.DecRent == 0?false:true,\r\n Status: \"N\", \r\n StartDateList:el.StartDateList,\r\n DiasbleStartDate: false, \r\n RentalStartDateYearMonth:el.RentalStartDateYearMonth,\r\n ExtendRental: false,\r\n TaxModel: res.TaxModel\r\n }\r\n this.totalRentalCharge += res.Rent.toString().includes('(') && res.Rent.toString().includes(')') ? -1 * parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n \r\n this.getDiscounts();\r\n this.getMarketDays();\r\n newbooths.push(JSON.parse(JSON.stringify(ob)));\r\n this.selectedMonthlyBooths = this.selectedMonthlyBooths.concat(newbooths);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n }));\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n }); \r\n this.gridMonthlyRental.refresh(); \r\n this.loaderIcon = Promise.resolve(false);\r\n // this.refreshAddBooth();\r\n }\r\n }\r\n\r\n closeResaleModal(){\r\n const modal = this.modalResaleNo.nativeElement;\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'none';\r\n modal.classList.remove('show');\r\n }\r\n }\r\n\r\n searchOtherItem() {\r\n this.otherRentalCharges = this.otherItemList;\r\n const otherItemSearchText = this.rentalForm.controls['otherItemsScreen'].value['otherItemSearchText'];\r\n if (otherItemSearchText != '') {\r\n this.otherRentalCharges = this.otherItemList.filter((ele) => ele.OtherItem.toString().toLowerCase().indexOf(otherItemSearchText.toLowerCase()) !== -1);\r\n }\r\n }\r\n\r\n created(args) {\r\n if(this.newVendor){\r\n this.gridMonthlyRental.getColumnByField(\"Product\").visible = false;\r\n }\r\n }\r\n\r\n loadSelectedBooths() { \r\n var newItem =[];\r\n if (this.sharedDataService.paymentSharedData.ReturnData.length > 0) {\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n this.sharedDataService.paymentSharedData.ReturnData.forEach((item) => {\r\n var extendedBoothIndex = this.selectedMonthlyBooths.findIndex(e=>e.MonthlyRentalId == item.MonthlyRentalId && item.ExtendRental) \r\n var newbooths=[];\r\n if (extendedBoothIndex == -1) {\r\n var ob = {\r\n BoothNumber: item.BoothNumber,\r\n BoothType: item.BoothType,\r\n BoothTypeId: item.BoothTypeId,\r\n BoothDescription: item.BoothDescription,\r\n Product: item.Product,\r\n RentStartPeriod: item.RentStartPeriod,\r\n RentEndPeriod: item.RentEndPeriod,\r\n RentalSavedEndDate: item.RentalSavedEndDate,\r\n RentalStartDate: item.RentalStartDate,\r\n RentalEndDate: item.RentalEndDate,\r\n MktDays: item.MktDays,\r\n Rent: item.Rent,\r\n SalesTax: item.SalesTax,\r\n CityTax: item.CityTax,\r\n PerDiem: item.PerDiem,\r\n PerDiemRent: item.PerDiemRent,\r\n Sunday: item.Sunday,\r\n Monday: item.Monday,\r\n Tuesday: item.Tuesday,\r\n Wednesday: item.Wednesday,\r\n Thursday: item.Thursday,\r\n Friday: item.Friday,\r\n Saturday: item.Saturday,\r\n Reservation: item.Reservation,\r\n Drop: item.Drop,\r\n January: item.January,\r\n February: item.February,\r\n March: item.March,\r\n April: item.April,\r\n May: item.May,\r\n June: item.June,\r\n July: item.July,\r\n August: item.August,\r\n September: item.September,\r\n October: item.October,\r\n November: item.November,\r\n December: item.December,\r\n JanuaryMonthPresent: item.JanuaryMonthPresent,\r\n FebruaryMonthPresent: item.FebruaryMonthPresent,\r\n MarchMonthPresent: item.MarchMonthPresent,\r\n AprilMonthPresent: item.AprilMonthPresent,\r\n MayMonthPresent: item.MayMonthPresent,\r\n JuneMonthPresent: item.JuneMonthPresent,\r\n JulyMonthPresent: item.JulyMonthPresent,\r\n AugustMonthPresent: item.AugustMonthPresent,\r\n SeptemberMonthPresent: item.SeptemberMonthPresent,\r\n OctoberMonthPresent: item.OctoberMonthPresent,\r\n NovemberMonthPresent: item.NovemberMonthPresent,\r\n DecemberMonthPresent: item.DecemberMonthPresent,\r\n NewBooth: true,\r\n Status: \"N\",\r\n StartDateList: item.StartDateList,\r\n DisableStartDate: false,\r\n TaxModel: item.TaxModel\r\n }\r\n newbooths.push(JSON.parse(JSON.stringify(ob)));\r\n }\r\n else {\r\n this.selectedMonthlyBooths[extendedBoothIndex].RentEndPeriod = item.RentEndPeriod;\r\n this.selectedMonthlyBooths[extendedBoothIndex].RentalSavedEndDate = item.RentalSavedEndDate;\r\n this.selectedMonthlyBooths[extendedBoothIndex].RentalEndDate = item.RentalEndDate;\r\n this.selectedMonthlyBooths[extendedBoothIndex].MktDays = item.MktDays;\r\n this.selectedMonthlyBooths[extendedBoothIndex].Rent = item.Rent;\r\n this.selectedMonthlyBooths[extendedBoothIndex].SalesTax = item.SalesTax;\r\n this.selectedMonthlyBooths[extendedBoothIndex].CityTax = item.CityTax;\r\n this.selectedMonthlyBooths[extendedBoothIndex].PerDiem = item.PerDiem;\r\n this.selectedMonthlyBooths[extendedBoothIndex].PerDiemRent = item.PerDiemRent;\r\n this.selectedMonthlyBooths[extendedBoothIndex].Sunday = item.Sunday;\r\n this.selectedMonthlyBooths[extendedBoothIndex].Monday = item.Monday;\r\n this.selectedMonthlyBooths[extendedBoothIndex].Tuesday = item.Tuesday;\r\n this.selectedMonthlyBooths[extendedBoothIndex].Wednesday = item.Wednesday;\r\n this.selectedMonthlyBooths[extendedBoothIndex].Thursday = item.Thursday;\r\n this.selectedMonthlyBooths[extendedBoothIndex].Friday = item.Friday;\r\n this.selectedMonthlyBooths[extendedBoothIndex].Saturday = item.Saturday;\r\n this.selectedMonthlyBooths[extendedBoothIndex].Reservation = item.Reservation;\r\n this.selectedMonthlyBooths[extendedBoothIndex].Drop = item.Drop;\r\n this.selectedMonthlyBooths[extendedBoothIndex].January = item.January;\r\n this.selectedMonthlyBooths[extendedBoothIndex].February = item.February;\r\n this.selectedMonthlyBooths[extendedBoothIndex].March = item.March;\r\n this.selectedMonthlyBooths[extendedBoothIndex].April = item.April;\r\n this.selectedMonthlyBooths[extendedBoothIndex].May = item.May;\r\n this.selectedMonthlyBooths[extendedBoothIndex].June = item.June;\r\n this.selectedMonthlyBooths[extendedBoothIndex].July = item.July;\r\n this.selectedMonthlyBooths[extendedBoothIndex].August = item.August;\r\n this.selectedMonthlyBooths[extendedBoothIndex].September = item.September;\r\n this.selectedMonthlyBooths[extendedBoothIndex].October = item.October;\r\n this.selectedMonthlyBooths[extendedBoothIndex].November = item.November;\r\n this.selectedMonthlyBooths[extendedBoothIndex].December = item.December;\r\n this.selectedMonthlyBooths[extendedBoothIndex].JanuaryMonthPresent = item.JanuaryMonthPresent;\r\n this.selectedMonthlyBooths[extendedBoothIndex].FebruaryMonthPresent = item.FebruaryMonthPresent;\r\n this.selectedMonthlyBooths[extendedBoothIndex].MarchMonthPresent = item.MarchMonthPresent;\r\n this.selectedMonthlyBooths[extendedBoothIndex].AprilMonthPresent = item.AprilMonthPresent;\r\n this.selectedMonthlyBooths[extendedBoothIndex].MayMonthPresent = item.MayMonthPresent;\r\n this.selectedMonthlyBooths[extendedBoothIndex].JuneMonthPresent = item.JuneMonthPresent;\r\n this.selectedMonthlyBooths[extendedBoothIndex].JulyMonthPresent = item.JulyMonthPresent;\r\n this.selectedMonthlyBooths[extendedBoothIndex].AugustMonthPresent = item.AugustMonthPresent;\r\n this.selectedMonthlyBooths[extendedBoothIndex].SeptemberMonthPresent = item.SeptemberMonthPresent;\r\n this.selectedMonthlyBooths[extendedBoothIndex].OctoberMonthPresent = item.OctoberMonthPresent;\r\n this.selectedMonthlyBooths[extendedBoothIndex].NovemberMonthPresent = item.NovemberMonthPresent;\r\n this.selectedMonthlyBooths[extendedBoothIndex].DecemberMonthPresent = item.DecemberMonthPresent;\r\n this.selectedMonthlyBooths[extendedBoothIndex].DisableJanMonth = item.JanRent || item.JanRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[extendedBoothIndex].DisableFebMonth = item.FebRent || item.FebRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[extendedBoothIndex].DisableMarMonth = item.MarRent || item.MarRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[extendedBoothIndex].DisableAprMonth = item.AprRent || item.AprRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[extendedBoothIndex].DisableMayMonth = item.MayRent || item.MayRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[extendedBoothIndex].DisableJunMonth = item.JunRent || item.JunRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[extendedBoothIndex].DisableJulMonth = item.JulRent || item.JulRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[extendedBoothIndex].DisableAugMonth = item.AugRent || item.AugRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[extendedBoothIndex].DisableSepMonth = item.SepRent || item.SepRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[extendedBoothIndex].DisableOctMonth = item.OctRent || item.OctRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[extendedBoothIndex].DisableNovMonth = item.NovRent || item.NovRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[extendedBoothIndex].DisableDecMonth = item.DecRent || item.DecRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[extendedBoothIndex].NewBooth = false;\r\n this.selectedMonthlyBooths[extendedBoothIndex].Status = \"N\";\r\n this.selectedMonthlyBooths[extendedBoothIndex].StartDateList = item.StartDateList;\r\n this.selectedMonthlyBooths[extendedBoothIndex].DisableStartDate = true;\r\n this.selectedMonthlyBooths[extendedBoothIndex].ExtendRental = true;\r\n this.selectedMonthlyBooths[extendedBoothIndex].TaxModel = item.TaxModel;\r\n }\r\n this.selectedMonthlyBooths = this.selectedMonthlyBooths.concat(newbooths); \r\n });\r\n }\r\n if (this.sharedDataService.paymentSharedData.MonthlyOtherRentalCharges.length > 0) {\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n this.sharedDataService.paymentSharedData.MonthlyOtherRentalCharges.forEach((el) => {\r\n if (el.MonthOtherRentalId == 0) {\r\n const year = el.YearMonth.substr(0, 4);\r\n const month = el.YearMonth.substr(4, 2);\r\n const monthInWord = this.datePipe.transform(new Date(year, month - 1), 'MMMM');\r\n const extractedYearMonth = `${monthInWord} ${year}`;\r\n newItem = [];\r\n var ob = {\r\n Id: el.OtherItemId,\r\n MonthOtherRentalId: el.MonthOtherRentalId,\r\n OtherItem: el.OtherItemName,\r\n OtherItemCharge: this.customCurrency.transform(el.OtherCharge),\r\n Quantity: el.Quantity,\r\n OtherItemtotal: this.customCurrency.transform(el.OtherItemCharge),\r\n RentalMonth: extractedYearMonth,\r\n Recurring: el.Recurring,\r\n SalesTax: this.customCurrency.transform(el.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(el.SecLevelTax.toString()),\r\n BoothNo: el.BoothNumber,\r\n Reference: el.Reference,\r\n NewItem: true\r\n }\r\n newItem.push(JSON.parse(JSON.stringify(ob)));\r\n } \r\n\r\n if (newItem.length > 0) {\r\n this.selectedOtherItems = this.selectedOtherItems.concat(newItem);\r\n }\r\n });\r\n }\r\n this.totalRentalCharge = parseFloat(this.sharedDataService.paymentSharedData.RentalCharge);\r\n this.totalOtherRentalCharge = parseFloat(this.sharedDataService.paymentSharedData.OtherCharge.toString());\r\n this.totalSalesTax = parseFloat(this.sharedDataService.paymentSharedData.SalesTax.toString());\r\n this.totalSecondLeveltax = parseFloat(this.sharedDataService.paymentSharedData.SecLevelTax.toString());\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.sharedDataService.paymentSharedData = \"\";\r\n this.getDiscounts();\r\n }\r\n\r\n setDefaultRentalItem(args, selectedItems) {\r\n selectedItems.Quantity = 0\r\n selectedItems.OtherItemtotal = 0\r\n if (args.srcElement.checked) {\r\n selectedItems.otherItemChecked = true;\r\n selectedItems.Quantity = 1\r\n const isNegative = selectedItems.OtherItemCharge.includes('(') && selectedItems.OtherItemCharge.includes(')');\r\n const totalValue = parseFloat(selectedItems.OtherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n selectedItems.OtherItemtotal = this.customCurrency.transform((finalCharge * selectedItems.Quantity).toString());\r\n this.selectedOtherCharges.push({\r\n Id: selectedItems.Id,\r\n OtherItem: selectedItems.OtherItem,\r\n OtherItemCharge: selectedItems.OtherItemCharge,\r\n Quantity: selectedItems.Quantity,\r\n OtherItemtotal: selectedItems.OtherItemtotal,\r\n othChgBooths: selectedItems.othChgBooths,\r\n Recurring: selectedItems.Recurring,\r\n Reference:selectedItems.Reference,\r\n RentalMonth: this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth']\r\n });\r\n } else {\r\n selectedItems.otherItemChecked = false;\r\n const index = this.selectedOtherCharges.findIndex(item => item.Id === selectedItems.Id);\r\n if (index !== -1) {\r\n this.selectedOtherCharges.splice(index, 1);\r\n }\r\n }\r\n }\r\n\r\n selectedBoothsFromLayout(data) {\r\n window.scrollTo(0, 0);\r\n this.selectedMonthlyBoothData = data;\r\n this.displayLayout = false; \r\n this.getWebRentalSetting();\r\n this.validateAndAddSelectedBoothsToGrid();\r\n }\r\n\r\n closeLayoutForm() {\r\n this.displayLayout = false;\r\n this.getMarketDays();\r\n }\r\n\r\n async getBoothsAndItemsForOtherCharges() {\r\n this.boothsForOtherCharge = [];\r\n this.selectedOtherCharges = [];\r\n if (this.OtherChargesPeriod) {\r\n this.otherRentalCharges = [];\r\n this.otherItemList = [];\r\n await this.getOtherRentalItems();\r\n }\r\n const uniqueBoothNumbers = new Map();\r\n if (this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth']) {\r\n this.selectedMonthlyBooths.forEach((item) => {\r\n if (item.RentStartPeriod == this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth']) {\r\n const boothNumber = item.BoothNumber;\r\n if (!uniqueBoothNumbers.has(boothNumber)) {\r\n this.boothsForOtherCharge.push({ BoothNumber: item.BoothNumber })\r\n uniqueBoothNumbers.set(boothNumber, true); // Set the booth number in the Map\r\n }\r\n }\r\n });\r\n }\r\n this.boothsForOtherCharge.sort((a, b) => {\r\n if (a.BoothNumber < b.BoothNumber) {\r\n return -1;\r\n }\r\n if (a.BoothNumber > b.BoothNumber) {\r\n return 1;\r\n }\r\n return 0;\r\n }); \r\n }\r\n\r\n disableSavePayment() {\r\n var vendorBalance = this.priorBalance + this.totalCharge;\r\n if (vendorBalance > 0) {\r\n return false\r\n }\r\n else\r\n return true\r\n }\r\n\r\n addOtherCharges() {\r\n if (this.selectedOtherCharges) {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedOtherCharges.map((el, i) => {\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: el.Id,\r\n VendorId: this.vendorId,\r\n Quantity: el.Quantity,\r\n OtherItemCharge: el.OtherItemCharge.includes('(') && el.OtherItemCharge.includes(')') ? (-1) * parseFloat(el.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(el.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n WRNewVendorRequest: this.newVendor\r\n }\r\n const index = this.selectedOtherItems.findIndex(item => item.Id === el.Id && item.RentalMonth == this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth'] && item.NewItem == true && item.BoothNo === el.othChgBooths && item.Reference == el.Reference);\r\n this.subscriptions.push(this.rentalService.getOtherItemsRentalCharges(obj).subscribe((res: any) => {\r\n var newItem = [];\r\n if (index !== -1) {\r\n var otherItemTotal = this.selectedOtherItems[index].OtherItemtotal;\r\n var salesTax = this.selectedOtherItems[index].SalesTax;\r\n var cityTax = this.selectedOtherItems[index].CityTax;\r\n this.totalOtherRentalCharge -= otherItemTotal.toString().includes('(') && otherItemTotal.toString().includes(')') ? -1 * parseFloat(otherItemTotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(otherItemTotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= salesTax.toString().includes('(') && salesTax.toString().includes(')') ? -1 * parseFloat(salesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(salesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= cityTax.toString().includes('(') && cityTax.toString().includes(')') ? -1 * parseFloat(cityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(cityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n \r\n const ob = {\r\n Id: el.Id,\r\n MonthOtherRentalId: 0,\r\n OtherItem: el.OtherItem,\r\n OtherItemCharge: el.OtherItemCharge,\r\n Quantity: el.Quantity,\r\n OtherItemtotal: el.OtherItemtotal,\r\n RentalMonth: el.RentalMonth,\r\n SalesTax: this.customCurrency.transform(res.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(res.CityTax.toString()),\r\n BoothNo: el.othChgBooths,\r\n Recurring: el.Recurring,\r\n Reference:el.Reference,\r\n NewItem: true,\r\n MonthlyRentalIds:''\r\n }\r\n this.selectedOtherItems[index] = ob;\r\n this.gridOtherRental.refresh();\r\n }\r\n else {\r\n const ob = {\r\n Id: el.Id,\r\n MonthOtherRentalId: 0,\r\n OtherItem: el.OtherItem,\r\n OtherItemCharge: el.OtherItemCharge,\r\n Quantity: el.Quantity,\r\n OtherItemtotal: el.OtherItemtotal,\r\n RentalMonth: el.RentalMonth,\r\n SalesTax: this.customCurrency.transform(res.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(res.CityTax.toString()),\r\n BoothNo: el.othChgBooths,\r\n Recurring: el.Recurring,\r\n Reference:el.Reference,\r\n NewItem: true,\r\n MonthlyRentalIds : ''\r\n }\r\n newItem.push(JSON.parse(JSON.stringify(ob)));\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n }\r\n\r\n this.totalOtherRentalCharge += el.OtherItemtotal.toString().includes('(') && el.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(el.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(el.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n \r\n this.getDiscounts();\r\n if (newItem.length > 0) {\r\n this.selectedOtherItems = this.selectedOtherItems.concat(newItem);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n }));\r\n });\r\n\r\n this.loaderIcon = Promise.resolve(false);\r\n const modal = this.modalMonthlyOtherCharges.nativeElement;\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'none';\r\n modal.classList.remove('show');\r\n }\r\n }\r\n }\r\n\r\n cancelRental() {\r\n if (this.isdirty) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Unsaved changes will be lost. Are you sure you want to cancel?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.isFormDirty.emit(false);\r\n this.isCancelClicked.emit('2');\r\n } else {\r\n //do nothing\r\n }\r\n });\r\n } else {\r\n this.isFormDirty.emit(false);\r\n this.isCancelClicked.emit('2');\r\n }\r\n }\r\n\r\n rentOnlineNextTab(){\r\n this.saveRentalWithPayment();\r\n this.bookingFormCompleted.emit(true);\r\n }\r\n\r\n saveRentalWithPayment() {\r\n this.isdirty = false;\r\n this.isFormDirty.emit(false);\r\n this.loaderIcon = Promise.resolve(true);\r\n var obj = {\r\n VendorId: this.vendorId,\r\n RentalType: 2,\r\n PriorBalance: this.priorBalance,\r\n RentalCharge: this.totalRentalCharge,\r\n SalesTax: this.totalSalesTax,\r\n SecLevelTax: this.totalSecondLeveltax,\r\n OtherCharge: this.totalOtherRentalCharge,\r\n RentalNotes: \"\",\r\n PaymentDone: false,\r\n ExemptResaleNo: false,\r\n ExemptResaleReason: \"\",\r\n ResaleNo: this.resaleNo,\r\n PaymentDueDate: null,\r\n MonthlyRentalBooth: [],\r\n MonthlyOtherRentalCharges: [],\r\n ReturnData: [],\r\n ReceiptSettings: \"\",\r\n PaymentOnly: false,\r\n AppliedDiscountModel: [],\r\n DiscountAmount: this.totalDiscountCharge ?? 0,\r\n BookingFee: this.bookingFeeAmount ?? 0\r\n }\r\n\r\n var objSelectedBooth = [];\r\n var objReturnData = [];\r\n if (this.selectedMonthlyBooths.length > 0) {\r\n this.selectedMonthlyBooths.forEach((item, i) => {\r\n const rentalStartDateYear = new Date(item.RentalEndDate).getFullYear();\r\n const rentalStartDateMonth = new Date(item.RentalEndDate).getMonth() + 1;\r\n const rentalStartDateYearMonth = `${rentalStartDateYear}${rentalStartDateMonth < 10 ? '0' : ''}${rentalStartDateMonth}`;\r\n objSelectedBooth.push({\r\n MonthlyRentalId: item.MonthlyRentalId,\r\n BoothNumber: item.BoothNumber,\r\n BoothTypeId: item.BoothTypeId,\r\n ProductId: item.Product,\r\n BoothType: item.BoothType, \r\n RentalStartDate: new Date(item.RentalStartDate),\r\n RentalEndDate: new Date(item.RentalEndDate),\r\n RentalYearMonth: rentalStartDateYearMonth,\r\n BoothReserved: item.Reservation,\r\n DoNotRenew: item.Drop,\r\n PerDiem: item.PerDiem,\r\n Monday: item.Monday,\r\n Tuesday: item.Tuesday,\r\n Wednesday: item.Wednesday,\r\n Thursday: item.Thursday,\r\n Friday: item.Friday,\r\n Saturday: item.Saturday,\r\n Sunday: item.Sunday,\r\n PerDiemRent: item.PerDiemRent.includes('(') && item.PerDiemRent.includes(')') ? -1 * parseFloat(item.PerDiemRent.replace(/[^0-9.-]/g, '')) : parseFloat(item.PerDiemRent.replace(/[^0-9.-]/g, '')),\r\n RentalCharge: item.Rent.includes('(') && item.Rent.includes(')') ? -1 * parseFloat(item.Rent.replace(/[^0-9.-]/g, '')) : parseFloat(item.Rent.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n JanRent: item.January ? (item.January.includes('(') && item.January.includes(')') ? -1 * parseFloat(item.January.replace(/[^0-9.-]/g, '')) : parseFloat(item.January.replace(/[^0-9.-]/g, ''))) : 0,\r\n FebRent: item.February ? (item.February.includes('(') && item.February.includes(')') ? -1 * parseFloat(item.February.replace(/[^0-9.-]/g, '')) : parseFloat(item.February.replace(/[^0-9.-]/g, ''))) : 0,\r\n MarRent: item.March ? (item.March.includes('(') && item.March.includes(')') ? -1 * parseFloat(item.March.replace(/[^0-9.-]/g, '')) : parseFloat(item.March.replace(/[^0-9.-]/g, ''))) : 0,\r\n AprRent: item.April ? (item.April.includes('(') && item.April.includes(')') ? -1 * parseFloat(item.April.replace(/[^0-9.-]/g, '')) : parseFloat(item.April.replace(/[^0-9.-]/g, ''))) : 0,\r\n MayRent: item.May ? (item.May.includes('(') && item.May.includes(')') ? -1 * parseFloat(item.May.replace(/[^0-9.-]/g, '')) : parseFloat(item.May.replace(/[^0-9.-]/g, ''))) : 0,\r\n JunRent: item.June ? (item.June.includes('(') && item.June.includes(')') ? -1 * parseFloat(item.June.replace(/[^0-9.-]/g, '')) : parseFloat(item.June.replace(/[^0-9.-]/g, ''))) : 0,\r\n JulRent: item.July ? (item.July.includes('(') && item.July.includes(')') ? -1 * parseFloat(item.July.replace(/[^0-9.-]/g, '')) : parseFloat(item.July.replace(/[^0-9.-]/g, ''))) : 0,\r\n AugRent: item.August ? (item.August.includes('(') && item.August.includes(')') ? -1 * parseFloat(item.August.replace(/[^0-9.-]/g, '')) : parseFloat(item.August.replace(/[^0-9.-]/g, ''))) : 0,\r\n SepRent: item.September ? (item.September.includes('(') && item.September.includes(')') ? -1 * parseFloat(item.September.replace(/[^0-9.-]/g, '')) : parseFloat(item.September.replace(/[^0-9.-]/g, ''))) : 0,\r\n OctRent: item.October ? (item.October.includes('(') && item.October.includes(')') ? -1 * parseFloat(item.October.replace(/[^0-9.-]/g, '')) : parseFloat(item.October.replace(/[^0-9.-]/g, ''))) : 0,\r\n NovRent: item.November ? (item.November.includes('(') && item.November.includes(')') ? -1 * parseFloat(item.November.replace(/[^0-9.-]/g, '')) : parseFloat(item.November.replace(/[^0-9.-]/g, ''))) : 0,\r\n DecRent: item.December ? (item.December.includes('(') && item.December.includes(')') ? -1 * parseFloat(item.December.replace(/[^0-9.-]/g, '')) : parseFloat(item.December.replace(/[^0-9.-]/g, ''))) : 0,\r\n BookingLog: i + 1,\r\n TaxModel: item.TaxModel\r\n })\r\n\r\n if (item.NewBooth || item.ExtendRental) {\r\n objReturnData.push({\r\n MonthlyRentalId: item.MonthlyRentalId,\r\n BoothNumber: item.BoothNumber,\r\n BoothType: item.BoothType,\r\n BoothTypeId: item.BoothTypeId,\r\n BoothDescription: item.BoothDescription,\r\n Product: item.Product,\r\n RentStartPeriod: item.RentStartPeriod,\r\n RentEndPeriod: item.RentEndPeriod,\r\n RentalSavedEndDate: item.RentalEndDate,\r\n RentalStartDate: item.RentalStartDate,\r\n RentalEndDate: item.RentalEndDate,\r\n MktDays: item.MktDays,\r\n Rent: item.Rent,\r\n SalesTax: item.SalesTax,\r\n CityTax: item.CityTax,\r\n PerDiem: item.PerDiem,\r\n PerDiemRent: item.PerDiemRent,\r\n Sunday: item.Sunday,\r\n Monday: item.Monday,\r\n Tuesday: item.Tuesday,\r\n Wednesday: item.Wednesday,\r\n Thursday: item.Thursday,\r\n Friday: item.Friday,\r\n Saturday: item.Saturday,\r\n Reservation: item.Reservation,\r\n Drop: item.Drop,\r\n January: item.January,\r\n February: item.February,\r\n March: item.March,\r\n April: item.April,\r\n May: item.May,\r\n June: item.June,\r\n July: item.July,\r\n August: item.August,\r\n September: item.September,\r\n October: item.October,\r\n November: item.November,\r\n December: item.December,\r\n JanuaryMonthPresent: item.January ? true : false,\r\n FebruaryMonthPresent: item.February ? true : false,\r\n MarchMonthPresent: item.March ? true : false,\r\n AprilMonthPresent: item.April ? true : false,\r\n MayMonthPresent: item.May ? true : false,\r\n JuneMonthPresent: item.June ? true : false,\r\n JulyMonthPresent: item.July ? true : false,\r\n AugustMonthPresent: item.August ? true : false,\r\n SeptemberMonthPresent: item.September ? true : false,\r\n OctoberMonthPresent: item.October ? true : false,\r\n NovemberMonthPresent: item.November ? true : false,\r\n DecemberMonthPresent: item.December ? true : false,\r\n JanRent: item.January ? (item.January.includes('(') && item.January.includes(')') ? -1 * parseFloat(item.January.replace(/[^0-9.-]/g, '')) : parseFloat(item.January.replace(/[^0-9.-]/g, ''))) : 0,\r\n FebRent: item.February ? (item.February.includes('(') && item.February.includes(')') ? -1 * parseFloat(item.February.replace(/[^0-9.-]/g, '')) : parseFloat(item.February.replace(/[^0-9.-]/g, ''))) : 0,\r\n MarRent: item.March ? (item.March.includes('(') && item.March.includes(')') ? -1 * parseFloat(item.March.replace(/[^0-9.-]/g, '')) : parseFloat(item.March.replace(/[^0-9.-]/g, ''))) : 0,\r\n AprRent: item.April ? (item.April.includes('(') && item.April.includes(')') ? -1 * parseFloat(item.April.replace(/[^0-9.-]/g, '')) : parseFloat(item.April.replace(/[^0-9.-]/g, ''))) : 0,\r\n MayRent: item.May ? (item.May.includes('(') && item.May.includes(')') ? -1 * parseFloat(item.May.replace(/[^0-9.-]/g, '')) : parseFloat(item.May.replace(/[^0-9.-]/g, ''))) : 0,\r\n JunRent: item.June ? (item.June.includes('(') && item.June.includes(')') ? -1 * parseFloat(item.June.replace(/[^0-9.-]/g, '')) : parseFloat(item.June.replace(/[^0-9.-]/g, ''))) : 0,\r\n JulRent: item.July ? (item.July.includes('(') && item.July.includes(')') ? -1 * parseFloat(item.July.replace(/[^0-9.-]/g, '')) : parseFloat(item.July.replace(/[^0-9.-]/g, ''))) : 0,\r\n AugRent: item.August ? (item.August.includes('(') && item.August.includes(')') ? -1 * parseFloat(item.August.replace(/[^0-9.-]/g, '')) : parseFloat(item.August.replace(/[^0-9.-]/g, ''))) : 0,\r\n SepRent: item.September ? (item.September.includes('(') && item.September.includes(')') ? -1 * parseFloat(item.September.replace(/[^0-9.-]/g, '')) : parseFloat(item.September.replace(/[^0-9.-]/g, ''))) : 0,\r\n OctRent: item.October ? (item.October.includes('(') && item.October.includes(')') ? -1 * parseFloat(item.October.replace(/[^0-9.-]/g, '')) : parseFloat(item.October.replace(/[^0-9.-]/g, ''))) : 0,\r\n NovRent: item.November ? (item.November.includes('(') && item.November.includes(')') ? -1 * parseFloat(item.November.replace(/[^0-9.-]/g, '')) : parseFloat(item.November.replace(/[^0-9.-]/g, ''))) : 0,\r\n DecRent: item.December ? (item.December.includes('(') && item.December.includes(')') ? -1 * parseFloat(item.December.replace(/[^0-9.-]/g, '')) : parseFloat(item.December.replace(/[^0-9.-]/g, ''))) : 0,\r\n NewBooth: true,\r\n Status: \"N\",\r\n StartDateList: item.StartDateList,\r\n DisableStartDate: false,\r\n ExtendRental: item.ExtendRental,\r\n TaxModel: item.TaxModel\r\n });\r\n }\r\n });\r\n }\r\n\r\n if (objSelectedBooth.length > 0)\r\n obj.MonthlyRentalBooth = objSelectedBooth;\r\n\r\n if (objReturnData.length > 0) {\r\n obj.ReturnData = objReturnData;\r\n }\r\n\r\n var objSelectedOtherCharge = [];\r\n if (this.selectedOtherItems.length > 0) {\r\n this.selectedOtherItems.forEach((item) => {\r\n const otherRentalYear = new Date(item.RentalMonth.split('-')[0]).getFullYear();\r\n const otherRentalMonth = new Date(item.RentalMonth.split('-')[0]).getMonth() + 1;\r\n const otherRentalYearMonth = `${otherRentalYear}${otherRentalMonth < 10 ? '0' : ''}${otherRentalMonth}`;\r\n\r\n objSelectedOtherCharge.push({\r\n OtherItemId: item.Id,\r\n MonthOtherRentalId: item.MonthOtherRentalId,\r\n Quantity: item.Quantity,\r\n YearMonth: otherRentalYearMonth,\r\n OtherItemName: item.OtherItem,\r\n OtherItemCharge: item.OtherItemtotal.includes('(') && item.OtherItemtotal.includes(')') ? -1 * parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')),\r\n BoothNumber: item.BoothNo,\r\n Recurring: item.Recurring,\r\n Reference: item.Reference,\r\n OtherCharge: item.OtherItemCharge.includes('(') && item.OtherItemCharge.includes(')') ? -1 * parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n MonthlyRentalIds: item.MonthlyRentalIds\r\n })\r\n });\r\n }\r\n if (objSelectedOtherCharge.length > 0)\r\n obj.MonthlyOtherRentalCharges = objSelectedOtherCharge;\r\n\r\n var objDiscountData = [];\r\n if (this.vendorDiscountPlans.length > 0 && this.totalDiscountCharge > 0) {\r\n this.vendorDiscountPlans.forEach((item) => {\r\n if (item.CheckAll) {\r\n objDiscountData.push({\r\n PlanId: item.PlanSeqId,\r\n DiscountAmount: item.AppliedDiscount.includes('(') && item.AppliedDiscount.includes(')') ? -1 * parseFloat(item.AppliedDiscount.replace(/[^0-9.-]/g, '')) : parseFloat(item.AppliedDiscount.replace(/[^0-9.-]/g, '')),\r\n OtherCharges: item.OtherItems,\r\n SalesTax: item.SalesTaxApplied,\r\n SecondLevelTax: item.SecondLevelTaxApplied,\r\n DiscountType: item.DiscountType == DiscountType.Percentage ? \"0\" : \"1\",\r\n DiscountValue: item.DiscountValue,\r\n SalesTaxAmount: item.SalesTaxAmount.includes('(') && item.SalesTaxAmount.includes(')') ? -1 * parseFloat(item.SalesTaxAmount.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTaxAmount.replace(/[^0-9.-]/g, '')),\r\n SecondLevelTaxAmount: item.SecondLevelTaxAmount.includes('(') && item.SecondLevelTaxAmount.includes(')') ? -1 * parseFloat(item.SecondLevelTaxAmount.replace(/[^0-9.-]/g, '')) : parseFloat(item.SecondLevelTaxAmount.replace(/[^0-9.-]/g, ''))\r\n })\r\n }\r\n });\r\n }\r\n if (objDiscountData.length > 0)\r\n obj.AppliedDiscountModel = objDiscountData; \r\n\r\n if (!this.newVendor) {\r\n this.sharedDataService.paymentSharedData = obj;\r\n var url = 'vendor-payments/' + this.marketId;\r\n this.router.navigate([url]);\r\n }\r\n else{\r\n this.rentalBookingData.emit(obj);\r\n }\r\n\r\n var temp = {\r\n TempRecordNo: this.tempRecordNo.toString(),\r\n BoothNumber: \"\"\r\n }\r\n this.subscriptions.push(this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n }));\r\n }\r\n\r\n deleteSelectedBooth(data) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to delete the selected Booth?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n const index = this.selectedMonthlyBooths.findIndex(selectedBooth => selectedBooth.BoothNumber === data.BoothNumber && selectedBooth.RentStartPeriod == data.RentStartPeriod && selectedBooth.RentEndPeriod == data.RentEndPeriod\r\n && selectedBooth.Sunday == data.Sunday && selectedBooth.Monday == data.Monday && selectedBooth.Tuesday == data.Tuesday && selectedBooth.Wednesday == data.Wednesday\r\n && selectedBooth.Thursday == data.Thursday && selectedBooth.Friday == data.Friday && selectedBooth.Saturday == data.Saturday\r\n );\r\n if (index !== -1) {\r\n this.selectedMonthlyBooths.splice(index, 1);\r\n }\r\n if (this.tempRecordNo) {\r\n const temp = {\r\n TempRecordNo: this.tempRecordNo.toString(),\r\n BoothNumber: data.BoothNumber,\r\n StartDate: new Date(data.RentalStartDate),\r\n RentalType: 2,\r\n EndDate: new Date(data.RentalEndDate),\r\n Sunday: data.Sunday,\r\n Monday: data.Monday,\r\n Tuesday: data.Tuesday,\r\n Wednesday: data.Wednesday,\r\n Thursday: data.Thursday,\r\n Friday: data.Friday,\r\n Saturday: data.Saturday\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n } \r\n this.totalRentalCharge -= data.Rent.includes('(') && data.Rent.includes(')') ? -1 * parseFloat(data.Rent.replace(/[^0-9.-]/g, '')) : parseFloat(data.Rent.replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= data.SalesTax.includes('(') && data.SalesTax.includes(')') ? -1 * parseFloat(data.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.SalesTax.replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= data.CityTax.includes('(') && data.CityTax.includes(')') ? -1 * parseFloat(data.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.CityTax.replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.gridMonthlyRental.refresh();\r\n this.getDiscounts();\r\n }\r\n });\r\n }\r\n\r\n deleteOtherRentalCharges(data) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to delete the selected Other Charges?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n const index = this.selectedOtherItems.findIndex(oth => oth.Id === data.Id && oth.RentalMonth == data.RentalMonth);\r\n if (index !== -1) {\r\n this.selectedOtherItems.splice(index, 1);\r\n }\r\n\r\n var selectedItems = this.otherRentalCharges.findIndex(item => item.Id == data.Id);\r\n if (selectedItems != -1) {\r\n this.subscriptions.push(this.rentalService.getOtherRentalItems(this.marketId).subscribe((response) => {\r\n if (response) {\r\n const masterChargeRecord = response.filter(item => item.OtherItemId == data.Id);\r\n if (masterChargeRecord) {\r\n this.otherRentalCharges[selectedItems].Quantity = 0;\r\n this.otherRentalCharges[selectedItems].othChgBooths = \"none\";\r\n this.otherRentalCharges[selectedItems].OtherItemCharge = this.customCurrency.transform(masterChargeRecord[0].OtherItemMonthlyCharge);\r\n this.otherRentalCharges[selectedItems].OtherItemtotal = this.customCurrency.transform('0');\r\n this.otherRentalCharges[selectedItems].Reference = \"\"\r\n this.otherRentalCharges[selectedItems].Recurring = masterChargeRecord[0].Recurring\r\n }\r\n }\r\n }, (err) => {\r\n }));\r\n }\r\n\r\n this.totalOtherRentalCharge -= data.OtherItemtotal.includes('(') && data.OtherItemtotal.includes(')') ? -1 * parseFloat(data.OtherItemtotal.replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemtotal.replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= data.SalesTax.includes('(') && data.SalesTax.includes(')') ? -1 * parseFloat(data.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.SalesTax.replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= data.CityTax.includes('(') && data.CityTax.includes(')') ? -1 * parseFloat(data.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.CityTax.replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.gridOtherRental.refresh();\r\n this.getDiscounts();\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscriptions.forEach((subscription) => {\r\n if (subscription) {\r\n subscription.unsubscribe();\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n * Select Market Day(s) Here\r\n
\r\n
    \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
\r\n
\r\n
\r\n
\r\n Weekly Market(s):\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{data.RentEndPeriod}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
Other Charges
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
ItemsRecBooth#Charges\r\n QtyTotalReference\r\n
\r\n \r\n {{item.OtherItem}}\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n {{item.OtherItemtotal}}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n
{{ResaleOrBusinessHeader}}
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n","import { DatePipe } from '@angular/common';\r\nimport { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, Renderer2, ViewChild } from '@angular/core';\r\nimport { FormBuilder, FormGroup } from '@angular/forms';\r\nimport { ActivatedRoute, Params, Router } from '@angular/router';\r\nimport { GridComponent, GridLine, SortSettingsModel } from '@syncfusion/ej2-angular-grids';\r\nimport { catchError, forkJoin, of, Subscription } from 'rxjs';\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\nimport { RentalService } from 'src/app/services/Rental.service';\r\nimport { VendorService } from 'src/app/services/Vendor.service';\r\nimport { customCurrencyPipe } from 'src/app/Shared/customCurrency.pipe';\r\nimport Swal from 'sweetalert2';\r\nimport { DiscountType } from 'src/app/Shared/enum';\r\nimport { SharedDataService } from 'src/app/Shared/SharedData.service';\r\ninterface DateString {\r\n startDate: string;\r\n}\r\n@Component({\r\n selector: 'app-combinedweeklyrental-online',\r\n templateUrl: './combinedweeklyrental-online.component.html',\r\n styleUrls: ['./combinedweeklyrental-online.component.scss', '../rent-online.component.scss']\r\n})\r\nexport class CombinedweeklyrentalOnlineComponent implements OnInit, OnDestroy {\r\n rentalForm : FormGroup;\r\n marketId;\r\n vendorId;\r\n public loaderIcon: Promise;\r\n sunday = false;\r\n monday = false;\r\n tuesday = false;\r\n wednesday = false;\r\n thursay = false;\r\n friday = false;\r\n saturday = false;\r\n AllowRentingOtherItems = false;\r\n public textWrapSettings: any = { wrapMode: 'Both' }; // Enable text wrapping\r\n selectedMarketDays=[];\r\n parts=[];\r\n weeklyRentalStartDates = [];\r\n defaultPart;\r\n weeklyMarketDays = [];\r\n boothsForOtherCharge = [];\r\n selectedOtherCharges = [];\r\n excludedMarketDays=[];\r\n ResaleNumberRequired = false;\r\n OtherChargesPeriod = false;\r\n selectedWeeklyBoothData = [];\r\n DaysSellWithoutResaleNumber;\r\n BusinessLicenseNumberRequired = false;\r\n DaysSellWithoutBusiLicNumber;\r\n exemptResale = false;\r\n resaleNo = \"\";\r\n resaleNoDisplay = false;\r\n businessLicenseDisplay = false;\r\n ResaleOrBusinessHeader = \"\";\r\n businessLicenseNumber;\r\n businessLicenseExpiryDate;\r\n vendorRentalDays = [];\r\n marketDayCountForResale = 0;\r\n resaleOptionSelected = false; \r\n selectedBoothsForRental = [];\r\n tempRecordNo = 0;\r\n perDiemRentApplicable = false;\r\n vendorProducts = [];\r\n totalRentalCharge = 0.00;\r\n totalOtherRentalCharge = 0.00;\r\n totalSalesTax = 0.00;\r\n totalSecondLeveltax = 0.00\r\n totalCharge = 0.00;\r\n totalDiscountCharge;\r\n vendorDiscountPlans= [];\r\n selectedWeeklyBooths = []\r\n otherRentalCharges = [];\r\n otherItemList = [];\r\n public lines: GridLine;\r\n selectedOtherItems = []\r\n priorBalance = 0.00;\r\n ApplyBookingFee = false;\r\n ApplyBookingFeeId;\r\n bookingFeeAmount;\r\n weeklyLayoutData;\r\n selectedDates=[];\r\n displayLayout = false;\r\n layoutParts;\r\n warnExcessPayment = false;\r\n warnZeroPayment = false;\r\n RentalTaxPercentage = 0;\r\n OtherRentalTaxPercentage = 0;\r\n RentalSecondTaxPercentage = 0;\r\n OtherRentalSecondTaxPercentage = 0;\r\n DisplayPayDueDate = false;\r\n DisplaySpecificDate = false;\r\n DisplayOptionValue = 0;\r\n secondTaxName = \"\";\r\n displaySalesTax = false;\r\n displayCityTax = false;\r\n displayOtherChargeByBooth = false;\r\n displayOtherChargeSalesTax = false;\r\n displayOtherChargeCityTax = false;\r\n isdirty = false;\r\n @Input() newVendor;\r\n @Output() bookingFormCompleted = new EventEmitter(); \r\n @Output() rentalBookingData = new EventEmitter();\r\n @Output() isFormDirty = new EventEmitter(); \r\n @Output() isCancelClicked = new EventEmitter(); \r\n @Output() resaleNoInputRequired = new EventEmitter();\r\n @Output() businessLicenseRequired = new EventEmitter();\r\n @ViewChild('modalAddNewWeeklyBooths', { static: false }) modalAddNewWeeklyBooths: ElementRef;\r\n @ViewChild('modalWeeklyOtherCharges', { static: false }) modalWeeklyOtherCharges: ElementRef;\r\n @ViewChild('gridOtherRental', { static: false }) public gridOtherRental: GridComponent;\r\n @ViewChild('gridWeeklyRental', { static: false }) public gridWeeklyRental: GridComponent;\r\n @ViewChild('modalResaleNo', { static: false }) modalResaleNo: ElementRef;\r\n sortOptions: SortSettingsModel = {\r\n columns: [{ field: 'RentalStartDate', direction: 'Ascending' },{ field: 'BoothNumber', direction: 'Ascending' }]\r\n };\r\n sortOtherItemsOptions: SortSettingsModel = {\r\n columns: [{ field: 'OtherItem', direction: 'Ascending' },{ field: 'BoothNo', direction: 'Ascending' }]\r\n };\r\n private subscriptions: Subscription[] = [];\r\n constructor(private renderer: Renderer2,\r\n private formbuilder: FormBuilder,\r\n private route: ActivatedRoute,\r\n private datePipe: DatePipe,\r\n public router: Router,\r\n public rentalService: RentalService,\r\n private customCurrency: customCurrencyPipe,\r\n private sharedDataService: SharedDataService,\r\n public vendorService: VendorService,\r\n private marketInfoService: MarketInfoService){\r\n this.rentalForm = this.formbuilder.group({\r\n marketWeekSunday: [0],\r\n marketWeekMonday: [0],\r\n marketWeekTuesday: [0],\r\n marketWeekWednesday: [0],\r\n marketWeekThursday: [0],\r\n marketWeekFriday: [0],\r\n marketWeekSaturday: [0],\r\n marketParts:[''],\r\n rentalStartDate:[],\r\n rentalEndDate:[],\r\n weeklyRentalStartDates:[],\r\n otherItemsScreen: this.formbuilder.group({\r\n otherChargeMarketWeek: [''],\r\n otherItemSearchText: ['']\r\n })\r\n })\r\n }\r\n\r\n ngOnInit(): void {\r\n this.route.params.subscribe((params: Params) => {\r\n this.marketId = params['marketId'];\r\n this.vendorId = params['vendorId'];\r\n });\r\n this.generateTempRecordNumber();\r\n this.getRentalPaymentSettings();\r\n this.getVendorProducts();\r\n this.getMarketVendorSettings();\r\n this.getVendorBusinessLicenseSettings();\r\n this.getVendorBalances();\r\n this.getOtherRentalItems();\r\n this.getMarketDays();\r\n this.getParts();\r\n if (this.sharedDataService.paymentSharedData)\r\n this.loadSelectedBooths();\r\n }\r\n\r\n generateTempRecordNumber() {\r\n this.rentalService.generateTempRecordNumber(this.marketId).subscribe((response) => {\r\n if (response) {\r\n this.tempRecordNo = response;\r\n }\r\n });\r\n }\r\n\r\n getVendorProducts() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.rentalService.GetVendorProductsById(this.marketId, this.vendorId).subscribe((res: any) => {\r\n if (res) {\r\n this.vendorProducts = res.body;\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getMarketVendorSettings(){\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.vendorService.getMarketVendorSettings(this.vendorId, this.marketId).subscribe((res: any) => {\r\n var response = res.body;\r\n if (response) {\r\n this.exemptResale = response.ExemptResale;\r\n this.resaleNo = response.Resale;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getVendorBusinessLicenseSettings(){\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.vendorService.getVendorBusinessLicenseSettings(this.vendorId, this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.businessLicenseNumber = res.LicenseNumber;\r\n this.businessLicenseExpiryDate = res.ExpiryDate;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getParts() {\r\n const sub = this.marketInfoService.getParts(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.parts = res;\r\n this.getWebRentalSetting();\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getRentalPaymentSettings() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.rentalService.getRentalSettings(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.warnExcessPayment = res.WarnExcessPayment;\r\n this.warnZeroPayment = res.WarnZeroPayment;\r\n this.displayOtherChargeByBooth = res.DisplayOtherChargesByBooth;\r\n this.displayCityTax = res.RentalSecondTaxable;\r\n this.displaySalesTax = res.RentalTaxable;\r\n this.perDiemRentApplicable = res.PerDiemRentApplicable;\r\n this.gridWeeklyRental.getColumnByField(\"SalesTax\").visible = this.displaySalesTax;\r\n this.gridWeeklyRental.getColumnByField(\"CityTax\").visible = this.displayCityTax;\r\n if(this.newVendor){\r\n this.gridWeeklyRental.getColumnByField(\"Product\").visible = false;\r\n }\r\n this.gridWeeklyRental.refreshColumns();\r\n this.displayOtherChargeSalesTax = res.OtherRentalTaxable;\r\n this.displayOtherChargeCityTax = res.OtherRentalSecondTaxable; \r\n this.ResaleNumberRequired = res.ResaleNumberRequired;\r\n this.DaysSellWithoutResaleNumber = res.DaysSellWithoutResaleNumber;\r\n this.BusinessLicenseNumberRequired = res.BusinessLicenseNumberRequired;\r\n this.DaysSellWithoutBusiLicNumber = res.DaysSellWithoutBusiLicNumber;\r\n this.DisplayPayDueDate = res.DisplayPayDueDate;\r\n this.DisplaySpecificDate = res.DisplaySpecificDate;\r\n this.DisplayOptionValue = res.DisplayOptionValue;\r\n const nextDate = this.getNextDate(this.DisplayOptionValue);\r\n this.secondTaxName = res.SecondTaxName ? res.SecondTaxName: \"Sec Level Tax\"\r\n var secLevelTaxRentHeader = this.gridWeeklyRental.getColumnByField(\"CityTax\"); \r\n secLevelTaxRentHeader.headerText = this.secondTaxName; \r\n this.RentalTaxPercentage = res.RentalTaxPercentage;\r\n this.OtherRentalTaxPercentage = res.OtherRentalTaxPercentage;\r\n this.RentalSecondTaxPercentage = res.RentalSecondTaxPercentage;\r\n this.OtherRentalSecondTaxPercentage = res.OtherRentalSecondTaxPercentage;\r\n this.OtherChargesPeriod = res.OtherChargesPeriod;\r\n this.gridWeeklyRental.refresh();\r\n if (this.AllowRentingOtherItems) {\r\n this.gridOtherRental.getColumnByField(\"BoothNo\").visible = res.DisplayOtherChargesByBooth;\r\n this.gridOtherRental.getColumnByField(\"SalesTax\").visible = this.displayOtherChargeSalesTax;\r\n this.gridOtherRental.getColumnByField(\"CityTax\").visible = this.displayOtherChargeCityTax;\r\n var secLevelTaxOtherRentHeader = this.gridOtherRental.getColumnByField(\"CityTax\");\r\n secLevelTaxOtherRentHeader.headerText = this.secondTaxName;\r\n this.gridOtherRental.refreshColumns();\r\n this.gridOtherRental.refresh();\r\n }\r\n }\r\n });\r\n }\r\n\r\n getNextDate(day: number): Date {\r\n if (this.DisplaySpecificDate) {\r\n const today = new Date();\r\n let nextDate = new Date(today.getFullYear(), today.getMonth(), day);\r\n // If the nextDate is in the past or today, move to the next month\r\n if (nextDate < today) {\r\n nextDate.setMonth(nextDate.getMonth() + 1);\r\n }\r\n // Handle cases where the day is not valid in the next month (e.g., 31st in February)\r\n while (nextDate.getDate() !== day) {\r\n nextDate.setMonth(nextDate.getMonth() + 1);\r\n nextDate.setDate(day);\r\n }\r\n return nextDate;\r\n }\r\n else{\r\n const today = new Date();\r\n let nextDate = new Date(today.setDate(today.getDate() + day));\r\n return nextDate;\r\n }\r\n }\r\n\r\n getWebRentalSetting(){\r\n const sub = this.marketInfoService.getWebRentalSetting(this.marketId).subscribe((res: any) => {\r\n if (res) { \r\n this.defaultPart = res.DefaultLayoutPart; \r\n this.rentalForm.get('marketParts').setValue(this.defaultPart);\r\n this.ApplyBookingFee = res.ApplyBookingFee;\r\n this.ApplyBookingFeeId = res.ApplyBookingFeeId;\r\n this.AllowRentingOtherItems = res.AllowRentingOtherItems;\r\n if (this.ApplyBookingFee) {\r\n this.subscriptions.push(this.rentalService.getBookingFeeById(this.marketId, this.ApplyBookingFeeId).subscribe((resFee: any) => {\r\n if (resFee) {\r\n this.bookingFeeAmount = resFee.OtherItemCharge;\r\n }\r\n }));\r\n }\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n } \r\n\r\n getMarketDays() {\r\n const sub = this.marketInfoService.getMarketDays(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.sunday = res.Sunday;\r\n this.monday = res.Monday;\r\n this.tuesday = res.Tuesday;\r\n this.wednesday = res.Wednesday;\r\n this.thursay = res.Thursday;\r\n this.friday = res.Friday;\r\n this.saturday = res.Saturday;\r\n this.rentalForm.get('marketWeekSunday').setValue(this.sunday);\r\n this.rentalForm.get('marketWeekMonday').setValue(this.monday);\r\n this.rentalForm.get('marketWeekTuesday').setValue(this.tuesday);\r\n this.rentalForm.get('marketWeekWednesday').setValue(this.wednesday);\r\n this.rentalForm.get('marketWeekThursday').setValue(this.thursay);\r\n this.rentalForm.get('marketWeekFriday').setValue(this.friday);\r\n this.rentalForm.get('marketWeekSaturday').setValue(this.saturday); \r\n this.gridWeeklyRental.getColumnByField(\"Sunday\").visible = this.sunday;\r\n this.gridWeeklyRental.getColumnByField(\"Monday\").visible = this.monday;\r\n this.gridWeeklyRental.getColumnByField(\"Tuesday\").visible = this.tuesday;\r\n this.gridWeeklyRental.getColumnByField(\"Wednesday\").visible = this.wednesday;\r\n this.gridWeeklyRental.getColumnByField(\"Thursday\").visible = this.thursay;\r\n this.gridWeeklyRental.getColumnByField(\"Friday\").visible = this.friday;\r\n this.gridWeeklyRental.getColumnByField(\"Saturday\").visible = this.saturday; \r\n this.getWeeklyMarkets();\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getWeeklyMarkets() {\r\n this.marketInfoService.getWeeklyMarketDays(this.marketId).subscribe((response) => {\r\n if (response) {\r\n this.weeklyMarketDays = response;\r\n this.rentalForm.patchValue({\r\n rentalStartDate: response[0].RentalStartDays,\r\n rentalEndDate: response[0].RentalEndDays,\r\n });\r\n this.rentalForm.controls['otherItemsScreen'].patchValue({\r\n otherChargeMarketWeek: response[0].RentalStartDays\r\n });\r\n this.selectedWeeklyMarketDays();\r\n }\r\n }, (err) => {\r\n });\r\n }\r\n\r\n checkSelectedDates() {\r\n const rentalStartDate = new Date(this.rentalForm.value['rentalStartDate'].split('-')[0]);\r\n const rentalEndDate = new Date(this.rentalForm.value['rentalEndDate'].split('-')[0]);\r\n if (rentalEndDate < rentalStartDate) {\r\n this.rentalForm.get('rentalEndDate').setValue(this.rentalForm.value['rentalStartDate']);\r\n }\r\n this.selectedWeeklyMarketDays();\r\n }\r\n\r\n loadSelectedBooths() { \r\n var newItem =[];\r\n if (this.sharedDataService.paymentSharedData.ReturnData.length > 0) {\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n this.sharedDataService.paymentSharedData.ReturnData.forEach((item) => {\r\n var newbooths=[];\r\n var ob = {\r\n BoothNumber: item.BoothNumber,\r\n BoothType: item.BoothType,\r\n BoothTypeId: item.BoothTypeId,\r\n BoothDescription: item.BoothDescription,\r\n Product:item.Product,\r\n RentStartPeriod:item.RentStartPeriod,\r\n RentEndPeriod: item.RentEndPeriod,\r\n RentalSavedEndDate: item.RentalSavedEndDate,\r\n RentalStartDate: item.RentalStartDate,\r\n RentalEndDate: item.RentalEndDate,\r\n MktDays: item.MktDays,\r\n Rent: item.Rent,\r\n SalesTax: item.SalesTax,\r\n CityTax: item.CityTax,\r\n PerDiem: item.PerDiem,\r\n PerDiemRent: item.PerdiemRent,\r\n Sunday: item.Sunday,\r\n Monday: item.Monday,\r\n Tuesday: item.Tuesday,\r\n Wednesday: item.Wednesday,\r\n Thursday: item.Thursday,\r\n Friday: item.Friday,\r\n Saturday: item.Saturday,\r\n Reservation: item.Reservation,\r\n Drop: item.Drop,\r\n January: item.January,\r\n February: item.February,\r\n March: item.March,\r\n April: item.April,\r\n May: item.May,\r\n June: item.June,\r\n July: item.July,\r\n August: item.August,\r\n September: item.September,\r\n October: item.October,\r\n November: item.November,\r\n December: item.December,\r\n JanuaryMonthPresent: item.JanuaryMonthPresent,\r\n FebruaryMonthPresent: item.FebruaryMonthPresent,\r\n MarchMonthPresent: item.MarchMonthPresent,\r\n AprilMonthPresent: item.AprilMonthPresent,\r\n MayMonthPresent: item.MayMonthPresent,\r\n JuneMonthPresent: item.JuneMonthPresent,\r\n JulyMonthPresent: item.JulyMonthPresent,\r\n AugustMonthPresent: item.AugustMonthPresent,\r\n SeptemberMonthPresent: item.SeptemberMonthPresent,\r\n OctoberMonthPresent: item.OctoberMonthPresent,\r\n NovemberMonthPresent: item.NovemberMonthPresent,\r\n DecemberMonthPresent: item.DecemberMonthPresent,\r\n NewBooth: true,\r\n Status: \"N\", \r\n StartDateList:item.StartDateList,\r\n DisableStartDate: false,\r\n TaxModel: item.TaxModel\r\n }\r\n newbooths.push(JSON.parse(JSON.stringify(ob)));\r\n this.selectedWeeklyBooths = this.selectedWeeklyBooths.concat(newbooths); \r\n });\r\n }\r\n if (this.sharedDataService.paymentSharedData.WeeklyRentalOtherCharges.length > 0) {\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n this.sharedDataService.paymentSharedData.WeeklyRentalOtherCharges.forEach((el) => {\r\n if(el.WeekOtherRentalId == 0)\r\n {\r\n newItem=[];\r\n var ob = {\r\n Id: el.OtherItemId,\r\n WeekOtherRentalId:el.WeekOtherRentalId,\r\n OtherItem: el.OtherItemName,\r\n OtherItemCharge: this.customCurrency.transform(el.OtherCharge),\r\n Quantity: el.Quantity,\r\n OtherItemtotal: this.customCurrency.transform(el.OtherItemCharge),\r\n RentalWeek: el.RentalWeek + \"-\" + this.datePipe.transform(new Date(el.RentalWeek).setDate(new Date(el.RentalWeek).getDate() + 6), 'MMM d, y'),\r\n SalesTax: this.customCurrency.transform(el.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(el.SecLevelTax.toString()),\r\n BoothNo: el.BoothNumber,\r\n Reference: el.Reference,\r\n NewItem: true\r\n }\r\n newItem.push(JSON.parse(JSON.stringify(ob)));\r\n }\r\n\r\n if (newItem.length > 0) {\r\n this.selectedOtherItems = this.selectedOtherItems.concat(newItem);\r\n }\r\n });\r\n }\r\n\r\n this.totalRentalCharge = parseFloat(this.sharedDataService.paymentSharedData.RentalCharge);\r\n this.totalOtherRentalCharge = parseFloat(this.sharedDataService.paymentSharedData.OtherCharge.toString());\r\n this.totalSalesTax = parseFloat(this.sharedDataService.paymentSharedData.SalesTax.toString());\r\n this.totalSecondLeveltax = parseFloat(this.sharedDataService.paymentSharedData.SecLevelTax.toString());\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.sharedDataService.paymentSharedData = \"\";\r\n this.getDiscounts();\r\n }\r\n\r\n disableSavePayment() {\r\n var vendorBalance = this.priorBalance + this.totalCharge;\r\n if ((vendorBalance > 0) || (this.priorBalance < 0 && vendorBalance <= 0)){\r\n return false\r\n }\r\n else\r\n return true\r\n }\r\n\r\n selectedWeeklyMarketDays(){\r\n this.selectedMarketDays = [];\r\n this.rentalForm.value['marketWeekSunday'] == true ? this.selectedMarketDays.push(1) : 0;\r\n this.rentalForm.value['marketWeekMonday'] == true ? this.selectedMarketDays.push(2) : 0;\r\n this.rentalForm.value['marketWeekTuesday'] == true ? this.selectedMarketDays.push(3) : 0;\r\n this.rentalForm.value['marketWeekWednesday'] == true ? this.selectedMarketDays.push(4) : 0;\r\n this.rentalForm.value['marketWeekThursday'] == true ? this.selectedMarketDays.push(5) : 0;\r\n this.rentalForm.value['marketWeekFriday'] == true ? this.selectedMarketDays.push(6) : 0;\r\n this.rentalForm.value['marketWeekSaturday'] == true ? this.selectedMarketDays.push(7) : 0;\r\n\r\n const rentalStartDate = new Date(this.rentalForm.value['rentalStartDate'].split('-')[0]);\r\n const rentalEndDate = new Date(this.rentalForm.value['rentalEndDate'].split('-')[0]);\r\n if (rentalEndDate < rentalStartDate) {\r\n this.rentalForm.get('rentalEndDate').setValue(this.rentalForm.value['rentalStartDate']);\r\n }\r\n const today: Date = new Date(new Date().toDateString())\r\n this.weeklyRentalStartDates = [];\r\n this.selectedMarketDays.map((el, i) => {\r\n const startDate = new Date(this.rentalForm.value['rentalStartDate'].split(\"-\")[0]);\r\n const endDate = new Date(this.rentalForm.value['rentalEndDate'].split(\"-\")[1]);\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay >= today) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n this.weeklyRentalStartDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = this.weeklyRentalStartDates.sort(compareDates);\r\n\r\n if (this.weeklyRentalStartDates.length)\r\n this.rentalForm.get('weeklyRentalStartDates').setValue(this.weeklyRentalStartDates[0].startDate); \r\n }); \r\n }\r\n\r\n getMonthIndex(monthString: string): number {\r\n const months = [\r\n 'January', 'February', 'March', 'April', 'May', 'June',\r\n 'July', 'August', 'September', 'October', 'November', 'December'\r\n ];\r\n const monthIndex = months.findIndex(month => month.toLowerCase() === monthString.toLowerCase());\r\n return monthIndex !== -1 ? monthIndex : 0;\r\n }\r\n\r\n toggleDaySelection(day: string, event: any) {\r\n this.selectedMarketDays.map((el, i) => {\r\n switch (el) {\r\n case 1: this.rentalForm.get('marketWeekSunday').setValue(true);\r\n break;\r\n case 2: this.rentalForm.get('marketWeekMonday').setValue(true);\r\n break;\r\n case 3: this.rentalForm.get('marketWeekTuesday').setValue(true);\r\n break;\r\n case 4: this.rentalForm.get('marketWeekWednesday').setValue(true);\r\n break;\r\n case 5: this.rentalForm.get('marketWeekThursday').setValue(true);\r\n break;\r\n case 6: this.rentalForm.get('marketWeekFriday').setValue(true);\r\n break;\r\n case 7: this.rentalForm.get('marketWeekSaturday').setValue(true);\r\n break;\r\n }\r\n });\r\n }\r\n\r\n refreshAddBooth() { \r\n this.getMarketDays();\r\n this.selectedWeeklyBoothData = [];\r\n if (this.selectedBoothsForRental.length > 0) {\r\n this.selectedBoothsForRental.forEach(ele => {\r\n const temp = {\r\n TempRecordNo: this.tempRecordNo.toString(),\r\n BoothNumber: ele.BoothNumber,\r\n StartDate: new Date(ele.StartDate),\r\n RentalType: 5,\r\n EndDate: new Date(ele.EndDate),\r\n Sunday: this.rentalForm.value['marketWeekSunday'] ?? false,\r\n Monday: this.rentalForm.value['marketWeekMonday'] ?? false,\r\n Tuesday: this.rentalForm.value['marketWeekTuesday'] ?? false,\r\n Wednesday: this.rentalForm.value['marketWeekWednesday'] ?? false,\r\n Thursday: this.rentalForm.value['marketWeekThursday'] ?? false,\r\n Friday: this.rentalForm.value['marketWeekFriday'] ?? false,\r\n Saturday: this.rentalForm.value['marketWeekSaturday'] ?? false\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n });\r\n }\r\n this.selectedBoothsForRental = [];\r\n this.rentalForm.reset();\r\n this.rentalForm.patchValue({\r\n rentalStartDate: this.weeklyMarketDays[0].RentalStartDays,\r\n rentalEndDate: this.weeklyMarketDays[0].RentalEndDays,\r\n marketParts: this.defaultPart\r\n })\r\n }\r\n\r\n getDateFromDateTime(date){\r\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\r\n }\r\n\r\n AddBoothsOnGridOnValidationSucess() {\r\n var addToGrid = false;\r\n var closeModalPopup = false;\r\n const modal = this.modalResaleNo.nativeElement;\r\n if (this.resaleNoDisplay) {\r\n if (!this.resaleNo || this.resaleNo.trim() === '') {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Enter the resale number`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n addToGrid = true;\r\n closeModalPopup = true;\r\n this.resaleOptionSelected = true;\r\n }\r\n\r\n if (closeModalPopup) {\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'none';\r\n modal.classList.remove('show');\r\n }\r\n }\r\n\r\n if (addToGrid) {\r\n const obj = {\r\n VendorID: this.vendorId,\r\n ExemptResaleNo: false,\r\n ExemptResaleReason: \"\",\r\n ResaleNo: this.resaleNo,\r\n MarketId: this.marketId\r\n }\r\n\r\n this.subscriptions.push(this.rentalService.UpdateVendorResaleInfo(obj).subscribe((res: any) => {\r\n }));\r\n }\r\n }\r\n else{\r\n addToGrid = true;\r\n }\r\n\r\n if (addToGrid) {\r\n if (this.BusinessLicenseNumberRequired && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n var addToGrid = false;\r\n var closeModalPopup = false;\r\n if ((!this.businessLicenseNumber || this.businessLicenseNumber.trim() === '') || !this.businessLicenseExpiryDate) {\r\n this.ResaleOrBusinessHeader = \"Business License Number\"\r\n const modal = this.modalResaleNo.nativeElement;\r\n this.resaleNoDisplay = false; \r\n this.businessLicenseDisplay = true;\r\n modal.classList.add('show');\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'block';\r\n this.ResaleOrBusinessHeader = \"Business License Number\" \r\n }\r\n }\r\n else if (this.getDateFromDateTime(new Date(this.businessLicenseExpiryDate)) < this.getDateFromDateTime(new Date())) {\r\n this.closeResaleModal();\r\n Swal.fire({\r\n text: $localize`Business License is expired! Please contact the market.`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n addToGrid = true;\r\n this.closeResaleModal();\r\n if (this.businessLicenseDisplay) {\r\n const obj = {\r\n VendorID: this.vendorId,\r\n LicenseNameId: 1,\r\n LicenseName: \"\",\r\n ExpiryDate: new Date(this.businessLicenseExpiryDate),\r\n LicenseNumber: this.businessLicenseNumber\r\n }\r\n \r\n this.subscriptions.push(this.rentalService.updateVendorBusinessLicense(this.marketId, obj).subscribe((res: any) => {\r\n }));\r\n }\r\n this.addSelectedBoothsToGrid();\r\n } \r\n }\r\n else {\r\n addToGrid = true;\r\n closeModalPopup = true;\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n }\r\n\r\n addSelectedBoothsToGrid() {\r\n this.selectedBoothsForRental = [];\r\n if (this.selectedWeeklyBoothData) {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedWeeklyBoothData.map((el, i) => { \r\n var obj = {\r\n BoothTypeId: el.BoothTypeId,\r\n VendorId: this.vendorId,\r\n RentalStartPeriod: new Date(this.rentalForm.value['rentalStartDate'].split('-')[0]),\r\n RentalEndPeriod: new Date(this.rentalForm.value['rentalEndDate'].split('-')[1]),\r\n PerDiemApplicable: this.perDiemRentApplicable? true: false,\r\n WRNewVendorRequest: this.newVendor\r\n }\r\n this.rentalService.getBoothRentalCombinedWeeklyCharges(this.marketId,obj).subscribe((res: any) => {\r\n var newbooths = [];\r\n var vendorProducts = !this.newVendor ? this.vendorProducts.filter(x => x.Priority) ? this.vendorProducts.filter(x => x.Priority)[0].ProductId : this.vendorProducts[0].ProductId:\"\";\r\n const ob = {\r\n WeeklyRentalId: 0,\r\n BoothNumber: el.BoothNumber,\r\n BoothType: el.BoothType,\r\n BoothTypeId: el.BoothTypeId,\r\n BoothDescription: el.BoothDescription,\r\n Product: vendorProducts,\r\n RentStartPeriod: this.rentalForm.value['rentalStartDate'],\r\n RentEndPeriod: this.rentalForm.value['rentalEndDate'],\r\n RentalSavedEndDate: el.RentalEndDate,\r\n RentalStartDate: this.rentalForm.value['weeklyRentalStartDates'],\r\n RentalEndDate: el.RentalEndDate,\r\n MktDays: el.NoOfMarketDays,\r\n Rent: this.customCurrency.transform(res.Rent),\r\n SalesTax: this.customCurrency.transform(res.SalesTax),\r\n CityTax: this.customCurrency.transform(res.CityTax),\r\n PerDiem: this.perDiemRentApplicable? true: false,\r\n PerDiemRent:this.customCurrency.transform(res.PerdiemRent),\r\n Sunday: el.Sunday,\r\n Monday: el.Monday,\r\n Tuesday: el.Tuesday,\r\n Wednesday: el.Wednesday,\r\n Thursday: el.Thursday,\r\n Friday: el.Friday,\r\n Saturday: el.Saturday,\r\n Reservation: true,\r\n Drop: false,\r\n January: this.customCurrency.transform(res.JanRent),\r\n February: this.customCurrency.transform(res.FebRent),\r\n March: this.customCurrency.transform(res.MarRent),\r\n April: this.customCurrency.transform(res.AprRent),\r\n May: this.customCurrency.transform(res.MayRent),\r\n June: this.customCurrency.transform(res.JunRent),\r\n July: this.customCurrency.transform(res.JulRent),\r\n August: this.customCurrency.transform(res.AugRent),\r\n September: this.customCurrency.transform(res.SepRent),\r\n October: this.customCurrency.transform(res.OctRent),\r\n November: this.customCurrency.transform(res.NovRent),\r\n December: this.customCurrency.transform(res.DecRent),\r\n JanuaryMonthPresent: res.JanuaryMonthPresent,\r\n FebruaryMonthPresent: res.FebruaryMonthPresent,\r\n MarchMonthPresent: res.MarchMonthPresent,\r\n AprilMonthPresent: res.AprilMonthPresent,\r\n MayMonthPresent: res.MayMonthPresent,\r\n JuneMonthPresent: res.JuneMonthPresent,\r\n JulyMonthPresent: res.JulyMonthPresent,\r\n AugustMonthPresent: res.AugustMonthPresent,\r\n SeptemberMonthPresent: res.SeptemberMonthPresent,\r\n OctoberMonthPresent: res.OctoberMonthPresent,\r\n NovemberMonthPresent: res.NovemberMonthPresent,\r\n DecemberMonthPresent: res.DecemberMonthPresent,\r\n NewBooth: true,\r\n Status: \"N\", \r\n StartDateList:el.StartDateList,\r\n DisableStartDate: false, \r\n ExtendRental: false,\r\n TaxModel: res.TaxModel\r\n }\r\n this.totalRentalCharge += res.Rent.toString().includes('(') && res.Rent.toString().includes(')') ? -1 * parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax; \r\n this.getDiscounts();\r\n this.getMarketDays();\r\n this.gridWeeklyRental.refresh();\r\n newbooths.push(JSON.parse(JSON.stringify(ob)));\r\n this.selectedWeeklyBooths = this.selectedWeeklyBooths.concat(newbooths); \r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n });\r\n\r\n this.loaderIcon = Promise.resolve(false);\r\n //this.refreshAddBooth();\r\n }\r\n }\r\n\r\n getVendorBalances() {\r\n this.vendorDiscountPlans =[];\r\n forkJoin({\r\n vendorBalanceRes: this.rentalService.getVendorBalances(this.vendorId, this.marketId),\r\n discountPlansRes: this.vendorService.GetDiscountPlan(this.vendorId,this.marketId)\r\n }).subscribe(\r\n ({ vendorBalanceRes, discountPlansRes }: any) => {\r\n if (vendorBalanceRes) {\r\n this.priorBalance = vendorBalanceRes.PriorBalance;\r\n }\r\n if(discountPlansRes){\r\n if (discountPlansRes) {\r\n for (const el of discountPlansRes) {\r\n if (el.CombinedWeekly && el.OnlineTransactions) {\r\n const ob = {\r\n PlanSeqId: el.PlanSeqId,\r\n PlanId: el.PlanId,\r\n PlanName: el.PlanName,\r\n EffectiveFrom: this.datePipe.transform(el.EffectiveFrom, 'MM/dd/yyyy'),\r\n ExpiryDate: this.datePipe.transform(el.ExpiryDate, 'MM/dd/yyyy'),\r\n DiscountType: el.DiscountType == 0 ? DiscountType.Percentage : DiscountType.FixedAmount,\r\n DiscountValue: el.DiscountValue,\r\n OtherItems: el.OtherItems,\r\n Daily: el.Daily,\r\n Weekly: el.Weekly,\r\n Monthly: el.Monthly,\r\n CombinedWeekly: el.CombinedWeekly,\r\n CombinedMonthly: el.CombinedMonthly,\r\n IsExceedAmount: el.IsExceedAmount,\r\n ExceedAmount: el.ExceedAmount,\r\n BalanceDue: el.BalanceDue,\r\n Notes: el.Notes,\r\n QDR: el.QDR,\r\n CheckAll: el.Selected,\r\n AutoSelected: el.Selected,\r\n DisableDiscount: el.Selected,\r\n AppliedDiscount: this.customCurrency.transform(\"0.00\"),\r\n SalesTaxAmount: this.customCurrency.transform(\"0.00\"),\r\n SecondLevelTaxAmount: this.customCurrency.transform(\"0.00\"),\r\n SalesTaxApplied: el.SalesTax,\r\n SecondLevelTaxApplied: el.SecondLevelTax,\r\n }\r\n this.vendorDiscountPlans.push(ob);\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n // this.disableDiscountAmount = this.vendorDiscountPlans.length > 0 ? false : true;\r\n }\r\n this.getDiscounts();\r\n }\r\n })\r\n }\r\n\r\n getDiscounts() {\r\n var totalRentalCharge = this.totalRentalCharge;\r\n var totalSalesTax = this.totalSalesTax;\r\n var totalSecondLeveltax = this.totalSecondLeveltax;\r\n var totalOtherRentalCharge = this.totalOtherRentalCharge;\r\n var priorBalance = 0;\r\n var totalChargeWithDue = this.priorBalance + (totalRentalCharge)\r\n + (totalSalesTax)\r\n + (totalSecondLeveltax)\r\n + (totalOtherRentalCharge)\r\n\r\n var totalCharge = (totalRentalCharge) + (totalSalesTax) + (totalSecondLeveltax) + (totalOtherRentalCharge)\r\n // totalCharge = totalCharge.toString().includes('(') && totalCharge.toString().includes(')') ? -1 * parseFloat(totalCharge.toString().replace(/[^0-9.-]/g, '')) : parseFloat(totalCharge.toString().replace(/[^0-9.-]/g, ''));\r\n\r\n if (this.vendorDiscountPlans.length > 0 && totalCharge > 0) {\r\n var discountTotalAmount = 0;\r\n var totalAmountForDiscount = 0;\r\n for (const disc of this.vendorDiscountPlans) {\r\n disc.CheckAll = disc.AutoSelected;\r\n if (disc.CheckAll && disc.CombinedWeekly) {\r\n var currentDiscountValue = 0;\r\n if (!disc.BalanceDue || (disc.BalanceDue && priorBalance <= 0)) {\r\n if (!disc.IsExceedAmount || (disc.IsExceedAmount && totalCharge > disc.ExceedAmount)) {\r\n const discountValue = disc.DiscountValue;\r\n totalAmountForDiscount = totalRentalCharge\r\n if (disc.OtherItems) {\r\n totalAmountForDiscount += totalOtherRentalCharge\r\n }\r\n if (disc.DiscountType == 'Percentage') {\r\n discountTotalAmount += totalAmountForDiscount * (discountValue / 100);\r\n currentDiscountValue = totalAmountForDiscount * (discountValue / 100);\r\n }\r\n else {\r\n discountTotalAmount += discountValue;\r\n currentDiscountValue = discountValue;\r\n }\r\n }\r\n else {\r\n disc.CheckAll = false;\r\n }\r\n }\r\n else {\r\n disc.CheckAll = false;\r\n }\r\n disc.AppliedDiscount = this.customCurrency.transform(currentDiscountValue.toString());\r\n }\r\n else {\r\n disc.AppliedDiscount = this.customCurrency.transform(\"0\");\r\n }\r\n\r\n this.totalDiscountCharge = parseFloat(discountTotalAmount.toFixed(2)).toString()\r\n }\r\n }\r\n }\r\n\r\n created(args) {\r\n if(this.newVendor){\r\n this.gridWeeklyRental.getColumnByField(\"Product\").visible = false;\r\n }\r\n }\r\n\r\n rentOnlineNextTab(){\r\n this.saveRentalWithPayment();\r\n this.bookingFormCompleted.emit(true);\r\n }\r\n\r\n saveRentalWithPayment(){\r\n this.isdirty = false;\r\n this.isFormDirty.emit(false);\r\n var obj = {\r\n VendorId: this.vendorId,\r\n RentalType:5,\r\n PriorBalance: this.priorBalance,\r\n RentalCharge: this.totalRentalCharge,\r\n SalesTax: this.totalSalesTax,\r\n SecLevelTax: this.totalSecondLeveltax,\r\n OtherCharge: this.totalOtherRentalCharge,\r\n RentalNotes: \"\",\r\n PaymentDone: false,\r\n ExemptResaleNo:false,\r\n ExemptResaleReason: \"\",\r\n ResaleNo: this.resaleNo,\r\n PaymentDueDate: null,\r\n AppliedDiscountModel: [],\r\n ReturnData: [],\r\n ReceiptSettings: \"\",\r\n PaymentOnly: false,\r\n CombinedWeeklyRentalBooth: [],\r\n WeeklyRentalOtherCharges: [],\r\n DiscountAmount: this.totalDiscountCharge ?? 0,\r\n BookingFee: this.bookingFeeAmount ?? 0\r\n }\r\n\r\n var objSelectedBooth = [];\r\n var objReturnData = [];\r\n if (this.selectedWeeklyBooths.length > 0) {\r\n this.selectedWeeklyBooths.forEach((item,i) => {\r\n objSelectedBooth.push({\r\n WeeklyRentalId: item.WeeklyRentalId,\r\n BoothNumber: item.BoothNumber,\r\n BoothTypeId: item.BoothTypeId,\r\n ProductId: item.Product,\r\n BoothType: item.BoothType,\r\n RentalWeeekStartDate: new Date(item.RentStartPeriod.split('-')[0]),\r\n RentalWeeekEndDate: new Date(item.RentEndPeriod.split('-')[1]),\r\n RentalStartDate: new Date(item.RentalStartDate),\r\n RentalEndDate: new Date(item.RentalEndDate),\r\n SelectedRentalDates: \"\",\r\n BoothReserved: item.Reservation,\r\n DoNotRenew: item.Drop,\r\n PerDiem: item.PerDiem,\r\n PerdiemRent: item.PerDiemRent.includes('(') && item.PerDiemRent.includes(')') ? -1 * parseFloat(item.PerDiemRent.replace(/[^0-9.-]/g, '')) : parseFloat(item.PerDiemRent.replace(/[^0-9.-]/g, '')),\r\n Monday: item.Monday,\r\n Tuesday: item.Tuesday,\r\n Wednesday: item.Wednesday,\r\n Thursday: item.Thursday,\r\n Friday: item.Friday,\r\n Saturday: item.Saturday,\r\n Sunday: item.Sunday,\r\n RentalCharge: item.Rent.includes('(') && item.Rent.includes(')') ? -1 * parseFloat(item.Rent.replace(/[^0-9.-]/g, '')) : parseFloat(item.Rent.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n JanRent: item.January ?(item.January.includes('(') && item.January.includes(')') ? -1 * parseFloat(item.January.replace(/[^0-9.-]/g, '')) : parseFloat(item.January.replace(/[^0-9.-]/g, ''))): 0,\r\n FebRent: item.February?(item.February.includes('(') && item.February.includes(')') ? -1 * parseFloat(item.February.replace(/[^0-9.-]/g, '')) : parseFloat(item.February.replace(/[^0-9.-]/g, ''))): 0,\r\n MarRent: item.March?(item.March.includes('(') && item.March.includes(')') ? -1 * parseFloat(item.March.replace(/[^0-9.-]/g, '')) : parseFloat(item.March.replace(/[^0-9.-]/g, ''))): 0,\r\n AprRent: item.April? (item.April.includes('(') && item.April.includes(')') ? -1 * parseFloat(item.April.replace(/[^0-9.-]/g, '')) : parseFloat(item.April.replace(/[^0-9.-]/g, ''))): 0,\r\n MayRent: item.May? (item.May.includes('(') && item.May.includes(')') ? -1 * parseFloat(item.May.replace(/[^0-9.-]/g, '')) : parseFloat(item.May.replace(/[^0-9.-]/g, ''))): 0,\r\n JunRent: item.June? (item.June.includes('(') && item.June.includes(')') ? -1 * parseFloat(item.June.replace(/[^0-9.-]/g, '')) : parseFloat(item.June.replace(/[^0-9.-]/g, ''))): 0,\r\n JulRent: item.July? (item.July.includes('(') && item.July.includes(')') ? -1 * parseFloat(item.July.replace(/[^0-9.-]/g, '')) : parseFloat(item.July.replace(/[^0-9.-]/g, ''))): 0,\r\n AugRent: item.August? (item.August.includes('(') && item.August.includes(')') ? -1 * parseFloat(item.August.replace(/[^0-9.-]/g, '')) : parseFloat(item.August.replace(/[^0-9.-]/g, ''))): 0,\r\n SepRent: item.September? (item.September.includes('(') && item.September.includes(')') ? -1 * parseFloat(item.September.replace(/[^0-9.-]/g, '')) : parseFloat(item.September.replace(/[^0-9.-]/g, ''))): 0,\r\n OctRent: item.October? (item.October.includes('(') && item.October.includes(')') ? -1 * parseFloat(item.October.replace(/[^0-9.-]/g, '')) : parseFloat(item.October.replace(/[^0-9.-]/g, ''))): 0,\r\n NovRent: item.November? (item.November.includes('(') && item.November.includes(')') ? -1 * parseFloat(item.November.replace(/[^0-9.-]/g, '')) : parseFloat(item.November.replace(/[^0-9.-]/g, ''))): 0,\r\n DecRent: item.December? (item.December.includes('(') && item.December.includes(')') ? -1 * parseFloat(item.December.replace(/[^0-9.-]/g, '')) : parseFloat(item.December.replace(/[^0-9.-]/g, ''))): 0,\r\n BookingLog: i+1,\r\n TaxModel: item.TaxModel\r\n })\r\n\r\n if (item.NewBooth) {\r\n objReturnData.push({\r\n WeeklyRentalId: 0,\r\n BoothNumber: item.BoothNumber,\r\n BoothType: item.BoothType,\r\n BoothTypeId: item.BoothTypeId,\r\n BoothDescription: item.BoothDescription,\r\n Product: item.Product,\r\n RentStartPeriod: item.RentStartPeriod,\r\n RentEndPeriod: item.RentEndPeriod,\r\n RentalSavedEndDate: item.RentalEndDate,\r\n RentalStartDate: item.RentalStartDate,\r\n RentalEndDate: item.RentalEndDate,\r\n MktDays: item.MktDays,\r\n Rent: item.Rent,\r\n SalesTax: item.SalesTax,\r\n CityTax: item.CityTax,\r\n PerDiem: item.PerDiem,\r\n PerdiemRent: item.PerDiemRent,\r\n Sunday: item.Sunday,\r\n Monday: item.Monday,\r\n Tuesday: item.Tuesday,\r\n Wednesday: item.Wednesday,\r\n Thursday: item.Thursday,\r\n Friday: item.Friday,\r\n Saturday: item.Saturday,\r\n Reservation: item.Reservation,\r\n Drop: item.Drop,\r\n January: item.January,\r\n February: item.February,\r\n March: item.March,\r\n April: item.April,\r\n May: item.May,\r\n June: item.June,\r\n July: item.July,\r\n August: item.August,\r\n September: item.September,\r\n October: item.October,\r\n November: item.November,\r\n December: item.December,\r\n JanuaryMonthPresent: item.January ? true : false,\r\n FebruaryMonthPresent: item.February ? true : false,\r\n MarchMonthPresent: item.March ? true : false,\r\n AprilMonthPresent: item.April ? true : false,\r\n MayMonthPresent: item.May ? true : false,\r\n JuneMonthPresent: item.June ? true : false,\r\n JulyMonthPresent: item.July ? true : false,\r\n AugustMonthPresent: item.August ? true : false,\r\n SeptemberMonthPresent: item.September ? true : false,\r\n OctoberMonthPresent: item.October ? true : false,\r\n NovemberMonthPresent: item.November ? true : false,\r\n DecemberMonthPresent: item.December ? true : false,\r\n NewBooth: true,\r\n Status: \"N\",\r\n StartDateList: item.StartDateList,\r\n DisableStartDate: false,\r\n TaxModel: item.TaxModel\r\n });\r\n }\r\n });\r\n }\r\n\r\n if (objSelectedBooth.length > 0)\r\n obj.CombinedWeeklyRentalBooth = objSelectedBooth;\r\n\r\n var objSelectedOtherCharge = [];\r\n if (this.selectedOtherItems.length > 0) {\r\n this.selectedOtherItems.forEach((item) => {\r\n objSelectedOtherCharge.push({\r\n OtherItemId: item.Id,\r\n WeekOtherRentalId: item.WeekOtherRentalId,\r\n Quantity: item.Quantity,\r\n OtherItemName: item.OtherItem,\r\n OtherItemCharge: item.OtherItemtotal.includes('(') && item.OtherItemtotal.includes(')') ? -1 * parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')),\r\n RentalWeek: item.RentalWeek.split('-')[0],\r\n BoothNumber: item.BoothNo,\r\n Recurring: item.Recurring,\r\n OtherCharge: item.OtherItemCharge.includes('(') && item.OtherItemCharge.includes(')') ? -1 * parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n Reference: item.Reference,\r\n WeeklyOtherRentalIds: item.WeeklyOtherRentalIds\r\n })\r\n });\r\n }\r\n if (objSelectedOtherCharge.length > 0)\r\n obj.WeeklyRentalOtherCharges = objSelectedOtherCharge;\r\n \r\n if(objReturnData.length > 0){\r\n obj.ReturnData = objReturnData;\r\n }\r\n\r\n var objDiscountData = [];\r\n if(this.vendorDiscountPlans.length > 0 && this.totalDiscountCharge > 0){\r\n this.vendorDiscountPlans.forEach((item) => {\r\n if(item.CheckAll){\r\n objDiscountData.push({\r\n PlanId: item.PlanSeqId,\r\n DiscountAmount:item.AppliedDiscount.includes('(') && item.AppliedDiscount.includes(')') ? -1 * parseFloat(item.AppliedDiscount.replace(/[^0-9.-]/g, '')) : parseFloat(item.AppliedDiscount.replace(/[^0-9.-]/g, '')),\r\n OtherCharges: item.OtherItems,\r\n SalesTax: item.SalesTaxApplied,\r\n SecondLevelTax: item.SecondLevelTaxApplied,\r\n DiscountType:item.DiscountType== DiscountType.Percentage ? \"0\" : \"1\",\r\n DiscountValue : item.DiscountValue,\r\n SalesTaxAmount:item.SalesTaxAmount.includes('(') && item.SalesTaxAmount.includes(')') ? -1 * parseFloat(item.SalesTaxAmount.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTaxAmount.replace(/[^0-9.-]/g, '')),\r\n SecondLevelTaxAmount:item.SecondLevelTaxAmount.includes('(') && item.SecondLevelTaxAmount.includes(')') ? -1 * parseFloat(item.SecondLevelTaxAmount.replace(/[^0-9.-]/g, '')) : parseFloat(item.SecondLevelTaxAmount.replace(/[^0-9.-]/g, ''))\r\n })\r\n }\r\n });\r\n }\r\n if (objDiscountData.length > 0)\r\n obj.AppliedDiscountModel = objDiscountData;\r\n this.sharedDataService.wifiSelectedDay = this.weeklyMarketDays[0].RentalStartDays;\r\n if (!this.newVendor) {\r\n this.sharedDataService.paymentSharedData = obj;\r\n var url = 'vendor-payments/' + this.marketId;\r\n this.router.navigate([url]);\r\n }\r\n else {\r\n this.rentalBookingData.emit(obj);\r\n }\r\n var temp ={\r\n TempRecordNo: this.tempRecordNo.toString(),\r\n BoothNumber:\"\"\r\n }\r\n this.subscriptions.push(this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n }));\r\n }\r\n\r\n otherItemUpdate(selectedItems) {\r\n if (selectedItems.isOtherItemChecked) {\r\n const index = this.selectedOtherCharges.findIndex(item => item.Id === selectedItems.Id && item.RentalWeek == this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek']);\r\n const isNegative = selectedItems.OtherItemCharge.includes('(') && selectedItems.OtherItemCharge.includes(')');\r\n const totalValue = parseFloat(selectedItems.OtherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n selectedItems.OtherItemCharge = this.customCurrency.transform(finalCharge.toString())\r\n selectedItems.OtherItemtotal = this.customCurrency.transform((finalCharge * selectedItems.Quantity).toString())\r\n if (index !== -1) {\r\n var obj = {\r\n Id: selectedItems.Id,\r\n OtherItem: selectedItems.OtherItem,\r\n OtherItemCharge: selectedItems.OtherItemCharge,\r\n Quantity: selectedItems.Quantity,\r\n OtherItemtotal: selectedItems.OtherItemtotal,\r\n othChgBooths: selectedItems.othChgBooths,\r\n Recurring: selectedItems.Recurring,\r\n RentalWeek: this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek'],\r\n Reference: selectedItems.Reference\r\n };\r\n this.selectedOtherCharges[index] = obj;\r\n }\r\n else {\r\n var objNew = {\r\n Id: selectedItems.Id,\r\n OtherItem: selectedItems.OtherItem,\r\n OtherItemCharge: selectedItems.OtherItemCharge,\r\n Quantity: selectedItems.Quantity,\r\n OtherItemtotal: selectedItems.OtherItemtotal,\r\n othChgBooths: selectedItems.othChgBooths,\r\n Recurring: selectedItems.Recurring,\r\n RentalWeek: this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek'],\r\n Reference: selectedItems.Reference\r\n };\r\n this.selectedOtherCharges.push(objNew);\r\n }\r\n }\r\n }\r\n\r\n getOtherRentalItems() {\r\n var rentalDatePeriod = '';\r\n if (this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek'])\r\n rentalDatePeriod = this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek'].split('-')[0];\r\n this.subscriptions.push(this.rentalService.getOtherRentalItems(this.marketId, rentalDatePeriod).subscribe((response) => {\r\n if (response) {\r\n response.map((el, i) => {\r\n if (el.WebRental) {\r\n const ob = {\r\n Id: el.OtherItemId,\r\n OtherItem: el.OtherItem,\r\n OtherItemCharge: this.customCurrency.transform(el.OtherItemCombinedWeeklyCharge),\r\n Quantity: 0,\r\n OtherItemtotal: this.customCurrency.transform('0'),\r\n Recurring: el.Recurring,\r\n othChgBooths: \"none\"\r\n }\r\n this.otherRentalCharges.push(ob);\r\n this.otherItemList.push(ob);\r\n }\r\n });\r\n }\r\n }, (err) => {\r\n }));\r\n }\r\n\r\n checkMarketDaysSelected() {\r\n const sunday = this.rentalForm.value['marketWeekSunday'];\r\n const monday = this.rentalForm.value['marketWeekMonday'];\r\n const tuesday = this.rentalForm.value['marketWeekTuesday'];\r\n const wednesday = this.rentalForm.value['marketWeekWednesday'];\r\n const thursday = this.rentalForm.value['marketWeekThursday'];\r\n const friday = this.rentalForm.value['marketWeekFriday'];\r\n const saturday = this.rentalForm.value['marketWeekSaturday'];\r\n return sunday || monday || tuesday || wednesday || thursday || friday || saturday;\r\n }\r\n\r\n openLayout() {\r\n this.layoutParts = this.rentalForm.value['marketParts'];\r\n var marketDaysSelected = this.checkMarketDaysSelected();\r\n if (!marketDaysSelected) {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Please select a market day!`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n if (this.selectedMarketDays.length > 0) {\r\n this.selectedDates = [];\r\n this.selectedMarketDays.map((el, i) => {\r\n const startDate = new Date(this.rentalForm.value['rentalStartDate'].split(\"-\")[0]);\r\n const endDate = new Date(this.rentalForm.value['rentalEndDate'].split(\"-\")[1]);\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n this.selectedDates.push(this.datePipe.transform(new Date(currentDay), 'MM/dd/yyyy'));\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n });\r\n }\r\n this.weeklyLayoutData = {\r\n Sunday: this.rentalForm.value['marketWeekSunday'],\r\n Monday: this.rentalForm.value['marketWeekMonday'],\r\n Tuesday: this.rentalForm.value['marketWeekTuesday'],\r\n Wednesday: this.rentalForm.value['marketWeekWednesday'],\r\n Thursday: this.rentalForm.value['marketWeekThursday'],\r\n Friday: this.rentalForm.value['marketWeekFriday'],\r\n Saturday: this.rentalForm.value['marketWeekSaturday'],\r\n weeklyRentalStartDate: this.rentalForm.value['rentalStartDate'],\r\n weeklyRentalEndDate: this.rentalForm.value['rentalEndDate'],\r\n weeklyRentalMarketDays: this.selectedMarketDays,\r\n weeklyRentalFirstDay:this.rentalForm.value['weeklyRentalStartDates'],\r\n selectedDates: this.selectedDates,\r\n weeklyRentalSelectedBooths: this.selectedWeeklyBooths.filter(e => e.NewBooth == true),\r\n tempRecordNo: this.tempRecordNo\r\n }\r\n this.displayLayout = true;\r\n }\r\n }\r\n\r\n validateAndAddSelectedBoothsToGrid() {\r\n let noResale = true;\r\n var rentalDates = [];\r\n var marketDay;\r\n var rentalstartDate;\r\n this.vendorRentalDays = [];\r\n this.marketDayCountForResale = 0;\r\n if ((this.ResaleNumberRequired && !this.exemptResale) || (this.BusinessLicenseNumberRequired)) {\r\n var selectedBoothRecord = this.selectedWeeklyBooths.filter(e => e.NewBooth == true || e.ExtendRental == true);\r\n if (selectedBoothRecord.length > 0) {\r\n selectedBoothRecord.forEach(record => {\r\n for(const el of this.selectedMarketDays){\r\n const startDate = new Date(record.RentalStartDate);\r\n const endDate = new Date(record.RentalEndDate);\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n const excludedDates = this.excludedMarketDays.map(dateString => new Date(dateString));\r\n while (currentDay <= endDate) {\r\n var exludedDate = excludedDates.some(date => {\r\n return this.datePipe.transform(date, 'MM/dd/yyyy') === this.datePipe.transform(currentDay, 'MM/dd/yyyy');\r\n });\r\n if (currentDay.getDay() === selectedDayOfWeek && !exludedDate) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n\r\n rentalDates.map(date => {\r\n const targetDateString = this.datePipe.transform(date.startDate, \"MM/dd/yyyy\");\r\n const dateExist = this.vendorRentalDays.find(el => {\r\n const rentalDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(date.startDate, \"MM/dd/yyyy\");\r\n this.vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n if (this.marketDayCountForResale > this.DaysSellWithoutResaleNumber) {\r\n return; // exits the forEach loop when the condition is met\r\n }\r\n }\r\n });\r\n });\r\n } \r\n \r\n rentalDates=[];\r\n\r\n for(const el of this.selectedMarketDays){\r\n const startDate = new Date(this.rentalForm.value['weeklyRentalStartDates']);\r\n const endDate = new Date(this.rentalForm.value['rentalEndDate'].split(\"-\")[1]);\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n const excludedDates = this.excludedMarketDays.map(dateString => new Date(dateString));\r\n while (currentDay <= endDate) {\r\n var exludedDate = excludedDates.some(date => {\r\n return this.datePipe.transform(date, 'MM/dd/yyyy') === this.datePipe.transform(currentDay, 'MM/dd/yyyy');\r\n });\r\n if (currentDay.getDay() === selectedDayOfWeek && !exludedDate) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n\r\n const apiCalls = rentalDates.map(date => {\r\n const obj = {\r\n VendorID: this.vendorId,\r\n VendorRentalDate: new Date(date.startDate)\r\n };\r\n\r\n return this.rentalService.getVendorRentalDays(obj).pipe(\r\n catchError(error => {\r\n console.error('API call failed for date:', date.startDate, error);\r\n return of([]); // Return an empty array in case of error\r\n })\r\n );\r\n });\r\n\r\n forkJoin(apiCalls).subscribe((responses: any[][]) => {\r\n responses.forEach((res, index) => {\r\n const date = rentalDates[index].startDate;\r\n if (res && res.length > 0) {\r\n res.forEach(el => {\r\n const targetDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n const dateExist = this.vendorRentalDays.find(data => {\r\n const rentalDateString = this.datePipe.transform(data.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n this.vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n }\r\n });\r\n }\r\n\r\n const targetDateString = this.datePipe.transform(date, \"MM/dd/yyyy\");\r\n const dateExist = this.vendorRentalDays.find(el => {\r\n const rentalDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(date, \"MM/dd/yyyy\");\r\n this.vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n }\r\n });\r\n\r\n if (!this.newVendor) {\r\n if (this.ResaleNumberRequired && !this.exemptResale && !this.resaleNo && this.marketDayCountForResale > this.DaysSellWithoutResaleNumber && !this.resaleOptionSelected) {\r\n const modal = this.modalResaleNo.nativeElement;\r\n modal.classList.add('show');\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'block';\r\n this.ResaleOrBusinessHeader = \"Resale Number\"\r\n this.resaleNoDisplay = true;\r\n this.businessLicenseDisplay = false;\r\n }\r\n noResale = false;\r\n }\r\n else if (this.BusinessLicenseNumberRequired && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n if (!this.businessLicenseNumber || !this.businessLicenseExpiryDate) {\r\n const modal = this.modalResaleNo.nativeElement;\r\n modal.classList.add('show');\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'block';\r\n this.ResaleOrBusinessHeader = \"Business License Number\";\r\n this.resaleNoDisplay = false;\r\n this.businessLicenseDisplay = true;\r\n }\r\n noResale = false;\r\n }\r\n else {\r\n if (this.getDateFromDateTime(new Date(this.businessLicenseExpiryDate)) < this.getDateFromDateTime(new Date())) {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Business License is expired! Please contact the market`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n }\r\n else {\r\n noResale = true;\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n else {\r\n if (this.ResaleNumberRequired && !this.exemptResale && !this.resaleNo && this.marketDayCountForResale > this.DaysSellWithoutResaleNumber && !this.resaleOptionSelected) {\r\n this.resaleNoInputRequired.emit(true)\r\n }\r\n if (this.BusinessLicenseNumberRequired && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n this.businessLicenseRequired.emit(true);\r\n }\r\n this.addSelectedBoothsToGrid();\r\n }\r\n });\r\n } else {\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n\r\n\r\n selectedBoothsFromLayout(data) {\r\n window.scrollTo(0, 0);\r\n this.selectedWeeklyBoothData = data;\r\n this.displayLayout = false; \r\n this.validateAndAddSelectedBoothsToGrid();\r\n }\r\n\r\n removeBoothCharges(data) {\r\n const index = this.selectedWeeklyBooths.findIndex(selectedBooth => selectedBooth.BoothNumber === data.BoothNumber && selectedBooth.RentStartPeriod == data.RentStartPeriod && selectedBooth.RentEndPeriod == data.RentEndPeriod);\r\n if (index !== -1) {\r\n this.selectedWeeklyBooths.splice(index, 1);\r\n }\r\n this.totalRentalCharge -= data.Rent.includes('(') && data.Rent.includes(')') ? -1 * parseFloat(data.Rent.replace(/[^0-9.-]/g, '')) : parseFloat(data.Rent.replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= data.SalesTax.includes('(') && data.SalesTax.includes(')') ? -1 * parseFloat(data.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.SalesTax.replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= data.CityTax.includes('(') && data.CityTax.includes(')') ? -1 * parseFloat(data.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.CityTax.replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n }\r\n\r\n \r\n closeLayoutForm() {\r\n this.displayLayout = false;\r\n this.getMarketDays();\r\n }\r\n\r\n searchOtherItem() {\r\n this.otherRentalCharges = this.otherItemList;\r\n const otherItemSearchText = this.rentalForm.controls['otherItemsScreen'].value['otherItemSearchText'];\r\n if (otherItemSearchText != '') {\r\n this.otherRentalCharges = this.otherItemList.filter((ele) => ele.OtherItem.toString().toLowerCase().indexOf(otherItemSearchText.toLowerCase()) !== -1);\r\n }\r\n }\r\n\r\n async getBoothsAndItemsForOtherCharges() {\r\n this.boothsForOtherCharge = [];\r\n this.selectedOtherCharges = [];\r\n if (this.OtherChargesPeriod) {\r\n this.otherRentalCharges = [];\r\n this.otherItemList = [];\r\n await this.getOtherRentalItems();\r\n }\r\n if (this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek']) {\r\n this.selectedWeeklyBooths.forEach((item) => {\r\n if (item.RentStartPeriod == this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek']) {\r\n this.boothsForOtherCharge.push({ BoothNumber: item.BoothNumber })\r\n }\r\n });\r\n }\r\n this.boothsForOtherCharge.sort((a, b) => {\r\n if (a.BoothNumber < b.BoothNumber) {\r\n return -1;\r\n }\r\n if (a.BoothNumber > b.BoothNumber) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n }\r\n\r\n closeResaleModal(){\r\n const modal = this.modalResaleNo.nativeElement;\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'none';\r\n modal.classList.remove('show');\r\n }\r\n }\r\n\r\n onCheckNumKeyPress(event: KeyboardEvent) {\r\n const allowedChars = /[0-9]/g;\r\n const key = event.key;\r\n if (event.key === 'Backspace' || event.key === 'Delete' || event.key === 'ArrowLeft' || event.key === 'ArrowRight' || event.key === '#') {\r\n return;\r\n }\r\n if (!key.match(allowedChars)) {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n updateOtherItem(data) {\r\n if (parseFloat(data.Quantity) == 0) {\r\n data.Quantity = \"1\"\r\n }\r\n this.totalSalesTax -= data.SalesTax.toString().includes('(') && data.SalesTax.toString().includes(')') ? -1 * parseFloat(data.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= data.CityTax.toString().includes('(') && data.CityTax.toString().includes(')') ? -1 * parseFloat(data.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalOtherRentalCharge -= data.OtherItemtotal.toString().includes('(') && data.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n var index\r\n if (data.NewItem == true)\r\n index = this.selectedOtherItems.findIndex(oth => oth.Id === data.Id && oth.RentalWeek == data.RentalWeek && oth.NewItem == true && oth.BoothNo == data.BoothNo);\r\n else\r\n index = this.selectedOtherItems.findIndex(oth => oth.Id === data.Id && oth.RentalMonth == data.RentalMonth && oth.WeeklyOtherRentalIds == data.WeeklyOtherRentalIds && oth.BoothNo == data.BoothNo);\r\n\r\n if (index !== -1) {\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: data.Id,\r\n VendorId: this.vendorId,\r\n Quantity: data.Quantity,\r\n OtherItemCharge: data.OtherItemCharge.includes('(') && data.OtherItemCharge.includes(')') ? (-1) * parseFloat(data.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n WRNewVendorRequest: this.newVendor\r\n }\r\n this.rentalService.getOtherItemsRentalCharges(obj).subscribe((res: any) => {\r\n this.selectedOtherItems[index].SalesTax = this.customCurrency.transform(res.SalesTax.toString());\r\n this.selectedOtherItems[index].CityTax = this.customCurrency.transform(res.CityTax.toString());\r\n const isNegative = data.OtherItemCharge.includes('(') && data.OtherItemCharge.includes(')');\r\n const totalValue = parseFloat(data.OtherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n data.OtherItemtotal = this.customCurrency.transform((finalCharge * data.Quantity).toString());\r\n this.selectedOtherItems[index].OtherItemtotal = data.OtherItemtotal;\r\n this.selectedOtherItems[index].OtherItemCharge = this.customCurrency.transform((finalCharge).toString());\r\n this.selectedOtherItems[index].Recurring = data.Recurring;\r\n this.selectedOtherItems[index].Reference = data.Reference;\r\n this.selectedOtherItems[index].Quantity = data.Quantity;\r\n this.gridOtherRental.refresh();\r\n this.totalOtherRentalCharge += data.OtherItemtotal.toString().includes('(') && data.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.getDiscounts();\r\n });\r\n }\r\n }\r\n\r\n cancelRental() {\r\n if (this.isdirty) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Unsaved changes will be lost. Are you sure you want to cancel?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.isFormDirty.emit(false);\r\n this.isCancelClicked.emit('5');\r\n } else {\r\n //do nothing\r\n }\r\n });\r\n } else {\r\n this.isFormDirty.emit(false);\r\n this.isCancelClicked.emit('5');\r\n }\r\n }\r\n\r\n addOtherCharges() {\r\n if (this.selectedOtherCharges) {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedOtherCharges.map((el, i) => {\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: el.Id,\r\n VendorId: this.vendorId,\r\n Quantity: el.Quantity,\r\n OtherItemCharge: el.OtherItemCharge.includes('(') && el.OtherItemCharge.includes(')') ? (-1) * parseFloat(el.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(el.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n WRNewVendorRequest: this.newVendor\r\n }\r\n const index = this.selectedOtherItems.findIndex(item => item.Id === el.Id && item.RentalWeek == this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek'] && item.NewItem == true && item.BoothNo === el.othChgBooths);\r\n this.rentalService.getOtherItemsRentalCharges(obj).subscribe((res: any) => {\r\n var newItem = [];\r\n if (index !== -1) {\r\n var otherItemTotal = this.selectedOtherItems[index].OtherItemtotal;\r\n var salesTax = this.selectedOtherItems[index].SalesTax;\r\n var cityTax = this.selectedOtherItems[index].CityTax;\r\n this.totalOtherRentalCharge -= otherItemTotal.toString().includes('(') && otherItemTotal.toString().includes(')') ? -1 * parseFloat(otherItemTotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(otherItemTotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= salesTax.toString().includes('(') && salesTax.toString().includes(')') ? -1 * parseFloat(salesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(salesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= cityTax.toString().includes('(') && cityTax.toString().includes(')') ? -1 * parseFloat(cityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(cityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.rentalForm.patchValue({\r\n totalOtherRentalCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n const ob = {\r\n Id: el.Id,\r\n WeekOtherRentalId: 0,\r\n OtherItemCharge: el.OtherItemCharge,\r\n OtherItem: el.OtherItem,\r\n Quantity: el.Quantity,\r\n OtherItemtotal: el.OtherItemtotal,\r\n RentalWeek: el.RentalWeek,\r\n SalesTax: this.customCurrency.transform(res.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(res.CityTax.toString()),\r\n BoothNo: el.othChgBooths,\r\n Recurring: el.Recurring,\r\n Reference:el.Reference,\r\n NewItem: true,\r\n WeeklyOtherRentalIds:''\r\n }\r\n this.selectedOtherItems[index] = ob;\r\n this.gridOtherRental.refresh();\r\n }\r\n else {\r\n const ob = {\r\n Id: el.Id,\r\n WeekOtherRentalId: 0,\r\n OtherItem: el.OtherItem,\r\n OtherItemCharge: el.OtherItemCharge,\r\n Quantity: el.Quantity,\r\n OtherItemtotal: el.OtherItemtotal,\r\n RentalWeek: el.RentalWeek,\r\n SalesTax: this.customCurrency.transform(res.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(res.CityTax.toString()),\r\n BoothNo: el.othChgBooths,\r\n Recurring: el.Recurring,\r\n Reference:el.Reference,\r\n NewItem: true,\r\n WeeklyOtherRentalIds: ''\r\n }\r\n newItem.push(JSON.parse(JSON.stringify(ob)));\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n }\r\n this.totalOtherRentalCharge += el.OtherItemtotal.toString().includes('(') && el.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(el.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(el.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.rentalForm.patchValue({\r\n totalOtherRentalCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n this.getDiscounts();\r\n if (newItem.length > 0) {\r\n this.selectedOtherItems = this.selectedOtherItems.concat(newItem);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n });\r\n\r\n this.loaderIcon = Promise.resolve(false);\r\n const modal = this.modalWeeklyOtherCharges.nativeElement;\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'none';\r\n modal.classList.remove('show');\r\n }\r\n }\r\n }\r\n\r\n deleteOtherRentalCharges(data) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to delete the selected Other Charges?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n const index = this.selectedOtherItems.findIndex(oth => oth.Id === data.Id && oth.RentalWeek == data.RentalWeek);\r\n if (index !== -1) {\r\n this.selectedOtherItems.splice(index, 1);\r\n }\r\n var selectedItems = this.otherRentalCharges.findIndex(item => item.Id == data.Id);\r\n if (selectedItems != -1) {\r\n this.rentalService.getOtherRentalItems(this.marketId).subscribe((response) => {\r\n if (response) {\r\n const masterChargeRecord = response.filter(item => item.OtherItemId == data.Id);\r\n if (masterChargeRecord) {\r\n this.otherRentalCharges[selectedItems].Quantity = 0;\r\n this.otherRentalCharges[selectedItems].othChgBooths = \"none\";\r\n this.otherRentalCharges[selectedItems].OtherItemCharge = this.customCurrency.transform(masterChargeRecord[0].OtherItemCombinedWeeklyCharge);\r\n this.otherRentalCharges[selectedItems].OtherItemtotal = this.customCurrency.transform('0');\r\n this.otherRentalCharges[selectedItems].Reference = \"\"\r\n this.otherRentalCharges[selectedItems].Recurring = masterChargeRecord[0].Recurring\r\n }\r\n }\r\n }, (err) => {\r\n });\r\n }\r\n\r\n this.totalOtherRentalCharge -= data.OtherItemtotal.includes('(') && data.OtherItemtotal.includes(')') ? -1 * parseFloat(data.OtherItemtotal.replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemtotal.replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= data.SalesTax.includes('(') && data.SalesTax.includes(')') ? -1 * parseFloat(data.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.SalesTax.replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= data.CityTax.includes('(') && data.CityTax.includes(')') ? -1 * parseFloat(data.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.CityTax.replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.gridOtherRental.refresh();\r\n this.getDiscounts();\r\n }\r\n });\r\n }\r\n\r\n deleteSelectedBooth(data) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to delete the selected Booth?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n const index = this.selectedWeeklyBooths.findIndex(selectedBooth => selectedBooth.BoothNumber === data.BoothNumber && selectedBooth.RentStartPeriod == data.RentStartPeriod && selectedBooth.RentEndPeriod == data.RentEndPeriod);\r\n if (index !== -1) {\r\n this.selectedWeeklyBooths.splice(index, 1);\r\n }\r\n if (this.tempRecordNo) {\r\n const temp = {\r\n TempRecordNo: this.tempRecordNo.toString(),\r\n BoothNumber: data.BoothNumber,\r\n StartDate: new Date(data.RentalStartDate),\r\n RentalType: 5,\r\n EndDate: new Date(data.RentalEndDate),\r\n Sunday: data.Sunday,\r\n Monday: data.Monday,\r\n Tuesday: data.Tuesday,\r\n Wednesday: data.Wednesday,\r\n Thursday: data.Thursday,\r\n Friday: data.Friday,\r\n Saturday: data.Saturday\r\n }\r\n this.subscriptions.push(this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n }));\r\n }\r\n this.totalRentalCharge -= data.Rent.includes('(') && data.Rent.includes(')') ? -1 * parseFloat(data.Rent.replace(/[^0-9.-]/g, '')) : parseFloat(data.Rent.replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= data.SalesTax.includes('(') && data.SalesTax.includes(')') ? -1 * parseFloat(data.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.SalesTax.replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= data.CityTax.includes('(') && data.CityTax.includes(')') ? -1 * parseFloat(data.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.CityTax.replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.getDiscounts();\r\n this.gridWeeklyRental.refresh();\r\n }\r\n });\r\n }\r\n\r\n setDefaultRentalItem(args, selectedItems) {\r\n selectedItems.Quantity = 0\r\n selectedItems.OtherItemtotal = 0\r\n if (args.srcElement.checked) {\r\n selectedItems.otherItemChecked = true;\r\n selectedItems.Quantity = 1\r\n const isNegative = selectedItems.OtherItemCharge.includes('(') && selectedItems.OtherItemCharge.includes(')');\r\n const totalValue = parseFloat(selectedItems.OtherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n selectedItems.OtherItemtotal = this.customCurrency.transform((finalCharge * selectedItems.Quantity).toString());\r\n this.selectedOtherCharges.push({\r\n Id: selectedItems.Id,\r\n OtherItem: selectedItems.OtherItem,\r\n OtherItemCharge: selectedItems.OtherItemCharge,\r\n Quantity: selectedItems.Quantity,\r\n OtherItemtotal: selectedItems.OtherItemtotal,\r\n othChgBooths: selectedItems.othChgBooths,\r\n Recurring: selectedItems.Recurring,\r\n RentalWeek: this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek']\r\n });\r\n } else {\r\n selectedItems.otherItemChecked = false;\r\n const index = this.selectedOtherCharges.findIndex(item => item.Id === selectedItems.Id);\r\n if (index !== -1) {\r\n this.selectedOtherCharges.splice(index, 1);\r\n }\r\n }\r\n }\r\n\r\n isDateSelected(item: any): boolean {\r\n var isItemSelected = this.selectedOtherItems.some(\r\n (element) =>\r\n (element.RentalWeek === this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek']) &&\r\n element.Id === item.Id && element.NewItem == true\r\n );\r\n\r\n if(!isItemSelected){\r\n isItemSelected = this.selectedOtherCharges.some(\r\n (element) =>\r\n (element.RentalWeek === this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketWeek']) &&\r\n element.Id === item.Id\r\n );\r\n }\r\n\r\n !isItemSelected? item.otherItemChecked = false : item.otherItemChecked = true;\r\n item.othChgBooths = \"none\";\r\n return isItemSelected;\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscriptions.forEach((subscription) => {\r\n if (subscription) {\r\n subscription.unsubscribe();\r\n }\r\n });\r\n }\r\n}\r\n\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n * Select Market Day(s) Here\r\n
\r\n
    \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
\r\n
\r\n
\r\n
\r\n Monthly Market(s):\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{data.RentEndPeriod}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
Other Charges
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
ItemsRecBooth#ChargesQtyTotalReference
\r\n \r\n {{item.OtherItem}}\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n {{item.OtherItemtotal}}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n
{{ResaleOrBusinessHeader}}
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n","import { DatePipe } from '@angular/common';\r\nimport { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, Renderer2, ViewChild } from '@angular/core';\r\nimport { FormBuilder, FormGroup } from '@angular/forms';\r\nimport { ActivatedRoute, Params, Router } from '@angular/router';\r\nimport { GridComponent, SortSettingsModel } from '@syncfusion/ej2-angular-grids';\r\nimport { catchError, forkJoin, of, Subscription } from 'rxjs';\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\nimport { RentalService } from 'src/app/services/Rental.service';\r\nimport { VendorService } from 'src/app/services/Vendor.service';\r\nimport { customCurrencyPipe } from 'src/app/Shared/customCurrency.pipe';\r\nimport { SharedDataService } from 'src/app/Shared/SharedData.service';\r\nimport { DiscountType } from 'src/app/Shared/enum';\r\nimport Swal from 'sweetalert2';\r\ninterface DateString {\r\n startDate: string;\r\n}\r\n@Component({\r\n selector: 'app-combinedmonthlyrental-online',\r\n templateUrl: './combinedmonthlyrental-online.component.html',\r\n styleUrls: ['./combinedmonthlyrental-online.component.scss', '../rent-online.component.scss']\r\n})\r\nexport class CombinedmonthlyrentalOnlineComponent implements OnInit, OnDestroy {\r\n rentalForm : FormGroup;\r\n marketId;\r\n vendorId;\r\n sunday = false;\r\n monday = false;\r\n tuesday = false;\r\n wednesday = false;\r\n thursay = false;\r\n friday = false;\r\n saturday = false;\r\n selectedMarketDays=[];\r\n parts=[];\r\n monthlyRentalStartDates = [];\r\n defaultPart;\r\n monthlyMarketDays = [];\r\n excludedMarketDays=[];\r\n selectedOtherItems = []\r\n selectedMonthlyBooths = []\r\n displaySalesTax = false;\r\n displayCityTax = false;\r\n tempRecordNo = 0;\r\n otherRentalCharges = [];\r\n otherItemList = [];\r\n vendorProducts = [];\r\n defaultProduct;\r\n vendorDiscountPlans =[];\r\n priorBalance = 0.00;\r\n layoutParts = 0;\r\n totalRentalCharge = 0.00;\r\n totalOtherRentalCharge = 0.00;\r\n totalSalesTax = 0.00;\r\n totalSecondLeveltax = 0.00\r\n totalCharge = 0.00;\r\n selectedDates = [];\r\n private subscriptions: Subscription[] = [];\r\n public textWrapSettings: any = { wrapMode: 'Both' }; // Enable text wrapping\r\n MonthlyLayoutData;\r\n combinedMonthlyBookingEndDate;\r\n displayLayout = false;\r\n totalDiscountCharge;\r\n ApplyBookingFee = false;\r\n ApplyBookingFeeId;\r\n boothsForOtherCharge = [];\r\n bookingFeeAmount;\r\n displayOtherChargeByBooth = false;\r\n displayOtherChargeSalesTax = false;\r\n displayOtherChargeCityTax = false;\r\n warnExcessPayment = false;\r\n warnZeroPayment = false;\r\n RentalTaxPercentage = 0;\r\n OtherRentalTaxPercentage = 0;\r\n RentalSecondTaxPercentage = 0;\r\n OtherRentalSecondTaxPercentage = 0;\r\n DisplayPayDueDate = false;\r\n DisplaySpecificDate = false;\r\n OtherChargesPeriod = false;\r\n DisplayOptionValue = 0;\r\n secondTaxName = \"\";\r\n selectedMonthlyBoothData = [];\r\n @ViewChild('gridMonthlyRental', { static: false }) public gridMonthlyRental: GridComponent;\r\n @ViewChild('modalResaleNo', { static: false }) modalResaleNo: ElementRef;\r\n @ViewChild('modalMonthlyOtherCharges', { static: false }) modalMonthlyOtherCharges: ElementRef;\r\n @ViewChild('gridOtherRental', { static: false }) public gridOtherRental: GridComponent;\r\n ResaleNumberRequired = false;\r\n DaysSellWithoutResaleNumber;\r\n BusinessLicenseNumberRequired = false;\r\n DaysSellWithoutBusiLicNumber;\r\n AllowRentingOtherItems = false;\r\n exemptResale = false;\r\n resaleNo = \"\";\r\n resaleNoDisplay = false;\r\n businessLicenseDisplay = false;\r\n ResaleOrBusinessHeader = \"\";\r\n businessLicenseNumber;\r\n businessLicenseExpiryDate;\r\n vendorRentalDays = [];\r\n marketDayCountForResale = 0;\r\n resaleOptionSelected = false;\r\n selectedBoothsForRental=[];\r\n perDiemRentApplicable = false;\r\n selectedOtherCharges = [];\r\n isdirty = false;\r\n @Input() newVendor;\r\n @Output() bookingFormCompleted = new EventEmitter(); \r\n @Output() rentalBookingData = new EventEmitter();\r\n @Output() isFormDirty = new EventEmitter(); \r\n @Output() isCancelClicked = new EventEmitter();\r\n @Output() resaleNoInputRequired = new EventEmitter();\r\n @Output() businessLicenseRequired = new EventEmitter(); \r\n constructor( private formbuilder: FormBuilder,\r\n private route: ActivatedRoute,\r\n public router: Router,\r\n public rentalService: RentalService,\r\n public vendorService: VendorService,\r\n private customCurrency: customCurrencyPipe,\r\n private datePipe: DatePipe,\r\n private sharedDataService: SharedDataService,\r\n private marketInfoService: MarketInfoService){\r\n this.rentalForm = this.formbuilder.group({\r\n marketWeekSunday: [0],\r\n marketWeekMonday: [0],\r\n marketWeekTuesday: [0],\r\n marketWeekWednesday: [0],\r\n marketWeekThursday: [0],\r\n marketWeekFriday: [0],\r\n marketWeekSaturday: [0],\r\n marketParts:[''],\r\n rentalStartMonth:[''],\r\n rentalEndMonth: [''],\r\n monthlyRentalStartDates:[],\r\n otherItemsScreen: this.formbuilder.group({\r\n otherChargeMarketMonth: [''],\r\n otherItemSearchText: ['']\r\n })\r\n })\r\n }\r\n sortOptions: SortSettingsModel = {\r\n columns: [{ field: 'RentalStartDate', direction: 'Ascending' }, { field: 'BoothNumber', direction: 'Ascending' }]\r\n };\r\n sortOtherItemsOptions: SortSettingsModel = {\r\n columns: [{ field: 'OtherItem', direction: 'Ascending' }, { field: 'BoothNo', direction: 'Ascending' }]\r\n };\r\n public loaderIcon: Promise;\r\n ngOnInit(): void {\r\n this.route.params.subscribe((params: Params) => {\r\n this.marketId = params['marketId'];\r\n this.vendorId = params['vendorId'];\r\n });\r\n this.getMarketDays();\r\n this.getRentalPaymentSettings();\r\n this.getVendorProducts();\r\n this.getParts();\r\n this.getMarketVendorSettings();\r\n this.getVendorBusinessLicenseSettings();\r\n this.generateTempRecordNumber();\r\n this.getVendorBalances();\r\n this.getOtherRentalItems();\r\n if (this.sharedDataService.paymentSharedData)\r\n this.loadSelectedBooths();\r\n }\r\n\r\n getParts() {\r\n const sub = this.marketInfoService.getParts(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.parts = res;\r\n this.getWebRentalSetting();\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getMarketVendorSettings(){\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.vendorService.getMarketVendorSettings(this.vendorId, this.marketId).subscribe((res: any) => {\r\n var response = res.body;\r\n if (response) {\r\n this.exemptResale = response.ExemptResale;\r\n this.resaleNo = response.Resale;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getVendorBusinessLicenseSettings(){\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.vendorService.getVendorBusinessLicenseSettings(this.vendorId, this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.businessLicenseNumber = res.LicenseNumber;\r\n this.businessLicenseExpiryDate = res.ExpiryDate;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getRentalPaymentSettings() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.rentalService.getRentalSettings(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.warnExcessPayment = res.WarnExcessPayment;\r\n this.warnZeroPayment = res.WarnZeroPayment;\r\n this.displayOtherChargeByBooth = res.DisplayOtherChargesByBooth;\r\n this.displayCityTax = res.RentalSecondTaxable;\r\n this.displaySalesTax = res.RentalTaxable;\r\n this.perDiemRentApplicable = res.PerDiemRentApplicable;\r\n this.gridMonthlyRental.getColumnByField(\"SalesTax\").visible = this.displaySalesTax;\r\n this.gridMonthlyRental.getColumnByField(\"CityTax\").visible = this.displayCityTax;\r\n if(this.newVendor){\r\n this.gridMonthlyRental.getColumnByField(\"Product\").visible = false;\r\n }\r\n this.gridMonthlyRental.refreshColumns();\r\n this.displayOtherChargeSalesTax = res.OtherRentalTaxable;\r\n this.displayOtherChargeCityTax = res.OtherRentalSecondTaxable; \r\n this.ResaleNumberRequired = res.ResaleNumberRequired;\r\n this.DaysSellWithoutResaleNumber = res.DaysSellWithoutResaleNumber;\r\n this.BusinessLicenseNumberRequired = res.BusinessLicenseNumberRequired;\r\n this.DaysSellWithoutBusiLicNumber = res.DaysSellWithoutBusiLicNumber;\r\n this.DisplayPayDueDate = res.DisplayPayDueDate;\r\n this.DisplaySpecificDate = res.DisplaySpecificDate;\r\n this.DisplayOptionValue = res.DisplayOptionValue;\r\n const nextDate = this.getNextDate(this.DisplayOptionValue);\r\n this.secondTaxName = res.SecondTaxName ? res.SecondTaxName: \"Sec Level Tax\"\r\n var secLevelTaxRentHeader = this.gridMonthlyRental.getColumnByField(\"CityTax\"); \r\n secLevelTaxRentHeader.headerText = this.secondTaxName; \r\n this.combinedMonthlyBookingEndDate = res.CombinedMonthlyBookingEndDate;\r\n this.RentalTaxPercentage = res.RentalTaxPercentage;\r\n this.OtherRentalTaxPercentage = res.OtherRentalTaxPercentage;\r\n this.RentalSecondTaxPercentage = res.RentalSecondTaxPercentage;\r\n this.OtherRentalSecondTaxPercentage = res.OtherRentalSecondTaxPercentage;\r\n this.OtherChargesPeriod = res.OtherChargesPeriod;\r\n this.gridMonthlyRental.refresh();\r\n if(this.AllowRentingOtherItems){\r\n var secLevelTaxOtherRentHeader = this.gridOtherRental.getColumnByField(\"CityTax\"); \r\n secLevelTaxOtherRentHeader.headerText = this.secondTaxName;\r\n this.gridOtherRental.getColumnByField(\"BoothNo\").visible = res.DisplayOtherChargesByBooth;\r\n this.gridOtherRental.getColumnByField(\"SalesTax\").visible = this.displayOtherChargeSalesTax;\r\n this.gridOtherRental.getColumnByField(\"CityTax\").visible = this.displayOtherChargeCityTax;\r\n this.gridOtherRental.refreshColumns();\r\n this.gridOtherRental.refresh();\r\n } \r\n }\r\n });\r\n }\r\n\r\n getNextDate(day: number): Date {\r\n if (this.DisplaySpecificDate) {\r\n const today = new Date();\r\n let nextDate = new Date(today.getFullYear(), today.getMonth(), day);\r\n // If the nextDate is in the past or today, move to the next month\r\n if (nextDate < today) {\r\n nextDate.setMonth(nextDate.getMonth() + 1);\r\n }\r\n // Handle cases where the day is not valid in the next month (e.g., 31st in February)\r\n while (nextDate.getDate() !== day) {\r\n nextDate.setMonth(nextDate.getMonth() + 1);\r\n nextDate.setDate(day);\r\n }\r\n return nextDate;\r\n }\r\n else{\r\n const today = new Date();\r\n let nextDate = new Date(today.setDate(today.getDate() + day));\r\n return nextDate;\r\n }\r\n }\r\n\r\n getOtherRentalItems() {\r\n var formattedDate;\r\n if (this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth']) {\r\n var input = this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth'];\r\n const date = new Date(`${input} 1`);\r\n formattedDate = this.datePipe.transform(`${date.getMonth() + 1}/${date.getDate()}/${date.getFullYear()}`, 'MM/dd/yyyy');\r\n }\r\n this.subscriptions.push(this.rentalService.getOtherRentalItems(this.marketId, formattedDate).subscribe((response) => {\r\n if (response) {\r\n response.map((el, i) => {\r\n if (el.WebRental) {\r\n const ob = {\r\n Id: el.OtherItemId,\r\n OtherItem: el.OtherItem,\r\n OtherItemCharge: this.customCurrency.transform(el.OtherItemCombinedMonthlyCharge),\r\n Quantity: 0,\r\n OtherItemtotal: this.customCurrency.transform('0'),\r\n othChgBooths: \"none\"\r\n }\r\n this.otherRentalCharges.push(ob);\r\n this.otherItemList.push(ob);\r\n }\r\n });\r\n }\r\n }, (err) => {\r\n }));\r\n }\r\n\r\n loadSelectedBooths() { \r\n var newItem =[];\r\n if (this.sharedDataService.paymentSharedData.ReturnData.length > 0) {\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n this.sharedDataService.paymentSharedData.ReturnData.forEach((item) => {\r\n var newbooths=[];\r\n var ob = {\r\n BoothNumber: item.BoothNumber,\r\n BoothType: item.BoothType,\r\n BoothTypeId: item.BoothTypeId,\r\n BoothDescription: item.BoothDescription,\r\n Product:item.Product,\r\n RentStartPeriod:item.RentStartPeriod,\r\n RentEndPeriod: item.RentEndPeriod,\r\n RentalSavedEndDate: item.RentalSavedEndDate,\r\n RentalStartDate: item.RentalStartDate,\r\n RentalEndDate: item.RentalEndDate,\r\n MktDays: item.MktDays,\r\n Rent: item.Rent,\r\n SalesTax: item.SalesTax,\r\n CityTax: item.CityTax,\r\n PerDiem: item.PerDiem,\r\n PerDiemRent: item.PerdiemRent,\r\n Sunday: item.Sunday,\r\n Monday: item.Monday,\r\n Tuesday: item.Tuesday,\r\n Wednesday: item.Wednesday,\r\n Thursday: item.Thursday,\r\n Friday: item.Friday,\r\n Saturday: item.Saturday,\r\n Reservation: item.Reservation,\r\n Drop: item.Drop,\r\n January: item.January,\r\n February: item.February,\r\n March: item.March,\r\n April: item.April,\r\n May: item.May,\r\n June: item.June,\r\n July: item.July,\r\n August: item.August,\r\n September: item.September,\r\n October: item.October,\r\n November: item.November,\r\n December: item.December,\r\n JanuaryMonthPresent: item.JanuaryMonthPresent,\r\n FebruaryMonthPresent: item.FebruaryMonthPresent,\r\n MarchMonthPresent: item.MarchMonthPresent,\r\n AprilMonthPresent: item.AprilMonthPresent,\r\n MayMonthPresent: item.MayMonthPresent,\r\n JuneMonthPresent: item.JuneMonthPresent,\r\n JulyMonthPresent: item.JulyMonthPresent,\r\n AugustMonthPresent: item.AugustMonthPresent,\r\n SeptemberMonthPresent: item.SeptemberMonthPresent,\r\n OctoberMonthPresent: item.OctoberMonthPresent,\r\n NovemberMonthPresent: item.NovemberMonthPresent,\r\n DecemberMonthPresent: item.DecemberMonthPresent,\r\n NewBooth: true,\r\n Status: \"N\", \r\n StartDateList:item.StartDateList,\r\n DisableStartDate: false,\r\n AllRentalDates: item.AllRentalDates,\r\n TaxModel: item.TaxModel\r\n }\r\n newbooths.push(JSON.parse(JSON.stringify(ob)));\r\n this.selectedMonthlyBooths = this.selectedMonthlyBooths.concat(newbooths); \r\n });\r\n }\r\n if (this.sharedDataService.paymentSharedData.MonthlyOtherRentalCharges.length > 0) {\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n this.sharedDataService.paymentSharedData.MonthlyOtherRentalCharges.forEach((el) => {\r\n if (el.MonthOtherRentalId == 0) {\r\n const year = el.YearMonth.substr(0, 4);\r\n const month = el.YearMonth.substr(4, 2);\r\n const monthInWord = this.datePipe.transform(new Date(year, month - 1), 'MMMM');\r\n const extractedYearMonth = `${monthInWord} ${year}`;\r\n newItem = [];\r\n var ob = {\r\n Id: el.OtherItemId,\r\n MonthOtherRentalId: el.MonthOtherRentalId,\r\n OtherItem: el.OtherItemName,\r\n OtherItemCharge: this.customCurrency.transform(el.OtherCharge),\r\n Quantity: el.Quantity,\r\n OtherItemtotal: this.customCurrency.transform(el.OtherItemCharge),\r\n RentalMonth: extractedYearMonth,\r\n Recurring: el.Recurring,\r\n SalesTax: this.customCurrency.transform(el.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(el.SecLevelTax.toString()),\r\n BoothNo: el.BoothNumber,\r\n Reference: el.Reference,\r\n NewItem: true\r\n }\r\n newItem.push(JSON.parse(JSON.stringify(ob)));\r\n } \r\n\r\n if (newItem.length > 0) {\r\n this.selectedOtherItems = this.selectedOtherItems.concat(newItem);\r\n }\r\n }); \r\n }\r\n\r\n this.totalRentalCharge = parseFloat(this.sharedDataService.paymentSharedData.RentalCharge);\r\n this.totalOtherRentalCharge = parseFloat(this.sharedDataService.paymentSharedData.OtherCharge.toString());\r\n this.totalSalesTax = parseFloat(this.sharedDataService.paymentSharedData.SalesTax.toString());\r\n this.totalSecondLeveltax = parseFloat(this.sharedDataService.paymentSharedData.SecLevelTax.toString());\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.sharedDataService.paymentSharedData = \"\";\r\n this.getDiscounts();\r\n }\r\n\r\n getVendorProducts() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.rentalService.GetVendorProductsById(this.marketId, this.vendorId).subscribe((res: any) => {\r\n if (res) {\r\n this.vendorProducts = res.body;\r\n this.defaultProduct = this.vendorProducts[0].ProductId;\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n generateTempRecordNumber() {\r\n this.subscriptions.push(this.rentalService.generateTempRecordNumber(this.marketId).subscribe((response) => {\r\n if (response.Success) {\r\n this.tempRecordNo = response.Message;\r\n }\r\n }));\r\n }\r\n\r\n getVendorBalances() {\r\n this.vendorDiscountPlans =[];\r\n forkJoin({\r\n vendorBalanceRes: this.rentalService.getVendorBalances(this.vendorId, this.marketId),\r\n discountPlansRes: this.vendorService.GetDiscountPlan(this.vendorId,this.marketId)\r\n }).subscribe(\r\n ({ vendorBalanceRes, discountPlansRes }: any) => {\r\n if (vendorBalanceRes) {\r\n this.priorBalance = vendorBalanceRes.PriorBalance;\r\n }\r\n if(discountPlansRes){\r\n if (discountPlansRes) {\r\n for (const el of discountPlansRes) {\r\n if (el.CombinedMonthly && el.OnlineTransactions) {\r\n const ob = {\r\n PlanSeqId: el.PlanSeqId,\r\n PlanId: el.PlanId,\r\n PlanName: el.PlanName,\r\n EffectiveFrom: this.datePipe.transform(el.EffectiveFrom, 'MM/dd/yyyy'),\r\n ExpiryDate: this.datePipe.transform(el.ExpiryDate, 'MM/dd/yyyy'),\r\n DiscountType: el.DiscountType == 0 ? DiscountType.Percentage : DiscountType.FixedAmount,\r\n DiscountValue: el.DiscountValue,\r\n OtherItems: el.OtherItems,\r\n Daily: el.Daily,\r\n Weekly: el.Weekly,\r\n Monthly: el.Monthly,\r\n CombinedWeekly: el.CombinedWeekly,\r\n CombinedMonthly: el.CombinedMonthly,\r\n IsExceedAmount: el.IsExceedAmount,\r\n ExceedAmount: el.ExceedAmount,\r\n BalanceDue: el.BalanceDue,\r\n Notes: el.Notes,\r\n QDR: el.QDR,\r\n CheckAll: el.Selected,\r\n AutoSelected: el.Selected,\r\n DisableDiscount: el.Selected,\r\n AppliedDiscount: this.customCurrency.transform(\"0.00\"),\r\n SalesTaxAmount: this.customCurrency.transform(\"0.00\"),\r\n SecondLevelTaxAmount: this.customCurrency.transform(\"0.00\"),\r\n SalesTaxApplied: el.SalesTax,\r\n SecondLevelTaxApplied: el.SecondLevelTax,\r\n }\r\n this.vendorDiscountPlans.push(ob);\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n // this.disableDiscountAmount = this.vendorDiscountPlans.length > 0 ? false : true;\r\n }\r\n this.getDiscounts();\r\n }\r\n })\r\n }\r\n\r\n getDiscounts() {\r\n var totalRentalCharge = this.totalRentalCharge;\r\n var totalSalesTax = this.totalSalesTax;\r\n var totalSecondLeveltax = this.totalSecondLeveltax;\r\n var totalOtherRentalCharge = this.totalOtherRentalCharge;\r\n var priorBalance = 0;\r\n var totalChargeWithDue = this.priorBalance + (totalRentalCharge)\r\n + (totalSalesTax)\r\n + (totalSecondLeveltax)\r\n + (totalOtherRentalCharge)\r\n\r\n var totalCharge = (totalRentalCharge) + (totalSalesTax) + (totalSecondLeveltax) + (totalOtherRentalCharge)\r\n // totalCharge = totalCharge.toString().includes('(') && totalCharge.toString().includes(')') ? -1 * parseFloat(totalCharge.toString().replace(/[^0-9.-]/g, '')) : parseFloat(totalCharge.toString().replace(/[^0-9.-]/g, ''));\r\n\r\n if (this.vendorDiscountPlans.length > 0 && totalCharge > 0) {\r\n var discountTotalAmount = 0;\r\n var totalAmountForDiscount = 0;\r\n for (const disc of this.vendorDiscountPlans) {\r\n disc.CheckAll = disc.AutoSelected;\r\n if (disc.CheckAll && disc.CombinedMonthly) {\r\n var currentDiscountValue = 0;\r\n if (!disc.BalanceDue || (disc.BalanceDue && priorBalance <= 0)) {\r\n if (!disc.IsExceedAmount || (disc.IsExceedAmount && totalCharge > disc.ExceedAmount)) {\r\n const discountValue = disc.DiscountValue;\r\n totalAmountForDiscount = totalRentalCharge\r\n if (disc.OtherItems) {\r\n totalAmountForDiscount += totalOtherRentalCharge\r\n }\r\n if (disc.DiscountType == 'Percentage') {\r\n discountTotalAmount += totalAmountForDiscount * (discountValue / 100);\r\n currentDiscountValue = totalAmountForDiscount * (discountValue / 100);\r\n }\r\n else {\r\n discountTotalAmount += discountValue;\r\n currentDiscountValue = discountValue;\r\n }\r\n }\r\n else {\r\n disc.CheckAll = false;\r\n }\r\n }\r\n else {\r\n disc.CheckAll = false;\r\n }\r\n disc.AppliedDiscount = this.customCurrency.transform(currentDiscountValue.toString());\r\n }\r\n else {\r\n disc.AppliedDiscount = this.customCurrency.transform(\"0\");\r\n }\r\n\r\n this.totalDiscountCharge = parseFloat(discountTotalAmount.toFixed(2)).toString()\r\n }\r\n }\r\n else {\r\n // this.rentalForm.controls['vendorBalances'].patchValue({\r\n // totalDiscountCharge: this.customCurrency.transform(\"0\"),\r\n // totalCharge: this.customCurrency.transform((totalChargeWithDue - 0).toString())\r\n // });\r\n }\r\n }\r\n\r\n getWebRentalSetting(){\r\n const sub = this.marketInfoService.getWebRentalSetting(this.marketId).subscribe((res: any) => {\r\n if (res) { \r\n this.defaultPart = res.DefaultLayoutPart; \r\n this.rentalForm.get('marketParts').setValue(this.defaultPart);\r\n this.ApplyBookingFee = res.ApplyBookingFee;\r\n this.ApplyBookingFeeId = res.ApplyBookingFeeId;\r\n this.AllowRentingOtherItems = res.AllowRentingOtherItems;\r\n if (this.ApplyBookingFee) {\r\n this.subscriptions.push(this.rentalService.getBookingFeeById(this.marketId, this.ApplyBookingFeeId).subscribe((resFee: any) => {\r\n if (resFee) {\r\n this.bookingFeeAmount = resFee.OtherItemCharge;\r\n }\r\n }));\r\n }\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n } \r\n\r\n getMarketDays() {\r\n const sub = this.marketInfoService.getMarketDays(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.sunday = res.Sunday;\r\n this.monday = res.Monday;\r\n this.tuesday = res.Tuesday;\r\n this.wednesday = res.Wednesday;\r\n this.thursay = res.Thursday;\r\n this.friday = res.Friday;\r\n this.saturday = res.Saturday;\r\n this.rentalForm.get('marketWeekSunday').setValue(this.sunday);\r\n this.rentalForm.get('marketWeekMonday').setValue(this.monday);\r\n this.rentalForm.get('marketWeekTuesday').setValue(this.tuesday);\r\n this.rentalForm.get('marketWeekWednesday').setValue(this.wednesday);\r\n this.rentalForm.get('marketWeekThursday').setValue(this.thursay);\r\n this.rentalForm.get('marketWeekFriday').setValue(this.friday);\r\n this.rentalForm.get('marketWeekSaturday').setValue(this.saturday); \r\n this.getMonthlyMarketDays();\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n async selectedBoothsFromLayout(data) {\r\n window.scrollTo(0, 0);\r\n this.selectedMonthlyBoothData = data;\r\n this.displayLayout = false; \r\n await this.validateAndAddSelectedBoothsToGrid(); \r\n }\r\n\r\n async validateAndAddSelectedBoothsToGrid() {\r\n let noResale = true;\r\n var rentalDates = [];\r\n var marketDay;\r\n var rentalstartDate;\r\n this.vendorRentalDays = [];\r\n this.marketDayCountForResale = 0;\r\n if ((this.ResaleNumberRequired && !this.exemptResale) || (this.BusinessLicenseNumberRequired)) {\r\n var selectedBoothRecord = this.selectedMonthlyBooths.filter(e => e.NewBooth == true || e.ExtendRental == true);\r\n if (selectedBoothRecord.length > 0) {\r\n selectedBoothRecord.forEach(record => {\r\n for (const el of this.selectedMarketDays) {\r\n const startDate = new Date(record.RentalStartDate);\r\n const endDate = new Date(record.RentalEndDate);\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n const excludedDates = this.excludedMarketDays.map(dateString => new Date(dateString));\r\n while (currentDay <= endDate) {\r\n var exludedDate = excludedDates.some(date => {\r\n return this.datePipe.transform(date, 'MM/dd/yyyy') === this.datePipe.transform(currentDay, 'MM/dd/yyyy');\r\n });\r\n if (currentDay.getDay() === selectedDayOfWeek && !exludedDate) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates); \r\n\r\n rentalDates.map(date => {\r\n const targetDateString = this.datePipe.transform(date.startDate, \"MM/dd/yyyy\");\r\n const dateExist = this.vendorRentalDays.find(el => {\r\n const rentalDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(date.startDate, \"MM/dd/yyyy\");\r\n this.vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n if (this.marketDayCountForResale > this.DaysSellWithoutResaleNumber) {\r\n return; // exits the forEach loop when the condition is met\r\n }\r\n }\r\n });\r\n });\r\n } \r\n \r\n rentalDates=[];\r\n\r\n for (const el of this.selectedMarketDays) {\r\n const startDate = new Date(this.rentalForm.value['monthlyRentalStartDates']);\r\n const endMonth = this.rentalForm.value['rentalEndMonth'];\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n var endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n if (this.combinedMonthlyBookingEndDate) {\r\n const rentalEndDateYear = endDate.getFullYear();\r\n const rentalEndDateMonth = endDate.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n const response = await this.rentalService.GetSelectedMonthEndDate(rentalEndDateYearMonth, this.marketId).toPromise();\r\n endDate = new Date(response.MonthEndDateSelected);\r\n }\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n const excludedDates = this.excludedMarketDays.map(dateString => new Date(dateString));\r\n while (currentDay <= endDate) {\r\n var exludedDate = excludedDates.some(date => {\r\n return this.datePipe.transform(date, 'MM/dd/yyyy') === this.datePipe.transform(currentDay, 'MM/dd/yyyy');\r\n });\r\n if (currentDay.getDay() === selectedDayOfWeek && !exludedDate) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates);\r\n\r\n const apiCalls = rentalDates.map(date => {\r\n const obj = {\r\n VendorID: this.vendorId,\r\n VendorRentalDate: new Date(date.startDate)\r\n };\r\n\r\n return this.rentalService.getVendorRentalDays(obj).pipe(\r\n catchError(error => {\r\n console.error('API call failed for date:', date.startDate, error);\r\n return of([]); // Return an empty array in case of error\r\n })\r\n );\r\n });\r\n\r\n forkJoin(apiCalls).subscribe((responses: any[][]) => {\r\n responses.forEach((res, index) => {\r\n const date = rentalDates[index].startDate;\r\n if (res && res.length > 0) {\r\n res.forEach(el => {\r\n const targetDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n const dateExist = this.vendorRentalDays.find(data => {\r\n const rentalDateString = this.datePipe.transform(data.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n this.vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n }\r\n });\r\n }\r\n\r\n const targetDateString = this.datePipe.transform(date, \"MM/dd/yyyy\");\r\n const dateExist = this.vendorRentalDays.find(el => {\r\n const rentalDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(date, \"MM/dd/yyyy\");\r\n this.vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n }\r\n });\r\n\r\n if (!this.newVendor) {\r\n if (this.ResaleNumberRequired && !this.exemptResale && !this.resaleNo && this.marketDayCountForResale > this.DaysSellWithoutResaleNumber && !this.resaleOptionSelected) {\r\n const modal = this.modalResaleNo.nativeElement;\r\n modal.classList.add('show');\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'block';\r\n this.ResaleOrBusinessHeader = \"Resale Number\"\r\n this.resaleNoDisplay = true;\r\n this.businessLicenseDisplay = false;\r\n }\r\n noResale = false;\r\n }\r\n else if (this.BusinessLicenseNumberRequired && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n if (!this.businessLicenseNumber || !this.businessLicenseExpiryDate) {\r\n const modal = this.modalResaleNo.nativeElement;\r\n modal.classList.add('show');\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'block';\r\n this.ResaleOrBusinessHeader = \"Business License Number\";\r\n this.resaleNoDisplay = false;\r\n this.businessLicenseDisplay = true;\r\n }\r\n noResale = false;\r\n }\r\n else {\r\n if (this.getDateFromDateTime(new Date(this.businessLicenseExpiryDate)) < this.getDateFromDateTime(new Date())) {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Business License is expired! Please contact the market`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n }\r\n else {\r\n noResale = true;\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n else {\r\n if (this.ResaleNumberRequired && !this.exemptResale && !this.resaleNo && this.marketDayCountForResale > this.DaysSellWithoutResaleNumber && !this.resaleOptionSelected) {\r\n this.resaleNoInputRequired.emit(true)\r\n }\r\n if (this.BusinessLicenseNumberRequired && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n this.businessLicenseRequired.emit(true);\r\n }\r\n this.addSelectedBoothsToGrid();\r\n }\r\n });\r\n } else {\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n\r\n getDateFromDateTime(date){\r\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\r\n }\r\n\r\n AddBoothsOnGridOnValidationSucess() {\r\n var addToGrid = false;\r\n var closeModalPopup = false;\r\n const modal = this.modalResaleNo.nativeElement;\r\n if (this.resaleNoDisplay) {\r\n if (!this.resaleNo || this.resaleNo.trim() === '') {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Enter the resale number`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n addToGrid = true;\r\n closeModalPopup = true;\r\n this.resaleOptionSelected = true;\r\n }\r\n\r\n if (closeModalPopup) {\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'none';\r\n modal.classList.remove('show');\r\n }\r\n }\r\n\r\n if (addToGrid) {\r\n const obj = {\r\n VendorID: this.vendorId,\r\n ExemptResaleNo: false,\r\n ExemptResaleReason: \"\",\r\n ResaleNo: this.resaleNo,\r\n MarketId: this.marketId\r\n }\r\n\r\n this.subscriptions.push(this.rentalService.UpdateVendorResaleInfo(obj).subscribe((res: any) => {\r\n }));\r\n }\r\n }\r\n else{\r\n addToGrid = true;\r\n }\r\n\r\n if (addToGrid) {\r\n if (this.BusinessLicenseNumberRequired && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n var addToGrid = false;\r\n var closeModalPopup = false;\r\n if ((!this.businessLicenseNumber || this.businessLicenseNumber.trim() === '') || !this.businessLicenseExpiryDate) {\r\n this.ResaleOrBusinessHeader = \"Business License Number\"\r\n const modal = this.modalResaleNo.nativeElement;\r\n this.resaleNoDisplay = false; \r\n this.businessLicenseDisplay = true;\r\n modal.classList.add('show');\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'block';\r\n this.ResaleOrBusinessHeader = \"Business License Number\" \r\n }\r\n }\r\n else if (this.getDateFromDateTime(new Date(this.businessLicenseExpiryDate)) < this.getDateFromDateTime(new Date())) {\r\n this.closeResaleModal();\r\n Swal.fire({\r\n text: $localize`Business License is expired! Please contact the market.`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n addToGrid = true;\r\n this.closeResaleModal();\r\n if (this.businessLicenseDisplay) {\r\n const obj = {\r\n VendorID: this.vendorId,\r\n LicenseNameId: 1,\r\n LicenseName: \"\",\r\n ExpiryDate: new Date(this.businessLicenseExpiryDate),\r\n LicenseNumber: this.businessLicenseNumber\r\n }\r\n \r\n this.subscriptions.push(this.rentalService.updateVendorBusinessLicense(this.marketId, obj).subscribe((res: any) => {\r\n }));\r\n }\r\n this.addSelectedBoothsToGrid();\r\n } \r\n }\r\n else {\r\n addToGrid = true;\r\n closeModalPopup = true;\r\n this.addSelectedBoothsToGrid();\r\n }\r\n }\r\n }\r\n addSelectedBoothsToGrid() {\r\n this.selectedBoothsForRental = [];\r\n if (this.selectedMonthlyBoothData) { \r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedMonthlyBoothData.map(async (el, i) => { \r\n const endMonth = this.rentalForm.value['rentalEndMonth'];\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n var endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n if (this.combinedMonthlyBookingEndDate) {\r\n const rentalEndDateYear = endDate.getFullYear();\r\n const rentalEndDateMonth = endDate.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n const response = await this.rentalService.GetSelectedMonthEndDate(rentalEndDateYearMonth, this.marketId).toPromise();\r\n endDate = new Date(response.MonthEndDateSelected);\r\n }\r\n\r\n var obj = {\r\n BoothTypeId: el.BoothTypeId,\r\n VendorId: this.vendorId,\r\n RentalStartPeriod: new Date(this.rentalForm.value['monthlyRentalStartDates']),\r\n RentalEndPeriod: endDate,\r\n PerDiemApplicable: this.perDiemRentApplicable? true: false,\r\n WRNewVendorRequest: this.newVendor\r\n }\r\n \r\n this.rentalService.getBoothRentalCombinedMonthlyCharges(this.marketId, obj).subscribe((res: any) => {\r\n var newbooths = [];\r\n var vendorProducts = !this.newVendor ? this.vendorProducts.filter(x => x.Priority) ? this.vendorProducts.filter(x => x.Priority)[0].ProductId : this.vendorProducts[0].ProductId:\"\";\r\n const ob = {\r\n MonthlyRentalId: 0,\r\n BoothNumber: el.BoothNumber,\r\n BoothType: el.BoothType,\r\n BoothTypeId: el.BoothTypeId,\r\n BoothDescription: el.BoothDescription,\r\n Product: vendorProducts,\r\n RentStartPeriod: this.rentalForm.value['rentalStartMonth'],\r\n RentEndPeriod: this.rentalForm.value['rentalEndMonth'],\r\n RentalStartDate: el.RentalStartDate,\r\n RentalEndDate: el.RentalEndDate,\r\n RentalSavedEndDate: el.RentalEndDate,\r\n MktDays: el.NoOfMarketDays,\r\n PerDiem: this.perDiemRentApplicable? true: false,\r\n PerDiemRent:this.customCurrency.transform(res.PerdiemRent),\r\n Rent: this.customCurrency.transform(res.Rent),\r\n SalesTax: this.customCurrency.transform(res.SalesTax),\r\n CityTax: this.customCurrency.transform(res.CityTax),\r\n Sunday: el.Sunday,\r\n Monday: el.Monday,\r\n Tuesday: el.Tuesday,\r\n Wednesday: el.Wednesday,\r\n Thursday: el.Thursday,\r\n Friday: el.Friday,\r\n Saturday: el.Saturday,\r\n Reservation: true,\r\n Drop: false,\r\n January: this.customCurrency.transform(res.JanRent),\r\n February: this.customCurrency.transform(res.FebRent),\r\n March: this.customCurrency.transform(res.MarRent),\r\n April: this.customCurrency.transform(res.AprRent),\r\n May: this.customCurrency.transform(res.MayRent),\r\n June: this.customCurrency.transform(res.JunRent),\r\n July: this.customCurrency.transform(res.JulRent),\r\n August: this.customCurrency.transform(res.AugRent),\r\n September: this.customCurrency.transform(res.SepRent),\r\n October: this.customCurrency.transform(res.OctRent),\r\n November: this.customCurrency.transform(res.NovRent),\r\n December: this.customCurrency.transform(res.DecRent),\r\n JanuaryMonthPresent: res.JanuaryMonthPresent,\r\n FebruaryMonthPresent: res.FebruaryMonthPresent,\r\n MarchMonthPresent: res.MarchMonthPresent,\r\n AprilMonthPresent: res.AprilMonthPresent,\r\n MayMonthPresent: res.MayMonthPresent,\r\n JuneMonthPresent: res.JuneMonthPresent,\r\n JulyMonthPresent: res.JulyMonthPresent,\r\n AugustMonthPresent: res.AugustMonthPresent,\r\n SeptemberMonthPresent: res.SeptemberMonthPresent,\r\n OctoberMonthPresent: res.OctoberMonthPresent,\r\n NovemberMonthPresent: res.NovemberMonthPresent,\r\n DecemberMonthPresent: res.DecemberMonthPresent,\r\n DisableJanMonth: res.JanRent != null ?false:true, \r\n DisableFebMonth: res.FebRent != null ?false:true, \r\n DisableMarMonth: res.MarRent != null ?false:true, \r\n DisableAprMonth: res.AprRent != null ?false:true, \r\n DisableMayMonth: res.MayRent != null ?false:true, \r\n DisableJunMonth: res.JunRent != null ?false:true, \r\n DisableJulMonth: res.JulRent != null ?false:true, \r\n DisableAugMonth: res.AugRent != null ?false:true, \r\n DisableSepMonth: res.SepRent != null ?false:true, \r\n DisableOctMonth: res.OctRent != null ?false:true, \r\n DisableNovMonth: res.NovRent != null ?false:true, \r\n DisableDecMonth: res.DecRent != null ?false:true,\r\n Status: \"N\", \r\n StartDateList:el.StartDateList,\r\n DiasbleStartDate: false, \r\n NewBooth: true,\r\n ExtendRental: false,\r\n AllRentalDates: el.AllRentalDates,\r\n TaxModel: res.TaxModel\r\n }\r\n this.totalRentalCharge += res.Rent.toString().includes('(') && res.Rent.toString().includes(')') ? -1 * parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.getDiscounts();\r\n this.getMarketDays();\r\n this.gridMonthlyRental.refresh();\r\n newbooths.push(JSON.parse(JSON.stringify(ob)));\r\n this.selectedMonthlyBooths = this.selectedMonthlyBooths.concat(newbooths);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n }); \r\n this.isdirty = true;\r\n this.isFormDirty.emit(true); \r\n });\r\n\r\n this.loaderIcon = Promise.resolve(false);\r\n // this.refreshAddBooth();\r\n }\r\n }\r\n\r\n created(args) {\r\n if(this.newVendor){\r\n this.gridMonthlyRental.getColumnByField(\"Product\").visible = false;\r\n }\r\n }\r\n\r\n otherItemUpdate(selectedItems) {\r\n if (selectedItems.isOtherItemChecked) {\r\n const index = this.selectedOtherCharges.findIndex(item => item.Id === selectedItems.Id && item.RentalMonth, \"MM/dd/YYYY\" == this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth']);\r\n const isNegative = selectedItems.OtherItemCharge.includes('(') && selectedItems.OtherItemCharge.includes(')');\r\n const totalValue = parseFloat(selectedItems.OtherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n selectedItems.OtherItemCharge = this.customCurrency.transform(finalCharge.toString())\r\n selectedItems.OtherItemtotal = this.customCurrency.transform((finalCharge * selectedItems.Quantity).toString())\r\n if (index !== -1) {\r\n var obj = {\r\n Id: selectedItems.Id,\r\n OtherItem: selectedItems.OtherItem,\r\n OtherItemCharge: selectedItems.OtherItemCharge,\r\n Quantity: selectedItems.Quantity,\r\n OtherItemtotal: selectedItems.OtherItemtotal,\r\n othChgBooths: selectedItems.othChgBooths,\r\n Recurring: selectedItems.Recurring,\r\n RentalMonth: this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth'],\r\n Reference: selectedItems.Reference\r\n };\r\n this.selectedOtherCharges[index] = obj;\r\n }\r\n else {\r\n var objNew = {\r\n Id: selectedItems.Id,\r\n OtherItem: selectedItems.OtherItem,\r\n OtherItemCharge: selectedItems.OtherItemCharge,\r\n Quantity: selectedItems.Quantity,\r\n OtherItemtotal: selectedItems.OtherItemtotal,\r\n othChgBooths: selectedItems.othChgBooths,\r\n Recurring: selectedItems.Recurring,\r\n RentalMonth: this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth'],\r\n Reference: selectedItems.Reference\r\n };\r\n this.selectedOtherCharges.push(objNew);\r\n }\r\n }\r\n }\r\n\r\n refreshAddBooth() {\r\n this.getMarketDays();\r\n this.selectedMonthlyBoothData = [];\r\n if (this.selectedBoothsForRental.length > 0) {\r\n this.selectedBoothsForRental.forEach(ele => {\r\n const temp = {\r\n TempRecordNo: this.tempRecordNo.toString(),\r\n BoothNumber: ele.BoothNumber,\r\n StartDate: new Date(ele.StartDate),\r\n RentalType: 4,\r\n EndDate: new Date(ele.EndDate),\r\n Sunday: this.rentalForm.value['marketWeekSunday'],\r\n Monday: this.rentalForm.value['marketWeekMonday'],\r\n Tuesday: this.rentalForm.value['marketWeekTuesday'],\r\n Wednesday: this.rentalForm.value['marketWeekWednesday'],\r\n Thursday: this.rentalForm.value['marketWeekThursday'],\r\n Friday: this.rentalForm.value['marketWeekFriday'],\r\n Saturday: this.rentalForm.value['marketWeekSaturday'],\r\n }\r\n this.subscriptions.push(\r\n this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n });\r\n }\r\n this.selectedBoothsForRental = [];\r\n this.rentalForm.reset();\r\n this.rentalForm.patchValue({\r\n rentalStartMonth: this.monthlyMarketDays[0].RentalMonths,\r\n rentalEndMonth: this.monthlyMarketDays[0].RentalMonths,\r\n marketParts: this.defaultPart\r\n })\r\n }\r\n\r\n getMonthlyMarketDays() {\r\n forkJoin({\r\n response: this.marketInfoService.getMonthlyMarketDays(this.marketId),\r\n resRentalSettings: this.rentalService.getRentalSettings(this.marketId)\r\n }).subscribe(\r\n async ({ response, resRentalSettings }: any) => {\r\n if (response) {\r\n this.monthlyMarketDays = response;\r\n this.rentalForm.patchValue({\r\n rentalStartMonth: response[0].RentalMonths,\r\n rentalEndMonth: response[0].RentalMonths,\r\n }); \r\n this.rentalForm.controls['otherItemsScreen'].patchValue({\r\n otherChargeMarketMonth: response[0].RentalMonths\r\n }); \r\n }\r\n\r\n if (resRentalSettings) {\r\n this.combinedMonthlyBookingEndDate = resRentalSettings.CombinedMonthlyBookingEndDate;\r\n if (this.combinedMonthlyBookingEndDate) {\r\n const currentDate = new Date();\r\n const currentYear = currentDate.getFullYear();\r\n const currentMonth = currentDate.getMonth();\r\n const currentYearMonth = `${currentYear}${(currentMonth + 1) < 10 ? '0' : ''}${(currentMonth + 1)}`;\r\n const resMonthEnd = await this.rentalService.GetSelectedMonthEndDate(currentYearMonth,this.marketId).toPromise();\r\n const currentMonthEndDate = new Date(resMonthEnd.MonthEndDateSelected);\r\n if (currentMonthEndDate <= new Date(currentDate)) {\r\n var currentDateYearAndMonth = this.datePipe.transform(currentDate, 'MMMM yyyy');\r\n this.monthlyMarketDays = response.filter(e => e.RentalMonths != currentDateYearAndMonth)\r\n this.rentalForm.patchValue({\r\n rentalStartMonth: this.monthlyMarketDays[0].RentalMonths,\r\n rentalEndMonth: this.monthlyMarketDays[0].RentalMonths,\r\n }) \r\n }\r\n }\r\n } \r\n this.selectedMonthlyMarketDays(); \r\n }, (err) => {\r\n });\r\n }\r\n\r\n closeResaleModal(){\r\n const modal = this.modalResaleNo.nativeElement;\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'none';\r\n modal.classList.remove('show');\r\n }\r\n }\r\n\r\n checkRentalMonths() {\r\n if (this.rentalForm.value['rentalStartMonth'] && this.rentalForm.value['rentalEndMonth']) {\r\n const startMonth = this.rentalForm.value['rentalStartMonth'];\r\n const endMonth = this.rentalForm.value['rentalEndMonth'];\r\n const [startMonthDate, startYear] = startMonth.split(' ');\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const startMonthIndex = this.getMonthIndex(startMonthDate);\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n if (endMonthYear < startYear || (endMonthYear == startYear && endMonthIndex < startMonthIndex)) {\r\n this.rentalForm.get('rentalEndMonth').setValue(startMonth);\r\n } \r\n this.selectedMonthlyMarketDays(); \r\n }\r\n } \r\n\r\n closeLayoutForm() {\r\n this.displayLayout = false;\r\n this.getMarketDays();\r\n }\r\n\r\n onCheckNumKeyPress(event: KeyboardEvent) {\r\n const allowedChars = /[0-9]/g;\r\n const key = event.key;\r\n if (event.key === 'Backspace' || event.key === 'Delete' || event.key === 'ArrowLeft' || event.key === 'ArrowRight' || event.key === '#') {\r\n return;\r\n }\r\n if (!key.match(allowedChars)) {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n updateOtherItem(data) {\r\n if (parseFloat(data.Quantity) == 0) {\r\n data.Quantity = \"1\"\r\n }\r\n this.totalSalesTax -= data.SalesTax.toString().includes('(') && data.SalesTax.toString().includes(')') ? -1 * parseFloat(data.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= data.CityTax.toString().includes('(') && data.CityTax.toString().includes(')') ? -1 * parseFloat(data.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalOtherRentalCharge -= data.OtherItemtotal.toString().includes('(') && data.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n\r\n var index;\r\n if (data.NewItem == true)\r\n index = this.selectedOtherItems.findIndex(oth => oth.Id === data.Id && oth.RentalMonth == data.RentalMonth && oth.NewItem == true && oth.BoothNo == data.BoothNo);\r\n else\r\n index = this.selectedOtherItems.findIndex(oth => oth.Id === data.Id && oth.RentalMonth == data.RentalMonth && oth.MonthlyRentalIds == data.MonthlyRentalIds && oth.BoothNo == data.BoothNo);\r\n\r\n if (index !== -1) {\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: data.Id,\r\n VendorId: this.vendorId,\r\n Quantity: data.Quantity,\r\n OtherItemCharge: data.OtherItemCharge.includes('(') && data.OtherItemCharge.includes(')') ? (-1) * parseFloat(data.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n WRNewVendorRequest: this.newVendor\r\n }\r\n this.rentalService.getOtherItemsRentalCharges(obj).subscribe((res: any) => {\r\n this.selectedOtherItems[index].SalesTax = this.customCurrency.transform(res.SalesTax.toString());\r\n this.selectedOtherItems[index].CityTax = this.customCurrency.transform(res.CityTax.toString());\r\n const isNegative = data.OtherItemCharge.includes('(') && data.OtherItemCharge.includes(')');\r\n const totalValue = parseFloat(data.OtherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n data.OtherItemtotal = this.customCurrency.transform((finalCharge * data.Quantity).toString());\r\n this.selectedOtherItems[index].OtherItemtotal = data.OtherItemtotal;\r\n this.selectedOtherItems[index].OtherItemCharge = this.customCurrency.transform((finalCharge).toString());\r\n this.selectedOtherItems[index].Recurring = data.Recurring;\r\n this.selectedOtherItems[index].Reference = data.Reference;\r\n this.selectedOtherItems[index].Quantity = data.Quantity;\r\n this.selectedOtherItems[index].SalesTax = this.customCurrency.transform(res.SalesTax.toString());\r\n this.selectedOtherItems[index].CityTax = this.customCurrency.transform(res.CityTax.toString());\r\n this.gridOtherRental.refresh();\r\n this.totalOtherRentalCharge += data.OtherItemtotal.toString().includes('(') && data.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.getDiscounts();\r\n });\r\n }\r\n }\r\n\r\n selectedMonthlyMarketDays() {\r\n this.selectedMarketDays = [];\r\n this.rentalForm.value['marketWeekSunday'] == true ? this.selectedMarketDays.push(1) : 0;\r\n this.rentalForm.value['marketWeekMonday'] == true ? this.selectedMarketDays.push(2) : 0;\r\n this.rentalForm.value['marketWeekTuesday'] == true ? this.selectedMarketDays.push(3) : 0;\r\n this.rentalForm.value['marketWeekWednesday'] == true ? this.selectedMarketDays.push(4) : 0;\r\n this.rentalForm.value['marketWeekThursday'] == true ? this.selectedMarketDays.push(5) : 0;\r\n this.rentalForm.value['marketWeekFriday'] == true ? this.selectedMarketDays.push(6) : 0;\r\n this.rentalForm.value['marketWeekSaturday'] == true ? this.selectedMarketDays.push(7) : 0;\r\n this.monthlyRentalStartDates = [];\r\n this.selectedMarketDays.map(async (el, i) => { \r\n const currentDate = new Date();\r\n const currentYear = currentDate.getFullYear();\r\n const currentMonth = currentDate.getMonth();\r\n const currentYearMonth = `${currentYear}${(currentMonth +1) < 10 ? '0' : ''}${(currentMonth +1)}`;\r\n const startMonth = this.rentalForm.value['rentalStartMonth'];\r\n const endMonth = this.rentalForm.value['rentalEndMonth'];\r\n const [startMonthDate, startYear] = startMonth.split(' ');\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const excludedDates = this.excludedMarketDays.map(dateString => new Date(dateString));\r\n const startMonthIndex = this.getMonthIndex(startMonthDate);\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n var startDate;\r\n if (startYear === currentYear.toString() && startMonthIndex === currentMonth)\r\n startDate = currentDate\r\n else\r\n startDate = new Date(startYear, startMonthIndex, 1);\r\n var endDate = this.combinedMonthlyBookingEndDate ?new Date(startYear, startMonthIndex + 1, 0) : new Date(endMonthYear, endMonthIndex + 1, 0);\r\n if (this.combinedMonthlyBookingEndDate) {\r\n const rentalEndDateYear = endDate.getFullYear();\r\n const rentalEndDateMonth = endDate.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n const response = await this.rentalService.GetSelectedMonthEndDate(rentalEndDateYearMonth,this.marketId).toPromise();\r\n endDate = new Date(response.MonthEndDateSelected);\r\n\r\n //checking for previous MonthEnd date\r\n const rentalStartDate = new Date(startDate);\r\n var previousMonth = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() - 1)).getMonth() + 1;\r\n var PreviousMonthYear = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() - 1)).getFullYear();\r\n const PreviousMonthYearAndMonth = `${PreviousMonthYear}${previousMonth < 10 ? '0' : ''}${previousMonth}`;\r\n // if (PreviousMonthYearAndMonth >= currentYearMonth) {\r\n const previousMonthEndDate = await this.rentalService.GetSelectedMonthEndDate(PreviousMonthYearAndMonth,this.marketId).toPromise();\r\n const monthEndDate = new Date(previousMonthEndDate.MonthEndDateSelected);\r\n const dateDiff = this.getDaysDifference(monthEndDate, new Date(startDate)); //calculates the diff between current month start date and previous monthend date \r\n if (dateDiff <= 7 && new Date(monthEndDate) < startDate) {\r\n if (new Date() > new Date(monthEndDate)) {\r\n startDate = new Date();\r\n }\r\n else {\r\n startDate = new Date(monthEndDate.setDate(monthEndDate.getDate() + 1));\r\n }\r\n }\r\n\r\n if (new Date(endDate) < new Date(startDate)) {\r\n const rentalStartDate = new Date(startDate);\r\n var nextMonth = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() + 1)).getMonth() + 1;\r\n var nextMonthYear = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() + 1)).getFullYear();\r\n const nextMonthYearAndMonth = `${nextMonthYear}${nextMonth < 10 ? '0' : ''}${nextMonth}`;\r\n const nextMonthEndDate = await this.rentalService.GetSelectedMonthEndDate(nextMonthYearAndMonth, this.marketId).toPromise();\r\n endDate = new Date(nextMonthEndDate.MonthEndDateSelected);\r\n }\r\n // }\r\n }\r\n\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (new Date(this.datePipe.transform(currentDay,'MM/dd/yyyy')) <= new Date(this.datePipe.transform(endDate,'MM/dd/yyyy'))) {\r\n var exludedDate = excludedDates.some(date => {\r\n return this.datePipe.transform(date, 'MM/dd/yyyy') === this.datePipe.transform(currentDay, 'MM/dd/yyyy');\r\n });\r\n if (currentDay.getDay() === selectedDayOfWeek && !exludedDate) {\r\n this.monthlyRentalStartDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = this.monthlyRentalStartDates.sort(compareDates);\r\n if (this.monthlyRentalStartDates && this.monthlyRentalStartDates.length > 0)\r\n this.rentalForm.get('monthlyRentalStartDates').setValue(this.monthlyRentalStartDates[0].startDate);\r\n });\r\n }\r\n\r\n getDaysDifference(date1: Date, date2: Date): number {\r\n // Normalize both dates to start of the day (midnight)\r\n const start = new Date(date1.getFullYear(), date1.getMonth(), date1.getDate());\r\n const end = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());\r\n // Calculate the difference in time (milliseconds)\r\n const timeDiff = Math.abs(end.getTime() - start.getTime());\r\n // Convert time difference from milliseconds to days\r\n const dayDiff = Math.ceil(timeDiff / (1000 * 3600 * 24));\r\n return dayDiff;\r\n }\r\n\r\n getMonthIndex(monthString: string): number {\r\n const months = [\r\n 'January', 'February', 'March', 'April', 'May', 'June',\r\n 'July', 'August', 'September', 'October', 'November', 'December'\r\n ];\r\n const monthIndex = months.findIndex(month => month.toLowerCase() === monthString.toLowerCase());\r\n return monthIndex !== -1 ? monthIndex : 0;\r\n }\r\n\r\n cancelRental() {\r\n if (this.isdirty) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Unsaved changes will be lost. Are you sure you want to cancel?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.isFormDirty.emit(false);\r\n this.isCancelClicked.emit('4');\r\n } else {\r\n //do nothing\r\n }\r\n });\r\n } else {\r\n this.isFormDirty.emit(false);\r\n this.isCancelClicked.emit('4');\r\n }\r\n }\r\n\r\n toggleDaySelection(day: string, event: any) {\r\n this.selectedMarketDays.map((el, i) => {\r\n switch (el) {\r\n case 1: this.rentalForm.get('marketWeekSunday').setValue(true);\r\n break;\r\n case 2: this.rentalForm.get('marketWeekMonday').setValue(true);\r\n break;\r\n case 3: this.rentalForm.get('marketWeekTuesday').setValue(true);\r\n break;\r\n case 4: this.rentalForm.get('marketWeekWednesday').setValue(true);\r\n break;\r\n case 5: this.rentalForm.get('marketWeekThursday').setValue(true);\r\n break;\r\n case 6: this.rentalForm.get('marketWeekFriday').setValue(true);\r\n break;\r\n case 7: this.rentalForm.get('marketWeekSaturday').setValue(true);\r\n break;\r\n }\r\n });\r\n }\r\n\r\n checkMarketDaysSelected() {\r\n const sunday = this.rentalForm.value['marketWeekSunday'];\r\n const monday = this.rentalForm.value['marketWeekMonday'];\r\n const tuesday = this.rentalForm.value['marketWeekTuesday'];\r\n const wednesday = this.rentalForm.value['marketWeekWednesday'];\r\n const thursday = this.rentalForm.value['marketWeekThursday'];\r\n const friday = this.rentalForm.value['marketWeekFriday'];\r\n const saturday = this.rentalForm.value['marketWeekSaturday'];\r\n return sunday || monday || tuesday || wednesday || thursday || friday || saturday;\r\n }\r\n\r\n openLayout() {\r\n this.layoutParts = this.rentalForm.value['marketParts'];\r\n var marketDaysSelected = this.checkMarketDaysSelected();\r\n if (!marketDaysSelected) {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Please select a market day!`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n if (this.selectedMarketDays.length > 0) {\r\n this.selectedDates = [];\r\n this.selectedMarketDays.map(async (el, i) => {\r\n const startDate = new Date(this.rentalForm.value['monthlyRentalStartDates']);\r\n const endMonth = this.rentalForm.value['rentalEndMonth'];\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n var endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n if (this.combinedMonthlyBookingEndDate) {\r\n const rentalEndDateYear = endDate.getFullYear();\r\n const rentalEndDateMonth = endDate.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n const response = await this.rentalService.GetSelectedMonthEndDate(rentalEndDateYearMonth,this.marketId).toPromise();\r\n endDate = new Date(response.MonthEndDateSelected);\r\n }\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n this.selectedDates.push(this.datePipe.transform(new Date(currentDay), 'MM/dd/yyyy'));\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n\r\n const compareDates = (a, b): number => {\r\n const dateA = new Date(a.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = this.selectedDates.sort(compareDates);\r\n });\r\n }\r\n this.MonthlyLayoutData = {\r\n Sunday: this.rentalForm.value['marketWeekSunday'],\r\n Monday: this.rentalForm.value['marketWeekMonday'],\r\n Tuesday: this.rentalForm.value['marketWeekTuesday'],\r\n Wednesday: this.rentalForm.value['marketWeekWednesday'],\r\n Thursday: this.rentalForm.value['marketWeekThursday'],\r\n Friday: this.rentalForm.value['marketWeekFriday'],\r\n Saturday: this.rentalForm.value['marketWeekSaturday'],\r\n monthlyRentalStartDate: this.rentalForm.value['rentalStartMonth'],\r\n monthlyRentalEndDate: this.rentalForm.value['rentalEndMonth'],\r\n monthlyRentalMarketDays: this.selectedMarketDays,\r\n selectedDates: this.selectedDates,\r\n monthlyRentalSelectedBooths: this.selectedMonthlyBooths.filter(e => e.NewBooth == true),\r\n RentalStartDate: this.datePipe.transform(new Date(this.rentalForm.value['monthlyRentalStartDates']), 'MM/dd/yyyy'),\r\n RentalEndDate: this.datePipe.transform(new Date(this.monthlyRentalStartDates[this.monthlyRentalStartDates.length - 1].startDate), 'MM/dd/yyyy'),\r\n tempRecordNo: this.tempRecordNo,\r\n combinedMonthlyBookingEndDate: this.combinedMonthlyBookingEndDate\r\n }\r\n this.displayLayout = true;\r\n }\r\n } \r\n\r\n searchOtherItem() {\r\n this.otherRentalCharges = this.otherItemList;\r\n const otherItemSearchText = this.rentalForm.controls['otherItemsScreen'].value['otherItemSearchText'];\r\n if (otherItemSearchText != '') {\r\n this.otherRentalCharges = this.otherItemList.filter((ele) => ele.OtherItem.toString().toLowerCase().indexOf(otherItemSearchText.toLowerCase()) !== -1);\r\n }\r\n }\r\n\r\n disableSavePayment() {\r\n var vendorBalance = this.priorBalance + this.totalCharge;\r\n if (vendorBalance > 0) {\r\n return false\r\n }\r\n else\r\n return true\r\n }\r\n\r\n addOtherCharges() {\r\n if (this.selectedOtherCharges) {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedOtherCharges.map((el, i) => {\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: el.Id,\r\n VendorId: this.vendorId,\r\n Quantity: el.Quantity,\r\n OtherItemCharge: el.OtherItemCharge.includes('(') && el.OtherItemCharge.includes(')') ? (-1) * parseFloat(el.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(el.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n WRNewVendorRequest: this.newVendor\r\n }\r\n const index = this.selectedOtherItems.findIndex(item => item.Id === el.Id && item.RentalMonth == this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth'] && item.NewItem == true && item.BoothNo === el.othChgBooths);\r\n this.rentalService.getOtherItemsRentalCharges(obj).subscribe((res: any) => {\r\n var newItem = [];\r\n if (index !== -1) {\r\n var otherItemTotal = this.selectedOtherItems[index].OtherItemtotal;\r\n var salesTax = this.selectedOtherItems[index].SalesTax;\r\n var cityTax = this.selectedOtherItems[index].CityTax;\r\n this.totalOtherRentalCharge -= otherItemTotal.toString().includes('(') && otherItemTotal.toString().includes(')') ? -1 * parseFloat(otherItemTotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(otherItemTotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= salesTax.toString().includes('(') && salesTax.toString().includes(')') ? -1 * parseFloat(salesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(salesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= cityTax.toString().includes('(') && cityTax.toString().includes(')') ? -1 * parseFloat(cityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(cityTax.toString().replace(/[^0-9.-]/g, ''));\r\n var priorBalance = this.rentalForm.controls['vendorBalances'].value['vendorPriorBalance'].toString().includes('(') && this.rentalForm.controls['vendorBalances'].value['vendorPriorBalance'].toString().includes(')') ? -1 * parseFloat(this.rentalForm.controls['vendorBalances'].value['vendorPriorBalance'].toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.rentalForm.controls['vendorBalances'].value['vendorPriorBalance'].toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.rentalForm.controls['vendorBalances'].patchValue({\r\n totalOtherRentalCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n const ob = {\r\n Id: el.Id,\r\n MonthOtherRentalId: 0,\r\n OtherItem: el.OtherItem,\r\n Quantity: el.Quantity,\r\n OtherItemtotal: el.OtherItemtotal,\r\n OtherItemCharge: el.OtherItemCharge,\r\n RentalMonth: el.RentalMonth,\r\n SalesTax: this.customCurrency.transform(res.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(res.CityTax.toString()),\r\n BoothNo: el.othChgBooths,\r\n Recurring: el.Recurring,\r\n Reference: el.Reference,\r\n NewItem: true,\r\n MonthlyRentalIds: ''\r\n }\r\n this.selectedOtherItems[index] = ob;\r\n this.gridOtherRental.refresh();\r\n }\r\n else {\r\n const ob = {\r\n Id: el.Id,\r\n MonthOtherRentalId: 0,\r\n OtherItem: el.OtherItem,\r\n OtherItemCharge: el.OtherItemCharge,\r\n Quantity: el.Quantity,\r\n OtherItemtotal: el.OtherItemtotal,\r\n RentalMonth: el.RentalMonth,\r\n SalesTax: this.customCurrency.transform(res.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(res.CityTax.toString()),\r\n BoothNo: el.othChgBooths,\r\n Recurring: el.Recurring,\r\n Reference: el.Reference,\r\n NewItem: true,\r\n MonthlyRentalIds: ''\r\n }\r\n newItem.push(JSON.parse(JSON.stringify(ob)));\r\n this.isdirty = true;\r\n this.isFormDirty.emit(true);\r\n }\r\n\r\n this.totalOtherRentalCharge += el.OtherItemtotal.toString().includes('(') && el.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(el.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(el.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n\r\n this.getDiscounts();\r\n if (newItem.length > 0) {\r\n this.selectedOtherItems = this.selectedOtherItems.concat(newItem);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n });\r\n this.loaderIcon = Promise.resolve(false);\r\n const modal = this.modalMonthlyOtherCharges.nativeElement;\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'none';\r\n modal.classList.remove('show');\r\n }\r\n }\r\n }\r\n\r\n async getBoothsAndItemsForOtherCharges() {\r\n this.boothsForOtherCharge = [];\r\n this.selectedOtherCharges = [];\r\n if (this.OtherChargesPeriod) {\r\n this.otherRentalCharges = [];\r\n this.otherItemList = [];\r\n await this.getOtherRentalItems();\r\n }\r\n if (this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth']) {\r\n this.selectedMonthlyBooths.forEach((item) => {\r\n if (item.RentStartPeriod == this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth']) {\r\n this.boothsForOtherCharge.push({ BoothNumber: item.BoothNumber })\r\n }\r\n });\r\n }\r\n this.boothsForOtherCharge.sort((a, b) => {\r\n if (a.BoothNumber < b.BoothNumber) {\r\n return -1;\r\n }\r\n if (a.BoothNumber > b.BoothNumber) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n }\r\n\r\n isDateSelected(item: any): boolean {\r\n var isItemSelected = this.selectedOtherItems.some(\r\n (element) =>\r\n (element.RentalMonth === this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth']) &&\r\n element.Id === item.Id && element.NewItem == true\r\n );\r\n\r\n if(!isItemSelected){\r\n isItemSelected = this.selectedOtherCharges.some(\r\n (element) =>\r\n (element.RentalMonth === this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth']) &&\r\n element.Id === item.Id\r\n );\r\n }\r\n\r\n !isItemSelected? item.otherItemChecked = false : item.otherItemChecked = true;\r\n item.othChgBooths = \"none\";\r\n return isItemSelected;\r\n }\r\n\r\n setDefaultRentalItem(args, selectedItems) {\r\n selectedItems.Quantity = 0\r\n selectedItems.OtherItemtotal = 0\r\n if (args.srcElement.checked) {\r\n selectedItems.true = true;\r\n selectedItems.Quantity = 1\r\n const isNegative = selectedItems.OtherItemCharge.includes('(') && selectedItems.OtherItemCharge.includes(')');\r\n const totalValue = parseFloat(selectedItems.OtherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n selectedItems.OtherItemtotal = this.customCurrency.transform((finalCharge * selectedItems.Quantity).toString());\r\n this.selectedOtherCharges.push({\r\n Id: selectedItems.Id,\r\n OtherItem: selectedItems.OtherItem,\r\n OtherItemCharge: selectedItems.OtherItemCharge,\r\n Quantity: selectedItems.Quantity,\r\n OtherItemtotal: selectedItems.OtherItemtotal,\r\n othChgBooths: selectedItems.othChgBooths,\r\n Recurring: selectedItems.Recurring,\r\n RentalMonth: this.rentalForm.controls['otherItemsScreen'].value['otherChargeMarketMonth']\r\n });\r\n } else {\r\n selectedItems.true = false;\r\n const index = this.selectedOtherCharges.findIndex(item => item.Id === selectedItems.Id);\r\n if (index !== -1) {\r\n this.selectedOtherCharges.splice(index, 1);\r\n }\r\n }\r\n }\r\n\r\n deleteSelectedBooth(data) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to delete the selected Booth?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n const index = this.selectedMonthlyBooths.findIndex(selectedBooth => selectedBooth.BoothNumber === data.BoothNumber && selectedBooth.RentStartPeriod == data.RentStartPeriod && selectedBooth.RentEndPeriod == data.RentEndPeriod);\r\n if (index !== -1) {\r\n this.selectedMonthlyBooths.splice(index, 1);\r\n }\r\n if (this.tempRecordNo) {\r\n const temp = {\r\n TempRecordNo: this.tempRecordNo.toString(),\r\n BoothNumber: data.BoothNumber,\r\n StartDate: new Date(data.RentalStartDate),\r\n RentalType: 4,\r\n EndDate: new Date(data.RentalEndDate),\r\n Sunday: data.Sunday,\r\n Monday: data.Monday,\r\n Tuesday: data.Tuesday,\r\n Wednesday: data.Wednesday,\r\n Thursday: data.Thursday,\r\n Friday: data.Friday,\r\n Saturday: data.Saturday\r\n }\r\n this.subscriptions.push(this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n }));\r\n }\r\n this.totalRentalCharge -= data.Rent.includes('(') && data.Rent.includes(')') ? -1 * parseFloat(data.Rent.replace(/[^0-9.-]/g, '')) : parseFloat(data.Rent.replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= data.SalesTax.includes('(') && data.SalesTax.includes(')') ? -1 * parseFloat(data.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.SalesTax.replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= data.CityTax.includes('(') && data.CityTax.includes(')') ? -1 * parseFloat(data.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.CityTax.replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.getDiscounts();\r\n this.gridMonthlyRental.refresh();\r\n }\r\n });\r\n }\r\n\r\n deleteOtherRentalCharges(data) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to delete the selected Other Charges?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n const index = this.selectedOtherItems.findIndex(oth => oth.Id === data.Id && oth.RentalMonth == data.RentalMonth);\r\n if (index !== -1) {\r\n this.selectedOtherItems.splice(index, 1);\r\n }\r\n\r\n var selectedItems = this.otherRentalCharges.findIndex(item => item.Id == data.Id);\r\n if (selectedItems != -1) {\r\n this.rentalService.getOtherRentalItems(this.marketId).subscribe((response) => {\r\n if (response) {\r\n const masterChargeRecord = response.filter(item => item.OtherItemId == data.Id);\r\n if (masterChargeRecord) {\r\n this.otherRentalCharges[selectedItems].Quantity = 0;\r\n this.otherRentalCharges[selectedItems].othChgBooths = \"none\";\r\n this.otherRentalCharges[selectedItems].OtherItemCharge = this.customCurrency.transform(masterChargeRecord[0].OtherItemCombinedMonthlyCharge);\r\n this.otherRentalCharges[selectedItems].OtherItemtotal = this.customCurrency.transform('0');\r\n this.otherRentalCharges[selectedItems].Reference = \"\"\r\n this.otherRentalCharges[selectedItems].Recurring = masterChargeRecord[0].Recurring\r\n }\r\n }\r\n }, (err) => {\r\n });\r\n }\r\n\r\n this.totalOtherRentalCharge -= data.OtherItemtotal.includes('(') && data.OtherItemtotal.includes(')') ? -1 * parseFloat(data.OtherItemtotal.replace(/[^0-9.-]/g, '')) : parseFloat(data.OtherItemtotal.replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= data.SalesTax.includes('(') && data.SalesTax.includes(')') ? -1 * parseFloat(data.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.SalesTax.replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= data.CityTax.includes('(') && data.CityTax.includes(')') ? -1 * parseFloat(data.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(data.CityTax.replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.getDiscounts();\r\n this.gridOtherRental.refresh();\r\n }\r\n });\r\n }\r\n\r\n rentOnlineNextTab(){\r\n this.saveRentalWithPayment();\r\n this.bookingFormCompleted.emit(true);\r\n }\r\n\r\n saveRentalWithPayment(){\r\n this.isdirty = false;\r\n this.isFormDirty.emit(false);\r\n var obj = {\r\n RentalType:4,\r\n VendorId: this.vendorId,\r\n PriorBalance:this.priorBalance,\r\n RentalCharge: this.totalRentalCharge,\r\n SalesTax: this.totalSalesTax,\r\n SecLevelTax: this.totalSecondLeveltax,\r\n OtherCharge: this.totalOtherRentalCharge,\r\n TotalBalanceDue:\"\",\r\n PaymentDueDate: null,\r\n MonthlyRentalBooth: [],\r\n MonthlyOtherRentalCharges: [],\r\n ReturnData: [],\r\n ReceiptSettings: \"\",\r\n PaymentOnly: false,\r\n ExemptResaleNo: false,\r\n ExemptResaleReason: \"\",\r\n ResaleNo: this.resaleNo,\r\n AppliedDiscountModel: [],\r\n DiscountAmount: this.totalDiscountCharge ?? 0,\r\n BookingFee: this.bookingFeeAmount ?? 0\r\n }\r\n\r\n var objSelectedBooth = [];\r\n var objReturnData = [];\r\n if (this.selectedMonthlyBooths.length > 0) {\r\n this.selectedMonthlyBooths.forEach((item,i) => {\r\n const rentalStartDateYear = new Date(item.RentalEndDate).getFullYear();\r\n const rentalStartDateMonth = new Date(item.RentalEndDate).getMonth() + 1;\r\n const rentalStartDateYearMonth = `${rentalStartDateYear}${rentalStartDateMonth < 10 ? '0' : ''}${rentalStartDateMonth}`;\r\n objSelectedBooth.push({\r\n MonthlyRentalId: item.MonthlyRentalId,\r\n BoothNumber: item.BoothNumber,\r\n BoothTypeId: item.BoothTypeId,\r\n ProductId: item.Product,\r\n BoothType: item.BoothType,\r\n RentalStartDate: new Date(item.RentalStartDate),\r\n RentalEndDate: new Date(item.RentalEndDate),\r\n RentalYearMonth: rentalStartDateYearMonth,\r\n BoothReserved: item.Reservation,\r\n DoNotRenew: item.Drop,\r\n PerDiem: item.PerDiem,\r\n PerdiemRent: item.PerDiemRent.includes('(') && item.PerDiemRent.includes(')') ? -1 * parseFloat(item.PerDiemRent.replace(/[^0-9.-]/g, '')) : parseFloat(item.PerDiemRent.replace(/[^0-9.-]/g, '')),\r\n Monday: item.Monday,\r\n Tuesday: item.Tuesday,\r\n Wednesday: item.Wednesday,\r\n Thursday: item.Thursday,\r\n Friday: item.Friday,\r\n Saturday: item.Saturday,\r\n Sunday: item.Sunday,\r\n RentalCharge: item.Rent.includes('(') && item.Rent.includes(')') ? -1 * parseFloat(item.Rent.replace(/[^0-9.-]/g, '')) : parseFloat(item.Rent.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n JanRent: item.January ?(item.January.includes('(') && item.January.includes(')') ? -1 * parseFloat(item.January.replace(/[^0-9.-]/g, '')) : parseFloat(item.January.replace(/[^0-9.-]/g, ''))): 0,\r\n FebRent: item.February?(item.February.includes('(') && item.February.includes(')') ? -1 * parseFloat(item.February.replace(/[^0-9.-]/g, '')) : parseFloat(item.February.replace(/[^0-9.-]/g, ''))): 0,\r\n MarRent: item.March?(item.March.includes('(') && item.March.includes(')') ? -1 * parseFloat(item.March.replace(/[^0-9.-]/g, '')) : parseFloat(item.March.replace(/[^0-9.-]/g, ''))): 0,\r\n AprRent: item.April? (item.April.includes('(') && item.April.includes(')') ? -1 * parseFloat(item.April.replace(/[^0-9.-]/g, '')) : parseFloat(item.April.replace(/[^0-9.-]/g, ''))): 0,\r\n MayRent: item.May? (item.May.includes('(') && item.May.includes(')') ? -1 * parseFloat(item.May.replace(/[^0-9.-]/g, '')) : parseFloat(item.May.replace(/[^0-9.-]/g, ''))): 0,\r\n JunRent: item.June? (item.June.includes('(') && item.June.includes(')') ? -1 * parseFloat(item.June.replace(/[^0-9.-]/g, '')) : parseFloat(item.June.replace(/[^0-9.-]/g, ''))): 0,\r\n JulRent: item.July? (item.July.includes('(') && item.July.includes(')') ? -1 * parseFloat(item.July.replace(/[^0-9.-]/g, '')) : parseFloat(item.July.replace(/[^0-9.-]/g, ''))): 0,\r\n AugRent: item.August? (item.August.includes('(') && item.August.includes(')') ? -1 * parseFloat(item.August.replace(/[^0-9.-]/g, '')) : parseFloat(item.August.replace(/[^0-9.-]/g, ''))): 0,\r\n SepRent: item.September? (item.September.includes('(') && item.September.includes(')') ? -1 * parseFloat(item.September.replace(/[^0-9.-]/g, '')) : parseFloat(item.September.replace(/[^0-9.-]/g, ''))): 0,\r\n OctRent: item.October? (item.October.includes('(') && item.October.includes(')') ? -1 * parseFloat(item.October.replace(/[^0-9.-]/g, '')) : parseFloat(item.October.replace(/[^0-9.-]/g, ''))): 0,\r\n NovRent: item.November? (item.November.includes('(') && item.November.includes(')') ? -1 * parseFloat(item.November.replace(/[^0-9.-]/g, '')) : parseFloat(item.November.replace(/[^0-9.-]/g, ''))): 0,\r\n DecRent: item.December? (item.December.includes('(') && item.December.includes(')') ? -1 * parseFloat(item.December.replace(/[^0-9.-]/g, '')) : parseFloat(item.December.replace(/[^0-9.-]/g, ''))): 0,\r\n BookingLog: i +1,\r\n AllRentalDates: item.AllRentalDates,\r\n TaxModel: item.TaxModel\r\n });\r\n\r\n if (item.NewBooth) {\r\n objReturnData.push({\r\n MonthlyRentalId: item.MonthlyRentalId,\r\n BoothNumber: item.BoothNumber,\r\n BoothType: item.BoothType,\r\n BoothDescription: item.BoothDescription,\r\n BoothTypeId: item.BoothTypeId,\r\n Product: item.Product,\r\n RentStartPeriod: item.RentStartPeriod,\r\n RentEndPeriod: item.RentEndPeriod,\r\n RentalSavedEndDate: item.RentalEndDate,\r\n RentalStartDate: item.RentalStartDate,\r\n RentalEndDate: item.RentalEndDate,\r\n MktDays: item.MktDays,\r\n Rent: item.Rent,\r\n SalesTax: item.SalesTax,\r\n CityTax: item.CityTax,\r\n PerDiem: item.PerDiem,\r\n PerdiemRent: item.PerDiemRent,\r\n Sunday: item.Sunday,\r\n Monday: item.Monday,\r\n Tuesday: item.Tuesday,\r\n Wednesday: item.Wednesday,\r\n Thursday: item.Thursday,\r\n Friday: item.Friday,\r\n Saturday: item.Saturday,\r\n Reservation: item.Reservation,\r\n Drop: item.Drop,\r\n January: item.January,\r\n February: item.February,\r\n March: item.March,\r\n April: item.April,\r\n May: item.May,\r\n June: item.June,\r\n July: item.July,\r\n August: item.August,\r\n September: item.September,\r\n October: item.October,\r\n November: item.November,\r\n December: item.December,\r\n JanuaryMonthPresent: item.January ? true : false,\r\n FebruaryMonthPresent: item.February ? true : false,\r\n MarchMonthPresent: item.March ? true : false,\r\n AprilMonthPresent: item.April ? true : false,\r\n MayMonthPresent: item.May ? true : false,\r\n JuneMonthPresent: item.June ? true : false,\r\n JulyMonthPresent: item.July ? true : false,\r\n AugustMonthPresent: item.August ? true : false,\r\n SeptemberMonthPresent: item.September ? true : false,\r\n OctoberMonthPresent: item.October ? true : false,\r\n NovemberMonthPresent: item.November ? true : false,\r\n DecemberMonthPresent: item.December ? true : false,\r\n NewBooth: true,\r\n Status: \"N\",\r\n StartDateList: item.StartDateList,\r\n DisableStartDate: false,\r\n AllRentalDates: item.AllRentalDates,\r\n TaxModel: item.TaxModel\r\n });\r\n }\r\n });\r\n }\r\n\r\n if (objSelectedBooth.length > 0)\r\n obj.MonthlyRentalBooth = objSelectedBooth;\r\n\r\n if (objReturnData.length > 0) {\r\n obj.ReturnData = objReturnData;\r\n }\r\n\r\n var objSelectedOtherCharge = [];\r\n if (this.selectedOtherItems.length > 0) {\r\n this.selectedOtherItems.forEach((item) => {\r\n const otherRentalYear = new Date(item.RentalMonth.split('-')[0]).getFullYear();\r\n const otherRentalMonth = new Date(item.RentalMonth.split('-')[0]).getMonth() + 1;\r\n const otherRentalYearMonth = `${otherRentalYear}${otherRentalMonth < \r\n 10 ? '0' : ''}${otherRentalMonth}`;\r\n\r\n objSelectedOtherCharge.push({\r\n OtherItemId: item.Id,\r\n MonthOtherRentalId: item.MonthOtherRentalId,\r\n OtherItemName: item.OtherItem,\r\n OtherItemCharge: item.OtherItemtotal.includes('(') && item.OtherItemtotal.includes(')') ? -1 * parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')),\r\n Quantity: item.Quantity,\r\n YearMonth: otherRentalYearMonth,\r\n BoothNumber: item.BoothNo,\r\n Recurring: item.Recurring,\r\n OtherCharge: item.OtherItemCharge.includes('(') && item.OtherItemCharge.includes(')') ? -1 * parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n Reference: item.Reference,\r\n MonthlyRentalIds : item.MonthlyRentalIds\r\n })\r\n });\r\n }\r\n if (objSelectedOtherCharge.length > 0)\r\n obj.MonthlyOtherRentalCharges = objSelectedOtherCharge;\r\n\r\n var objDiscountData = [];\r\n if(this.vendorDiscountPlans.length > 0 && this.totalDiscountCharge > 0){\r\n this.vendorDiscountPlans.forEach((item) => {\r\n if(item.CheckAll){\r\n objDiscountData.push({\r\n PlanId: item.PlanSeqId,\r\n DiscountAmount:item.AppliedDiscount.includes('(') && item.AppliedDiscount.includes(')') ? -1 * parseFloat(item.AppliedDiscount.replace(/[^0-9.-]/g, '')) : parseFloat(item.AppliedDiscount.replace(/[^0-9.-]/g, '')),\r\n OtherCharges: item.OtherItems,\r\n SalesTax: item.SalesTaxApplied,\r\n SecondLevelTax: item.SecondLevelTaxApplied,\r\n DiscountType:item.DiscountType== DiscountType.Percentage ? \"0\" : \"1\",\r\n DiscountValue : item.DiscountValue,\r\n SalesTaxAmount:item.SalesTaxAmount.includes('(') && item.SalesTaxAmount.includes(')') ? -1 * parseFloat(item.SalesTaxAmount.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTaxAmount.replace(/[^0-9.-]/g, '')),\r\n SecondLevelTaxAmount:item.SecondLevelTaxAmount.includes('(') && item.SecondLevelTaxAmount.includes(')') ? -1 * parseFloat(item.SecondLevelTaxAmount.replace(/[^0-9.-]/g, '')) : parseFloat(item.SecondLevelTaxAmount.replace(/[^0-9.-]/g, ''))\r\n })\r\n }\r\n });\r\n }\r\n if (objDiscountData.length > 0)\r\n obj.AppliedDiscountModel = objDiscountData;\r\n\r\n if (!this.newVendor) {\r\n this.sharedDataService.paymentSharedData = obj;\r\n var url = 'vendor-payments/' + this.marketId;\r\n this.router.navigate([url]);\r\n }\r\n else {\r\n this.rentalBookingData.emit(obj);\r\n }\r\n var temp ={\r\n TempRecordNo: this.tempRecordNo.toString(),\r\n BoothNumber:\"\"\r\n }\r\n this.subscriptions.push(this.rentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n }));\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscriptions.forEach((subscription) => {\r\n if (subscription) {\r\n subscription.unsubscribe();\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Thank You!
\r\n \r\n
\r\n
\r\n
\r\n
\r\n Dear {{VendorName}},

\r\n {{MarketName}} would like to thank you for being one of our highly valued\r\n customers.

\r\n We have received your online booking request, and as a confirmation\r\n of this online booking,\r\n we will be sending you an email enclosing your booking summary. Please review it and feel free to contact\r\n {{MarketName}} for your questions.

\r\n We have received your online payment, and as a confirmation of this\r\n online payment,\r\n we will be sending you an email enclosing your payment summary. Please review it and feel free to contact\r\n {{MarketName}} for your questions.

\r\n Your online payment authorization number is {{AuthCode}}, and account receipt number is\r\n {{MarketAccountReceiptId}}. Please print this page for your reference.\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n Thank you,
\r\n {{MarketName}}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
Preview Receipt
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
","import { Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';\r\nimport { ActivatedRoute, Params, Router } from '@angular/router';\r\nimport { BsModalRef, BsModalService, ModalDirective } from 'ngx-bootstrap/modal';\r\nimport printJS from 'print-js';\r\nimport { Subscription } from 'rxjs';\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\nimport { RentalService } from 'src/app/services/Rental.service';\r\nimport { saveAs } from 'file-saver';\r\n\r\n@Component({\r\n selector: 'app-rental-confirmation',\r\n templateUrl: './rental-confirmation.component.html',\r\n styleUrls: ['./rental-confirmation.component.scss']\r\n})\r\nexport class RentalConfirmationComponent implements OnInit {\r\n constructor(\r\n private route: ActivatedRoute,\r\n private modalService: BsModalService,\r\n public rentalService: RentalService,\r\n private router: Router,\r\n private marketInfoService: MarketInfoService,) { }\r\n\r\n marketId;\r\n imageUrl;\r\n private subscriptions: Subscription[] = [];\r\n @ViewChild('printf') receiptIframe: ElementRef;\r\n modalRef: BsModalRef;\r\n @ViewChild('printReceiptPopup', { static: true }) printReceipt: ModalDirective;\r\n @Input() VendorId;\r\n @Input() AccountReceipId;\r\n @Input() RentalType;\r\n @Input() newVendor;\r\n MarketName = \"\";\r\n VendorName = \"\";\r\n AuthCode = \"\";\r\n MarketAccountReceiptId= \"\";\r\n @Input() paymentOnly = false;\r\n\r\n ngOnInit(): void {\r\n this.route.params.subscribe((params: Params) => {\r\n this.marketId = params['marketId'];\r\n });\r\n this.getMarketLogo();\r\n this.getVendorPaymentDetails();\r\n }\r\n\r\n getMarketLogo() {\r\n const timestamp = new Date().getTime();\r\n this.subscriptions.push(this.marketInfoService.getMarketLogo(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.imageUrl = res.MarketLogoBlobURL + `?timestamp=${timestamp}`;\r\n }\r\n else {\r\n this.imageUrl = '../../../assets/images/NoImage.jpg'\r\n }\r\n }));\r\n }\r\n\r\n getVendorPaymentDetails() {\r\n this.subscriptions.push(this.rentalService.getVendorPaymentDetails(this.VendorId, this.marketId, this.AccountReceipId).subscribe((res: any) => {\r\n if (res) {\r\n this.MarketName = res.MarketName\r\n this.VendorName = res.VendorName;\r\n this.AuthCode = res.PaymentAuthorizationNumber;\r\n this.MarketAccountReceiptId = res.MarketAccountReceiptId\r\n }\r\n this.emailRentalReceipts();\r\n }));\r\n }\r\n\r\n emailRentalReceipts() {\r\n const params = {\r\n VendorId: parseInt(this.VendorId),\r\n AccountReceiptId: parseInt(this.AccountReceipId),\r\n PaymentOnly: this.paymentOnly,\r\n RentalType: this.RentalType\r\n };\r\n var emailSubject = this.RentalType == \"1\" ? \"Daily Rental Receipt\" :\r\n this.RentalType == \"2\" ? \"Monthly Rental Receipt\" :\r\n this.RentalType == \"3\" ? \"Weekly Rental Receipt\" :\r\n this.RentalType == \"4\" ? \"Combined Monthly Rental Receipt\" :\r\n this.RentalType == \"5\" ? \"Combined Weekly Rental Receipt\" : \"Rental Receipt\";\r\n this.rentalService.generatePaymentReceipt(this.marketId, params).subscribe((res1: any) => {\r\n if (res1.Success) {\r\n var emailData = [{\r\n AccountReceiptID: this.AccountReceipId,\r\n VendorID: parseInt(this.VendorId),\r\n BaseTemplateID: 11,\r\n AttachmentFile: res1.Message,\r\n AttachmentFileName: this.paymentOnly ? \"Payment Receipt\" : \"Rental Receipt\",\r\n FileType: \"application/pdf\",\r\n Subject: emailSubject,\r\n WebRentalRequest: true,\r\n NewVendor : this.newVendor\r\n }];\r\n\r\n if (this.paymentOnly) {\r\n this.subscriptions.push(this.rentalService.SendWRPaymentConfirmationEMail(this.marketId, emailData).subscribe((emailResponse: any) => {\r\n console.log(\"Payment receipt email delivered\");\r\n }));\r\n } else {\r\n this.subscriptions.push(this.rentalService.SendWRBookingConfirmationEMail(this.marketId, emailData).subscribe((emailResponse: any) => {\r\n console.log(\"Payment receipt email delivered\");\r\n }));\r\n }\r\n }\r\n });\r\n }\r\n\r\n goBack(){\r\n if(this.newVendor){\r\n this.router.navigate(['/login', this.marketId]);\r\n }else{\r\n this.router.navigate(['./rent-online', this.marketId, this.VendorId, 'br',this.RentalType]);\r\n }\r\n }\r\n\r\n PreviewRentalReceipt() {\r\n const params = {\r\n VendorId: parseInt(this.VendorId),\r\n AccountReceiptId: parseInt(this.AccountReceipId),\r\n PaymentOnly: this.paymentOnly,\r\n RentalType: this.RentalType\r\n };\r\n\r\n this.rentalService.generatePaymentReceipt(this.marketId, params).subscribe((res1: any) => {\r\n if (res1.Success) {\r\n const message = res1.Message;\r\n const iframe = this.receiptIframe.nativeElement;\r\n iframe.src = message;\r\n iframe.style.height = '700px';\r\n iframe.style.width = '100%';\r\n this.printReceipt.show();\r\n }\r\n })\r\n }\r\n\r\n isMobile(): boolean {\r\n return /Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\r\n }\r\n\r\n base64ToBlob(base64: string, contentType: string) {\r\n const byteCharacters = atob(base64);\r\n const byteArrays = [];\r\n for (let offset = 0; offset < byteCharacters.length; offset += 512) {\r\n const slice = byteCharacters.slice(offset, offset + 512);\r\n const byteNumbers = new Array(slice.length);\r\n for (let i = 0; i < slice.length; i++) {\r\n byteNumbers[i] = slice.charCodeAt(i);\r\n }\r\n const byteArray = new Uint8Array(byteNumbers);\r\n byteArrays.push(byteArray);\r\n }\r\n return new Blob(byteArrays, { type: contentType });\r\n }\r\n\r\n printRentalReceipt() {\r\n const params = {\r\n VendorId: parseInt(this.VendorId),\r\n AccountReceiptId: parseInt(this.AccountReceipId),\r\n PaymentOnly: this.paymentOnly,\r\n RentalType: this.RentalType\r\n };\r\n this.rentalService.generatePaymentReceipt(this.marketId,params).subscribe((res1: any) => {\r\n if (res1.Success) {\r\n const message = res1.Message;\r\n if (!this.isMobile()) {\r\n printJS({\r\n printable: message.toString().split(',')[1],\r\n type: 'pdf',\r\n base64: true,\r\n onPrintDialogClose: () => { },\r\n });\r\n }\r\n else {\r\n const base64String = res1.Message.replace(\"data:application/pdf;base64,\", \"\");\r\n const blob = this.base64ToBlob(base64String, 'application/pdf');\r\n const blobUrl = URL.createObjectURL(blob);\r\n saveAs(blob, 'receipt.pdf');\r\n }\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Booking DetailsProductRental DateRent
\r\n Booth # : {{item.BoothNumber}}
\r\n Status : Booked
\r\n
{{item.Product}}{{item.RentalDay}}\r\n {{item.Rent}}
No records found
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Booking DetailsChargeQuantityRental DayTotal
\r\n Product: {{item.OtherItem}}
\r\n Status : Booked
\r\n
\r\n {{item.OtherItemCharge}}\r\n \r\n {{item.Quantity}}\r\n \r\n {{item.RentalDay}}\r\n {{item.OtherItemtotal}}
No records found
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Booking DetailsRenew BookingRenew Start MonthRenew End MonthRent
\r\n Booth # : {{item.BoothNumber}}
\r\n Status : {{item.Status == 'R'? 'Reserved' : 'Booked'}}
\r\n \r\n {{ item.showDetails ? 'Hide Details' : 'Show Details' }}\r\n \r\n
\r\n Product : {{item.ProductName}}
\r\n Rent Charged :{{item.CurrentRent}}
\r\n Sales Tax : {{item.CurrentSalesTax}}
\r\n {{secondTaxName}} : {{item.CurrentSecondTax}}
\r\n Booking Start Week : {{item.CurrentRentStartPeriod}}
\r\n Booking End Week : {{item.CurrentRentEndPeriod}}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
{{item.RenewalStartMonth}}\r\n {{item.Rent}}
No records found
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Booking DetailsRenew BookingsRenewal Start MonthRenewal End MonthChargeQtyTotal
\r\n Product: {{item.OtherItem}}
\r\n Status : Booked
\r\n \r\n \r\n {{ item.showOtherItemsDetails ? 'Hide Details' : 'Show Details' }}\r\n \r\n
\r\n Booking Start Month : {{item.CurrentRentalMonth}}
\r\n Rent Charged : {{item.CurrentOtherItemtotal}}
\r\n Sales Tax : {{item.CurrentSalesTax}}
\r\n {{secondTaxName}}: {{item.CurrentSecLevelTax}}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n {{item.RenewalStartMonth}}\r\n \r\n {{item.OtherItemCharge}} {{item.Quantity}} {{item.OtherItemtotal}}
No records found
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Booking DetailsProductRenew BookingRenewal Start WeekRenewal End WeekRent
\r\n Booth # : {{item.BoothNumber}}
\r\n Status : {{item.Status == 'R'? 'Reserved' : 'Booked'}}
\r\n \r\n {{ item.showDetails ? 'Hide Details' : 'Show Details' }}\r\n \r\n
\r\n Product : {{item.ProductName}}
\r\n Rent Charged :{{item.CurrentRent}}
\r\n Sales Tax : {{item.CurrentSalesTax}}
\r\n {{secondTaxName}} : {{item.CurrentSecondTax}}
\r\n Booking Start Week : {{item.CurrentRentStartPeriod}}
\r\n Booking End Week : {{item.CurrentRentEndPeriod}}
\r\n
\r\n
{{item.ProductName}}\r\n \r\n
\r\n \r\n
\r\n
{{item.RenewalStartWeek}}\r\n {{item.Rent}}
No records found
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Booking DetailsRenew BookingRenewal Start WeekRenewal End WeekChargeQtyTotal
\r\n Product: {{item.OtherItem}}
\r\n Status : {{item.Status == 'R'? 'Reserved' : 'Booked'}}
\r\n \r\n \r\n {{ item.showOtherItemsDetails ? 'Hide Details' : 'Show Details' }}\r\n \r\n
\r\n Booking Start Week : {{item.CurrentRentalWeek}}
\r\n Rent Charged : {{item.CurrentOtherItemtotal}}
\r\n Sales Tax : {{item.CurrentSalesTax}}
\r\n {{secondTaxName}} : {{item.CurrentSecLevelTax}}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
{{item.RenewalStartWeek}}\r\n \r\n {{item.OtherItemCharge}}{{item.Quantity}}{{item.OtherItemtotal}}
No records found
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
Resale Number
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
","import { DatePipe } from '@angular/common';\r\nimport { Component, ElementRef, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';\r\nimport { AbstractControl, FormArray, FormBuilder, FormGroup } from '@angular/forms';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { forkJoin, Subscription } from 'rxjs';\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\nimport { PaymentService } from 'src/app/services/paymentService.service';\r\nimport { RentalService } from 'src/app/services/Rental.service';\r\nimport { VendorService } from 'src/app/services/Vendor.service';\r\nimport { customCurrencyPipe } from 'src/app/Shared/customCurrency.pipe';\r\nimport Swal from 'sweetalert2';\r\nimport { DiscountType } from 'src/app/Shared/enum';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { GeneralService } from 'src/app/services/General.service';\r\ninterface DateString {\r\n startDate: string;\r\n}\r\n@Component({\r\n selector: 'app-booking-details',\r\n templateUrl: './booking-details.component.html',\r\n styleUrls: ['./booking-details.component.scss']\r\n})\r\nexport class BookingDetailsComponent implements OnInit, OnDestroy {\r\n @Input() rentalType;\r\n @Input() paymentOnly;\r\n RentalTypeText;\r\n voidPayment = false;\r\n selectedBooths = [];\r\n selectedMonthlyBooths =[]\r\n public loaderIcon: Promise;\r\n private subscriptions: Subscription[] = [];\r\n @Input() vendorId;\r\n @Input() marketId;\r\n processPayment = false;\r\n secondTaxName=\"\";\r\n paymentAmount = 0;\r\n vendorProducts=[];\r\n vendorDiscountPlans=[];\r\n priorBalance;\r\n paymentGatewayCredentials;\r\n PromptRenewOther = false;\r\n processCreditCardOnline;\r\n verifoneId;\r\n masterRentChargeforResOtherItems = false;\r\n openConfirmationPage = false;\r\n creditCardAmount = 0;\r\n accountReceipId;\r\n private clickTimeout: any;\r\n selectedMarketDays = [];\r\n rentEndPeriodIndex;\r\n private monthEndDateCache = new Map();\r\n totalRentalCharge = 0.00;\r\n totalOtherRentalCharge = 0.00;\r\n totalSalesTax = 0.00;\r\n totalSecondLeveltax = 0.00\r\n totalCharge = 0.00;\r\n otherItemList = [];\r\n applyRenewalFee = false;\r\n paymentAdjustedWithPriorBal = false;\r\n bookingRenewalFeeId;\r\n renewalFeeAmount = 0;\r\n savePayment = false;\r\n toasterConfig = {\r\n closeButton: true,\r\n timeOut: 4500,\r\n easing: 'ease-out',\r\n progressBar: true,\r\n positionClass: 'toast-top-right',\r\n tapToDismiss: true,\r\n showEasing: 'swing',\r\n hideEasing: 'linear',\r\n showMethod: 'fadeIn',\r\n hideMethod: 'slideUp'\r\n };\r\n bookingDetailsForm: FormGroup;\r\n selectedOtherItems = [];\r\n applyCCCharge = false;\r\n CcfeeinPercentage;\r\n AllowPartialPay;\r\n vendorRentalDays;\r\n marketDayCountForResale = 0;\r\n actualTotalDue = 0;\r\n renewAllBoothsFromGrid;\r\n keyedInTransaction = true;\r\n combinedMonthlyBookingEndDate = false;\r\n transactionType=\"CREDITSALE\"\r\n monthlyMarketDays = [];\r\n weeklyMarketDays =[];\r\n allrentedOtherItems = [];\r\n showDetails: boolean = false;\r\n ResaleNumberRequired = false;\r\n DaysSellWithoutResaleNumber;\r\n BusinessLicenseNumberRequired = false;\r\n DaysSellWithoutBusiLicNumber;\r\n resaleOptionSelected;\r\n resaleNoOption = \"1\";\r\n exemptResale = false;\r\n resaleNo = \"\";\r\n exemptResaleReason = \"\";\r\n businessLicenseNumber;\r\n businessLicenseExpiryDate;\r\n ResaleOrBusinessHeader = \"\";\r\n resaleNoDisplay = false;\r\n @ViewChild('modalResaleNo', { static: false }) modalResaleNo: ElementRef;\r\n totalDiscountCharge;\r\n selectedWeeklyBooths=[];\r\n rules: any[] = [];\r\n allowCWRentalRenewal = false;\r\n allowCMRentalRenewal = false;\r\n allowOtherItemRenewal = false;\r\n constructor(\r\n private formbuilder: FormBuilder,\r\n private route: ActivatedRoute,\r\n public router: Router,\r\n public rentalService: RentalService,\r\n public vendorService: VendorService,\r\n private customCurrency: customCurrencyPipe,\r\n private paymentService: PaymentService,\r\n private toastr: ToastrService,\r\n private generalService: GeneralService,\r\n private marketInfoService: MarketInfoService,\r\n private datePipe: DatePipe) {\r\n this.bookingDetailsForm = this.formbuilder.group({\r\n priorBalance: [this.customCurrency.transform('0')],\r\n totalCharge: [this.customCurrency.transform('0')],\r\n paymentAmount: [this.customCurrency.transform('0')],\r\n convenienceFee: [this.customCurrency.transform('0')],\r\n totalPayment: [this.customCurrency.transform('0')],\r\n balanceDue: [this.customCurrency.transform('0')],\r\n rentalCharge: [this.customCurrency.transform('0')],\r\n otherCharge: [this.customCurrency.transform('0')],\r\n discount: [this.customCurrency.transform('0')],\r\n additionalCharge: [this.customCurrency.transform('0')],\r\n totalSalesTax: [this.customCurrency.transform('0')],\r\n totalSecondLeveltax: [this.customCurrency.transform('0')],\r\n rules: this.formbuilder.array(this.initializeRulesArray())\r\n });\r\n\r\n this.subscriptions.push(\r\n this.bookingDetailsForm.get('totalCharge')?.valueChanges.subscribe((val) => {\r\n if (!this.AllowPartialPay)\r\n var totalCharge = val.toString().includes('(') && val.toString().includes(')') ? -1 * parseFloat(val.toString().replace(/[^0-9.-]/g, '')) : parseFloat(val.toString().replace(/[^0-9.-]/g, ''));\r\n var convenienceFee = this.bookingDetailsForm.get('convenienceFee').value.toString().includes('(') && this.bookingDetailsForm.get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, ''));\r\n if (convenienceFee > 0) {\r\n val = totalCharge - convenienceFee;\r\n val = this.customCurrency.transform(val);\r\n }\r\n this.bookingDetailsForm.get('paymentAmount')?.setValue(val, { emitEvent: false });\r\n this.calculateBalance();\r\n })\r\n );\r\n }\r\n \r\n ngOnInit(): void {\r\n this.getOtherRentalItems();\r\n const rentalTypeMapping: { [key: string]: string } = {\r\n '1': 'Daily',\r\n '4': 'Combined Monthly',\r\n '5': 'Combined Weekly'\r\n };\r\n\r\n this.rentalType = parseInt(this.rentalType); \r\n this.RentalTypeText = rentalTypeMapping[this.rentalType] || '';\r\n this.marketInfoService.setMarketId(this.marketId);\r\n this.getMonthlyMarketDays(); \r\n // this.getVendorProducts();\r\n this.getVendorBalances();\r\n this.getCCCredentials();\r\n this.getWebRentalSetting();\r\n this.getRentalPaymentSettings()\r\n this.getMarketRulesAndRegulations();\r\n }\r\n\r\n initializeRulesArray(): FormGroup[] {\r\n return this.rules.map(rule => this.formbuilder.group({\r\n isChecked: [false], // Initialize checkbox with false\r\n rulesAndRegualtions: [rule.rulesAndRegualtions],\r\n AgreementLinkRequired: [rule.AgreementLinkRequired],\r\n AgreementBlobURL: [rule.AgreementBlobURL],\r\n AgreementLinkTextContent: [rule.AgreementLinkTextContent]\r\n }));\r\n }\r\n\r\n updateArrayDirectly(index: number, updatedValue: any) {\r\n const isChecked = (event.target as HTMLInputElement).checked;\r\n const control = this.rulesFormArray.at(index);\r\n if (control) {\r\n this.bookingDetailsForm.value['rules'][index].isChecked = isChecked;\r\n }\r\n }\r\n\r\n getMarketRulesAndRegulations() {\r\n const sub = this.generalService.getWebrentalMarketRules(this.marketId).subscribe((rules: any) => {\r\n if (rules) {\r\n const rulesArray = this.bookingDetailsForm.get('rules') as FormArray;\r\n rules.forEach(rule => {\r\n rulesArray.push(this.formbuilder.group({\r\n id: rule.ID,\r\n isChecked: false,\r\n rulesAndRegualtions: rule.Rules,\r\n AgreementLinkRequired : rule.AgreementLinkRequired ?? false,\r\n AgreementLinkTextContent: rule.AgreementLinkTextContent ?? \"\",\r\n AgreementBlobURL : rule.AgreementBlobURL ?? \"\"\r\n }));\r\n });\r\n }\r\n });\r\n }\r\n\r\n allCheckboxesCheckedValidator(control: AbstractControl) {\r\n var allChecked = this.bookingDetailsForm.value['rules'].filter(e=>!e.isChecked).length > 0 ? false : true;\r\n return allChecked;\r\n }\r\n\r\n get rulesFormArray() {\r\n return this.bookingDetailsForm.value['rules'] as FormArray;\r\n }\r\n\r\n getOtherRentalItems() {\r\n this.rentalService.getOtherRentalItems(this.marketId).subscribe((response) => {\r\n if (response) {\r\n response.map((el, i) => {\r\n const ob = {\r\n Id: el.OtherItemId,\r\n OtherItem: el.OtherItem,\r\n OtherItemCharge: this.rentalType == 1 ? this.customCurrency.transform(el.OtherItemCharge) \r\n : this.rentalType == 4 ? this.customCurrency.transform(el.OtherItemCombinedMonthlyCharge) \r\n : this.rentalType == 5 ? this.customCurrency.transform(el.OtherItemCombinedWeeklyCharge) \r\n : \"$0.00\",\r\n Quantity: 0,\r\n OtherItemtotal: this.customCurrency.transform('0'),\r\n Recurring: el.Recurring,\r\n othChgBooths: \"none\"\r\n }\r\n this.otherItemList.push(ob);\r\n });\r\n }\r\n }, (err) => {\r\n });\r\n }\r\n\r\n getVendorProducts() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.rentalService.GetVendorProductsById(this.marketId, this.vendorId).subscribe((res: any) => {\r\n if (res) {\r\n this.vendorProducts = res.body;\r\n this.loaderIcon = Promise.resolve(false);\r\n } \r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n ClosePaymentPage(){\r\n this.processPayment = false;\r\n }\r\n\r\n getMonthlyMarketDays() {\r\n forkJoin({\r\n response: this.marketInfoService.getMonthlyMarketDays(this.marketId),\r\n weeklyMarket: this.marketInfoService.getWeeklyMarketDays(this.marketId),\r\n resRentalSettings: this.rentalService.getRentalSettings(this.marketId),\r\n vendorProducts: this.rentalService.GetVendorProductsById(this.marketId, this.vendorId)\r\n }).subscribe(\r\n async ({ response, resRentalSettings, vendorProducts, weeklyMarket }: any) => {\r\n if (response) {\r\n this.monthlyMarketDays = response;\r\n }\r\n if(weeklyMarket){\r\n this.weeklyMarketDays = weeklyMarket;\r\n }\r\n if (vendorProducts) {\r\n this.vendorProducts = vendorProducts.body;\r\n }\r\n\r\n if (resRentalSettings) {\r\n this.combinedMonthlyBookingEndDate = resRentalSettings.CombinedMonthlyBookingEndDate;\r\n if (this.combinedMonthlyBookingEndDate && this.rentalType == 4) {\r\n const currentDate = new Date();\r\n const currentYear = currentDate.getFullYear();\r\n const currentMonth = currentDate.getMonth();\r\n const currentYearMonth = `${currentYear}${(currentMonth + 1) < 10 ? '0' : ''}${(currentMonth + 1)}`;\r\n const currentMonthEndDate =await this.getMonthEndingDateFromSetting(currentYearMonth);\r\n if (currentMonthEndDate <= new Date(currentDate)) {\r\n var currentDateYearAndMonth = this.datePipe.transform(currentDate, 'MMMM yyyy');\r\n this.monthlyMarketDays = response.filter(e => e.RentalMonths != currentDateYearAndMonth)\r\n }\r\n }\r\n }\r\n // this.selectedMonthlyMarketDays(); \r\n if (this.rentalType == 1) {\r\n this.getDailyRental();\r\n this.getDailyOtherRentals();\r\n }\r\n else if (this.rentalType == 4) {\r\n await this.getCombinedMonthlyRental();\r\n this.getCombinedMonthlyOtherRentals();\r\n }\r\n else if(this.rentalType == 5){\r\n this.getCombinedWeeklyRental();\r\n this.getCombinedWeeklyOtherRentals();\r\n }\r\n }, (err) => {\r\n });\r\n }\r\n\r\n getMonthIndex(monthString: string): number {\r\n const months = [\r\n 'January', 'February', 'March', 'April', 'May', 'June',\r\n 'July', 'August', 'September', 'October', 'November', 'December'\r\n ];\r\n const monthIndex = months.findIndex(month => month.toLowerCase() === monthString.toLowerCase());\r\n return monthIndex !== -1 ? monthIndex : 0;\r\n }\r\n\r\n getDailyOtherRentals() {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedOtherItems = [];\r\n const sub = this.rentalService.getDailyOtherRentals(this.marketId,this.vendorId).subscribe((res: any[]) => {\r\n if (res) {\r\n res.forEach((el) => {\r\n const index = this.selectedOtherItems.findIndex(item => item.Id === el.OtherItemId && this.datePipe.transform(item.RentalDay, 'MM/dd/yyyy') == this.datePipe.transform(el.RentalDay, 'MM/dd/yyyy') && item.Reference == el.Reference && item.BoothNo == el.BoothNumber);\r\n if (index !== -1) {\r\n this.selectedOtherItems[index].Quantity += el.Quantity;\r\n var otherItemTotal = (el.OtherCharge * this.selectedOtherItems[index].Quantity).toString(); \r\n this.selectedOtherItems[index].OtherItemtotal = otherItemTotal;\r\n }\r\n else {\r\n var otherItemTotal = (el.OtherCharge * el.Quantity).toString(); \r\n const ob = {\r\n Id: el.OtherItemId,\r\n OtherItem: el.OtherItemName,\r\n OtherItemCharge: this.customCurrency.transform(el.OtherCharge),\r\n Quantity: el.Quantity,\r\n OtherItemtotal: this.customCurrency.transform(otherItemTotal),\r\n RentalDay: this.datePipe.transform(el.RentalDay, \"MM/dd/YYYY\"),\r\n SalesTax: this.customCurrency.transform('0'),\r\n CityTax: this.customCurrency.transform('0'),\r\n BoothNo: el.BoothNumber,\r\n Reference: el.Reference,\r\n NewItem: false\r\n }\r\n this.selectedOtherItems.push(ob);\r\n }\r\n });\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getDailyRental() {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedBooths = [];\r\n const sub = this.rentalService.getDailyRentals(this.marketId,this.vendorId).subscribe((res: any[]) => {\r\n if (res) {\r\n this.selectedBooths = res.map(el => ({\r\n DailyRentalId: el.DailyRentalId,\r\n BoothNumber: el.BoothNumber,\r\n BoothType: el.BoothType,\r\n BoothTypeId: el.BoothTypeId,\r\n Product: this.vendorProducts.filter(e=>e.ProductId == el.ProductId)[0]?.ProductName,\r\n RentalDay: this.datePipe.transform(el.RentalDay, \"MM/dd/YYYY\"),\r\n Rent: this.customCurrency.transform(el.RentalCharge),\r\n SalesTax: this.customCurrency.transform('0'),\r\n CityTax: this.customCurrency.transform('0'),\r\n NewBooth: false\r\n }));\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getVendorBalances() {\r\n this.rentalService.getVendorBalances(this.vendorId, this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.priorBalance = res.PriorBalance;\r\n this.actualTotalDue = res.PriorBalance;\r\n this.bookingDetailsForm.patchValue({\r\n priorBalance: this.customCurrency.transform(this.priorBalance),\r\n totalCharge: this.customCurrency.transform(this.priorBalance)\r\n });\r\n }\r\n });\r\n }\r\n\r\n getMonthEndDate(inputDate: Date): Date {\r\n const nextMonthFirstDay = new Date(inputDate);\r\n nextMonthFirstDay.setMonth(nextMonthFirstDay.getMonth() + 1, 1);\r\n const monthEndDate = new Date(nextMonthFirstDay);\r\n monthEndDate.setDate(monthEndDate.getDate() - 1);\r\n return monthEndDate;\r\n }\r\n\r\n toggleDetails(index: number) {\r\n this.selectedMonthlyBooths[index].showDetails = !this.selectedMonthlyBooths[index].showDetails;\r\n }\r\n\r\n toggleCMOtherItemsDetails(index: number) {\r\n this.selectedOtherItems[index].showOtherItemsDetails = !this.selectedOtherItems[index].showOtherItemsDetails;\r\n }\r\n\r\n toggleCWBookingDetails(index: number) {\r\n this.selectedWeeklyBooths[index].showDetails = !this.selectedWeeklyBooths[index].showDetails;\r\n }\r\n\r\n async getCombinedMonthlyRental(): Promise {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedMonthlyBooths = [];\r\n var existingBooths = []; \r\n const sub = this.rentalService.getCombinedMonthlyBookings(this.marketId,this.vendorId).subscribe(async (res: any[]) => {\r\n if (res) {\r\n existingBooths = res;\r\n for(const el of existingBooths)\r\n {\r\n const StartDateList = [];\r\n var initialStartDate;\r\n var marketDays = 0;\r\n var marketDay;\r\n const today: Date = new Date(new Date().toDateString());\r\n var startDate = new Date(el.RentalStartDate);\r\n var endDate = new Date(el.RentalEndDate);\r\n const currentDate = new Date();\r\n const currentYear = currentDate.getFullYear();\r\n const currentMonth = currentDate.getMonth();\r\n var endDateYearMonth;\r\n const currentYearMonth = `${currentYear}${(currentMonth +1) < 10 ? '0' : ''}${(currentMonth +1)}`;\r\n if (el.Status == \"R\" && startDate < today) {\r\n startDate = today;\r\n initialStartDate = startDate;\r\n endDate = this.getMonthEndDate(startDate);\r\n\r\n if (this.combinedMonthlyBookingEndDate && this.rentalType == 4) {\r\n const rentalEndDateYear = endDate.getFullYear();\r\n const rentalEndDateMonth = endDate.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n endDate = await this.getMonthEndingDateFromSetting(rentalEndDateYearMonth);\r\n endDateYearMonth = rentalEndDateYearMonth;\r\n\r\n const rentalStartDate = new Date(startDate);\r\n var previousMonth = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() - 1)).getMonth() + 1;\r\n var PreviousMonthYear = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() - 1)).getFullYear();\r\n const PreviousMonthYearAndMonth = `${PreviousMonthYear}${previousMonth < 10 ? '0' : ''}${previousMonth}`;\r\n // if (PreviousMonthYearAndMonth >= currentYearMonth) {\r\n const monthEndDate = await this.getMonthEndingDateFromSetting(PreviousMonthYearAndMonth);\r\n const dateDiff = this.getDaysDifference(monthEndDate, new Date(startDate)); //calculates the diff between current month start date and previous monthend date \r\n if (dateDiff <= 7 && new Date(monthEndDate) < startDate) {\r\n if (new Date() > new Date(monthEndDate)) {\r\n startDate = new Date();\r\n }\r\n else {\r\n startDate = new Date(monthEndDate.setDate(monthEndDate.getDate() + 1));\r\n }\r\n }\r\n\r\n if (new Date(endDate) < new Date(startDate)) {\r\n const rentalStartDate = new Date(startDate);\r\n var nextMonth = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() + 1)).getMonth() + 1;\r\n var nextMonthYear = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() + 1)).getFullYear();\r\n const nextMonthYearAndMonth = `${nextMonthYear}${nextMonth < 10 ? '0' : ''}${nextMonth}`;\r\n endDate = await this.getMonthEndingDateFromSetting(nextMonthYearAndMonth);\r\n }\r\n // }\r\n }\r\n } \r\n\r\n if (!this.selectedMarketDays || this.selectedMarketDays.length == 0) {\r\n var response = await this.marketInfoService.getMarketDays(this.marketId).toPromise();\r\n if (response) {\r\n response.Sunday ? this.selectedMarketDays.push(1) : 0;\r\n response.Monday ? this.selectedMarketDays.push(2) : 0;\r\n response.Tuesday ? this.selectedMarketDays.push(3) : 0;\r\n response.Wednesday ? this.selectedMarketDays.push(4) : 0;\r\n response.Thursday ? this.selectedMarketDays.push(5) : 0;\r\n response.Friday ? this.selectedMarketDays.push(7) : 0;\r\n }\r\n }\r\n for (const date of this.selectedMarketDays) {\r\n const selectedDayOfWeek = date - 1;\r\n marketDay = this.datePipe.transform(el.RentalStartDate, 'EEE');\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n marketDays += 1;\r\n StartDateList.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n \r\n if (this.datePipe.transform(currentDay, 'MM/dd/yyyy') == this.datePipe.transform(endDate, 'MM/dd/yyyy')) {\r\n if (StartDateList && StartDateList.length == 0) {\r\n endDate.setDate(endDate.getDate() + 1);\r\n endDate = this.getMonthEndDate(endDate);\r\n }\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n\r\n const sortedDates = StartDateList.sort(compareDates); \r\n \r\n if (el.Status == \"R\") {\r\n if (initialStartDate <= today) {\r\n el.RentalStartDate = StartDateList[0].startDate\r\n el.RentalEndDate = StartDateList[StartDateList.length - 1].startDate;\r\n }\r\n }\r\n\r\n const rentEndPeriodIndex = this.monthlyMarketDays.findIndex(e => e.RentalMonths == this.datePipe.transform(el.RentalEndDate, 'MMMM yyyy'));\r\n var renewalStartMonth = \"\";\r\n if (this.monthlyMarketDays.length > 1) {\r\n renewalStartMonth = this.monthlyMarketDays[rentEndPeriodIndex + 1].RentalMonths\r\n }\r\n if (el.Status == \"R\") {\r\n renewalStartMonth = this.monthlyMarketDays[rentEndPeriodIndex].RentalMonths\r\n var obj = {\r\n BoothTypeId: el.BoothTypeId,\r\n VendorId: this.vendorId,\r\n RentalStartPeriod: new Date(el.RentalStartDate),\r\n RentalEndPeriod: new Date(el.RentalEndDate)\r\n }\r\n const res = await this.rentalService.getBoothRentalCombinedMonthlyCharges(this.marketId,obj).toPromise();\r\n if(res){\r\n const ob = {\r\n MonthlyRentalId: el.MonthlyRentalId,\r\n BoothNumber: el.BoothNumber,\r\n BoothType: el.BoothType,\r\n BoothTypeId: el.BoothTypeId,\r\n RentalStartDate: this.datePipe.transform(el.RentalStartDate, 'MMM d, y'),\r\n RentalEndDate: this.datePipe.transform(el.RentalEndDate, 'MMM d, y'),\r\n RentalSavedEndDate: this.datePipe.transform(el.RentalStartDate, 'MMM d, y'),\r\n RentStartPeriod: this.datePipe.transform(el.RentalStartDate, 'MMMM yyyy'),\r\n RentEndPeriod: this.datePipe.transform(el.RentalEndDate, 'MMMM yyyy'),\r\n Product: el.ProductId,\r\n ProductName: this.vendorProducts.filter(e=>e.ProductId == el.ProductId)[0]?.ProductName,\r\n StartDateList: StartDateList,\r\n MktDays: marketDays,\r\n PerDiemRent: this.customCurrency.transform('0.00'),\r\n Rent: this.customCurrency.transform(res.Rent),\r\n SalesTax: this.customCurrency.transform(res.SalesTax),\r\n CityTax: this.customCurrency.transform(res.CityTax),\r\n CurrentRentStartPeriod: this.datePipe.transform(el.RentalStartDate, 'MMMM yyyy'),\r\n CurrentRentEndPeriod: this.datePipe.transform(el.RentalEndDate, 'MMMM yyyy'), \r\n CurrentRent: this.customCurrency.transform(el.RentalCharge),\r\n CurrentSalesTax: this.customCurrency.transform(el.SalesTax),\r\n CurrentSecondTax: this.customCurrency.transform(el.SecLevelTax),\r\n Sunday: el.Sunday,\r\n Monday: el.Monday,\r\n Tuesday: el.Tuesday,\r\n Wednesday: el.Wednesday,\r\n Thursday: el.Thursday,\r\n Friday: el.Friday,\r\n Saturday: el.Saturday,\r\n Reservation: el.BoothReserved,\r\n Drop: el.DoNotRenew,\r\n January: this.customCurrency.transform(res.JanRent),\r\n February: this.customCurrency.transform(res.FebRent),\r\n March: this.customCurrency.transform(res.MarRent),\r\n April: this.customCurrency.transform(res.AprRent),\r\n May: this.customCurrency.transform(res.MayRent),\r\n June: this.customCurrency.transform(res.JunRent),\r\n July: this.customCurrency.transform(res.JulRent),\r\n August: this.customCurrency.transform(res.AugRent),\r\n September: this.customCurrency.transform(res.SepRent),\r\n October: this.customCurrency.transform(res.OctRent),\r\n November: this.customCurrency.transform(res.NovRent),\r\n December: this.customCurrency.transform(res.DecRent),\r\n JanuaryMonthPresent: res.JanuaryMonthPresent,\r\n FebruaryMonthPresent: res.FebruaryMonthPresent,\r\n MarchMonthPresent: res.MarchMonthPresent,\r\n AprilMonthPresent: res.AprilMonthPresent,\r\n MayMonthPresent: res.MayMonthPresent,\r\n JuneMonthPresent: res.JuneMonthPresent,\r\n JulyMonthPresent: res.JulyMonthPresent,\r\n AugustMonthPresent: res.AugustMonthPresent,\r\n SeptemberMonthPresent: res.SeptemberMonthPresent,\r\n OctoberMonthPresent: res.OctoberMonthPresent,\r\n NovemberMonthPresent: res.NovemberMonthPresent,\r\n DecemberMonthPresent: res.DecemberMonthPresent,\r\n DisableJanMonth: res.JanRent ? false : true,\r\n DisableFebMonth: res.FebRent ? false : true,\r\n DisableMarMonth: res.MarRent ? false : true,\r\n DisableAprMonth: res.AprRent ? false : true,\r\n DisableMayMonth: res.MayRent ? false : true,\r\n DisableJunMonth: res.JunRent ? false : true,\r\n DisableJulMonth: res.JulRent ? false : true,\r\n DisableAugMonth: res.AugRent ? false : true,\r\n DisableSepMonth: res.SepRent ? false : true,\r\n DisableOctMonth: res.OctRent ? false : true,\r\n DisableNovMonth: res.NovRent ? false : true,\r\n DisableDecMonth: res.DecRent ? false : true,\r\n DiasbleStartDate: false,\r\n Status: el.Status,\r\n NewBooth: false,\r\n ExtendRental: true,\r\n BookingCanExtend: true,\r\n AllRentalDates:StartDateList.map(el => new Date(el.startDate)),\r\n RenewalStartMonth: renewalStartMonth,\r\n CMRenewalMonth: this.monthlyMarketDays[rentEndPeriodIndex].RentalMonths,\r\n RentEndPeriodIndex:rentEndPeriodIndex\r\n }\r\n if (this.allowCMRentalRenewal) {\r\n this.totalRentalCharge += res.Rent.toString().includes('(') && res.Rent.toString().includes(')') ? -1 * parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n }\r\n this.selectedMonthlyBooths.push(ob);\r\n };\r\n }\r\n else {\r\n var rentalStartPeriod;\r\n if (this.combinedMonthlyBookingEndDate && this.rentalType == 4) {\r\n let rentalStartDate = new Date(el.RentalStartDate);\r\n var startMonth = rentalStartDate.getMonth() + 1;\r\n var startYear = rentalStartDate.getFullYear();\r\n const startYearAndMonth = `${startYear}${startMonth < 10 ? '0' : ''}${startMonth}`;\r\n const rentalMonthEndDate = await this.getMonthEndingDateFromSetting(startYearAndMonth);\r\n\r\n if (new Date(el.RentalStartDate) > rentalMonthEndDate) { \r\n rentalStartDate = new Date(el.RentalStartDate); \r\n const dayOfMonth = rentalStartDate.getDate();\r\n rentalStartDate.setMonth(rentalStartDate.getMonth() + 1);\r\n \r\n if (rentalStartDate.getDate() < dayOfMonth) {\r\n rentalStartDate.setDate(0); // Set to the last day of the previous month\r\n }\r\n rentalStartPeriod = this.datePipe.transform(rentalStartDate, 'MMMM yyyy');\r\n }\r\n else{\r\n rentalStartPeriod = this.datePipe.transform(el.RentalStartDate, 'MMMM yyyy');\r\n }\r\n }\r\n else{\r\n rentalStartPeriod = this.datePipe.transform(el.RentalStartDate, 'MMMM yyyy');\r\n }\r\n\r\n const ob = {\r\n MonthlyRentalId: el.MonthlyRentalId,\r\n BoothNumber: el.BoothNumber,\r\n BoothType: el.BoothType,\r\n BoothTypeId: el.BoothTypeId,\r\n RentalStartDate: this.datePipe.transform(el.RentalStartDate, 'MMM d, y'),\r\n RentalEndDate: this.datePipe.transform(el.RentalEndDate, 'MMM d, y'),\r\n RentalSavedEndDate: this.datePipe.transform(el.RentalEndDate, 'MMM d, y'),\r\n RentStartPeriod:rentalStartPeriod,\r\n RentEndPeriod: this.datePipe.transform(el.RentalEndDate, 'MMMM yyyy'), \r\n Product: el.ProductId,\r\n ProductName: this.vendorProducts.filter(e=>e.ProductId == el.ProductId)[0]?.ProductName,\r\n StartDateList: StartDateList,\r\n MktDays: marketDays,\r\n PerDiemRent: this.customCurrency.transform('0.00'),\r\n Rent: this.customCurrency.transform('0.00'),\r\n SalesTax: this.customCurrency.transform('0.00'),\r\n CityTax: this.customCurrency.transform('0.00'),\r\n CurrentRentStartPeriod: this.datePipe.transform(el.RentalStartDate, 'MMMM yyyy'),\r\n CurrentRentEndPeriod: this.datePipe.transform(el.RentalEndDate, 'MMMM yyyy'), \r\n CurrentRent: this.customCurrency.transform(el.RentalCharge),\r\n CurrentSalesTax: this.customCurrency.transform(el.SalesTax),\r\n CurrentSecondTax: this.customCurrency.transform(el.SecLevelTax),\r\n Sunday: el.Sunday,\r\n Monday: el.Monday,\r\n Tuesday: el.Tuesday,\r\n Wednesday: el.Wednesday,\r\n Thursday: el.Thursday,\r\n Friday: el.Friday,\r\n Saturday: el.Saturday,\r\n Reservation: el.BoothReserved,\r\n Drop: el.DoNotRenew,\r\n Status: el.Status,\r\n BookingCanExtend: true,\r\n January: this.customCurrency.transform('0.00'),\r\n February: this.customCurrency.transform('0.00'),\r\n March: this.customCurrency.transform('0.00'),\r\n April: this.customCurrency.transform('0.00'),\r\n May: this.customCurrency.transform('0.00'),\r\n June: this.customCurrency.transform('0.00'),\r\n July: this.customCurrency.transform('0.00'),\r\n August: this.customCurrency.transform('0.00'),\r\n September: this.customCurrency.transform('0.00'),\r\n October: this.customCurrency.transform('0.00'),\r\n November: this.customCurrency.transform('0.00'),\r\n December: this.customCurrency.transform('0.00'),\r\n JanuaryMonthPresent: el.JanuaryMonthPresent,\r\n FebruaryMonthPresent: el.FebruaryMonthPresent,\r\n MarchMonthPresent: el.MarchMonthPresent,\r\n AprilMonthPresent: el.AprilMonthPresent,\r\n MayMonthPresent: el.MayMonthPresent,\r\n JuneMonthPresent: el.JuneMonthPresent,\r\n JulyMonthPresent: el.JulyMonthPresent,\r\n AugustMonthPresent: el.AugustMonthPresent,\r\n SeptemberMonthPresent: el.SeptemberMonthPresent,\r\n OctoberMonthPresent: el.OctoberMonthPresent,\r\n NovemberMonthPresent: el.NovemberMonthPresent,\r\n DecemberMonthPresent: el.DecemberMonthPresent,\r\n DisableJanMonth: true,\r\n DisableFebMonth: true,\r\n DisableMarMonth: true,\r\n DisableAprMonth: true,\r\n DisableMayMonth: true,\r\n DisableJunMonth: true,\r\n DisableJulMonth: true,\r\n DisableAugMonth: true,\r\n DisableSepMonth: true,\r\n DisableOctMonth: true,\r\n DisableNovMonth: true,\r\n DisableDecMonth: true,\r\n DiasbleStartDate: true,\r\n NewBooth: false,\r\n AllRentalDates:StartDateList.map(el => new Date(el.startDate)),\r\n RenewalStartMonth: renewalStartMonth,\r\n CMRenewalMonth: this.monthlyMarketDays.length > 1 ? this.monthlyMarketDays[rentEndPeriodIndex +1].RentalMonths :\"\",\r\n RentEndPeriodIndex:rentEndPeriodIndex\r\n }\r\n this.selectedMonthlyBooths.push(ob);\r\n } \r\n };\r\n \r\n await this.handleCMEndDateChange();\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n updateRentalRecord(record) {\r\n if (record.Reservation && this.allowCMRentalRenewal) {\r\n const rentEndPeriodIndex = this.monthlyMarketDays.findIndex(e => e.RentalMonths == record.RentEndPeriod);\r\n const renewalStartMonth = this.monthlyMarketDays[rentEndPeriodIndex +1].RentalMonths\r\n record.BookingCanExtend = true;\r\n record.RenewalStartMonth =renewalStartMonth\r\n record.CMRenewalMonth = renewalStartMonth;\r\n record.RentEndPeriodIndex =rentEndPeriodIndex\r\n this.extendCMRental(record);\r\n }\r\n else{\r\n record.BookingCanExtend = false;\r\n record.RenewalStartMonth = \"This booking cannot be extended further!\";\r\n record.CMRenewalMonth = record.RentalMonth;\r\n this.totalRentalCharge -= record.Rent.toString().includes('(') && record.Rent.toString().includes(')') ? -1 * parseFloat(record.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= record.SalesTax.toString().includes('(') && record.SalesTax.toString().includes(')') ? -1 * parseFloat(record.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= record.CityTax.toString().includes('(') && record.CityTax.toString().includes(')') ? -1 * parseFloat(record.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n record.Rent = this.customCurrency.transform(\"0\");\r\n }\r\n }\r\n\r\n getDaysDifference(date1: Date, date2: Date): number {\r\n // Normalize both dates to start of the day (midnight)\r\n const start = new Date(date1.getFullYear(), date1.getMonth(), date1.getDate());\r\n const end = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());\r\n // Calculate the difference in time (milliseconds)\r\n const timeDiff = Math.abs(end.getTime() - start.getTime());\r\n // Convert time difference from milliseconds to days\r\n const dayDiff = Math.ceil(timeDiff / (1000 * 3600 * 24));\r\n return dayDiff;\r\n }\r\n\r\n async handleCMEndDateChange() {\r\n this.renewAllBoothsFromGrid = false;\r\n if (this.selectedMonthlyBooths.length === 0) {\r\n await this.renewAllBooths();\r\n return;\r\n }\r\n \r\n this.renewAllBoothsFromGrid = true;\r\n let rentalDates: any[] = [];\r\n let noResale = true;\r\n this.vendorRentalDays = [];\r\n this.marketDayCountForResale = 0;\r\n \r\n if ((this.ResaleNumberRequired && !this.exemptResale) || this.BusinessLicenseNumberRequired) {\r\n await this.processSelectedBooths(rentalDates);\r\n \r\n for (const item of this.selectedMonthlyBooths) {\r\n if (this.shouldProcessBooth(item)) {\r\n await this.processBoothRentalDates(item, rentalDates);\r\n }\r\n }\r\n \r\n this.updateVendorRentalDays(rentalDates);\r\n \r\n const vendorRentalDaysObj = { VendorID: this.vendorId, VendorRentalDate: new Date() };\r\n const vendorRentalDaysRes = await this.rentalService.getVendorRentalDays(vendorRentalDaysObj).toPromise();\r\n \r\n if (this.marketDayCountForResale <= this.DaysSellWithoutResaleNumber ||\r\n this.marketDayCountForResale <= this.DaysSellWithoutBusiLicNumber) {\r\n this.addVendorRentalDays(vendorRentalDaysRes);\r\n }\r\n \r\n await this.checkResaleOrBusinessLicense(noResale);\r\n } else {\r\n await this.renewAllBooths();\r\n }\r\n }\r\n\r\n extendCMOtherRental(item) {\r\n const endMonth = new Date(item.CMRenewalMonth); \r\n const currentMonth = new Date(item.RentalMonth);\r\n this.totalOtherRentalCharge -= item.OtherItemtotal.toString().includes('(') && item.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(item.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += item.SalesTax.toString().includes('(') && item.SalesTax.toString().includes(')') ? -1 * parseFloat(item.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += item.CityTax.toString().includes('(') && item.CityTax.toString().includes(')') ? -1 * parseFloat(item.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n item.OtherItemtotal = this.customCurrency.transform(\"0\");\r\n if (currentMonth < new Date(item.CMRenewalMonth) && item.Recurring && this.allowCMRentalRenewal) {\r\n while (currentMonth < new Date(item.CMRenewalMonth) && item.Recurring && this.allowCMRentalRenewal) {\r\n var nextDate = currentMonth.setMonth(currentMonth.getMonth() + 1);\r\n var rentalMonthDate = this.monthlyMarketDays.filter(date => this.datePipe.transform(new Date(date.RentalMonths), 'MM/dd/yyyy') <= this.datePipe.transform(new Date(nextDate), 'MM/dd/yyyy')\r\n && this.datePipe.transform(new Date(date.RentalMonths), 'MM/dd/yyyy') >= this.datePipe.transform(new Date(nextDate), 'MM/dd/yyyy'))\r\n if (rentalMonthDate.length > 0)\r\n var rentalStartMonth = rentalMonthDate[0].RentalMonths;\r\n\r\n var recordExist = this.selectedOtherItems.findIndex(e => e.RentalMonth == rentalStartMonth && e.Id == item.Id && e.Reference == item.Reference && e.BoothNumber == item.BoothNo)\r\n var otherItemCharge = this.otherItemList.filter(e => e.Id == item.Id)[0].OtherItemCharge;\r\n if (!this.masterRentChargeforResOtherItems && this.allrentedOtherItems.length > 0) {\r\n otherItemCharge = this.customCurrency.transform(this.allrentedOtherItems.filter(e => e.OtherItemId == item.Id)[0].OtherCharge);\r\n }\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: item.Id,\r\n VendorId: this.vendorId,\r\n Quantity: item.Quantity,\r\n OtherItemCharge: otherItemCharge.includes('(') && otherItemCharge.includes(')') ? (-1) * parseFloat(otherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(otherItemCharge.replace(/[^0-9.-]/g, ''))\r\n }\r\n\r\n this.rentalService.getOtherItemsRentalCharges(obj).subscribe((res: any) => {\r\n const isNegative = otherItemCharge.includes('(') && otherItemCharge.includes(')');\r\n const totalValue = parseFloat(otherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n item.OtherItemtotal = this.customCurrency.transform((parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')) + (finalCharge * item.Quantity)).toString());\r\n item.Quantity = item.Quantity;\r\n item.OtherItemCharge = otherItemCharge\r\n item.MonthlyRentalIds += ',' + item.Id\r\n item.CMRenewalMonth = rentalStartMonth;\r\n\r\n this.totalOtherRentalCharge += item.OtherItemCharge.toString().includes('(') && item.OtherItemCharge.toString().includes(')') ? -1 * parseFloat(item.OtherItemCharge.toString().replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemCharge.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n otherCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n });\r\n }\r\n }\r\n else {\r\n item.BookingCanExtend = false;\r\n item.RenewalStartMonth = \"This booking cannot be extended further!\";\r\n item.CMRenewalMonth = item.RentalMonth;\r\n }\r\n }\r\n\r\n renewCMOtherCharges() {\r\n if (this.selectedOtherItems.length > 0) {\r\n this.proceedRenewingOtherCharges();\r\n }\r\n }\r\n\r\n extendCWOtherRental(item) {\r\n var cuurentWeek = new Date(item.RentalWeek.split('-')[1]);\r\n this.totalOtherRentalCharge -= item.OtherItemtotal.toString().includes('(') && item.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(item.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += item.SalesTax.toString().includes('(') && item.SalesTax.toString().includes(')') ? -1 * parseFloat(item.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += item.CityTax.toString().includes('(') && item.CityTax.toString().includes(')') ? -1 * parseFloat(item.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n item.OtherItemtotal = this.customCurrency.transform(\"0\");\r\n if (cuurentWeek < new Date(item.CWRenewalWeek.split('-')[1]) && item.Recurring && this.allowOtherItemRenewal) {\r\n while (cuurentWeek < new Date(item.CWRenewalWeek.split('-')[1]) && item.Recurring && this.allowOtherItemRenewal) {\r\n var nextDate = this.addDays(new Date(cuurentWeek), 7);\r\n var rentalWeekDate = this.weeklyMarketDays.filter(date => this.datePipe.transform(new Date(date.RentalEndDays.split('-')[0]), 'MM/dd/yyyy') <= this.datePipe.transform(new Date(nextDate), 'MM/dd/yyyy')\r\n && this.datePipe.transform(new Date(date.RentalEndDays.split('-')[1]), 'MM/dd/yyyy') >= this.datePipe.transform(new Date(nextDate), 'MM/dd/yyyy'))\r\n if (rentalWeekDate.length > 0)\r\n var rentalStartWeek = rentalWeekDate[0].RentalStartDays;\r\n cuurentWeek = new Date(rentalStartWeek.split('-')[1]);\r\n var otherItemCharge = this.otherItemList.filter(e => e.Id == item.Id)[0].OtherItemCharge;\r\n if (!this.masterRentChargeforResOtherItems && this.allrentedOtherItems.length > 0) {\r\n otherItemCharge = this.customCurrency.transform(this.allrentedOtherItems.filter(e => e.OtherItemId == item.Id)[0].OtherCharge);\r\n }\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: item.Id,\r\n VendorId: this.vendorId,\r\n Quantity: item.Quantity,\r\n OtherItemCharge: otherItemCharge.includes('(') && otherItemCharge.includes(')') ? (-1) * parseFloat(otherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(otherItemCharge.replace(/[^0-9.-]/g, ''))\r\n }\r\n\r\n this.rentalService.getOtherItemsRentalCharges(obj).subscribe((res: any) => {\r\n const isNegative = otherItemCharge.includes('(') && otherItemCharge.includes(')');\r\n const totalValue = parseFloat(otherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n item.OtherItemtotal = this.customCurrency.transform((parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')) + (finalCharge * item.Quantity)).toString());\r\n item.Quantity = item.Quantity;\r\n item.OtherItemCharge = otherItemCharge;\r\n item.MonthlyRentalIds += ',' + item.Id\r\n item.CWRenewalWeek = rentalStartWeek;\r\n\r\n this.totalOtherRentalCharge += item.OtherItemCharge.toString().includes('(') && item.OtherItemCharge.toString().includes(')') ? -1 * parseFloat(item.OtherItemCharge.toString().replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemCharge.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n otherCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n });\r\n }\r\n }\r\n else {\r\n item.BookingCanExtend = false;\r\n item.RenewalStartMonth = \"This booking cannot be extended further!\";\r\n item.CMRenewalMonth = item.RentalMonth;\r\n }\r\n }\r\n\r\n getDateFromDateTime(date){\r\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\r\n }\r\n\r\n async proceedRenewingOtherCharges(){ \r\n for(const item of this.selectedOtherItems){\r\n const endMonth = new Date(item.CMRenewalMonth);\r\n const currentMonth = new Date(item.RentalMonth);\r\n if (this.getDateFromDateTime(currentMonth) <= this.getDateFromDateTime(new Date(item.CMRenewalMonth)) && item.Recurring && this.allowOtherItemRenewal) {\r\n var nextDate = currentMonth.setMonth(currentMonth.getMonth() + 1);\r\n var rentalMonthDate = this.monthlyMarketDays.filter(date => this.datePipe.transform(new Date(date.RentalMonths), 'MM/dd/yyyy') <= this.datePipe.transform(new Date(nextDate), 'MM/dd/yyyy')\r\n && this.datePipe.transform(new Date(date.RentalMonths), 'MM/dd/yyyy') >= this.datePipe.transform(new Date(nextDate), 'MM/dd/yyyy'))\r\n if (rentalMonthDate.length > 0)\r\n var rentalEndMonth = rentalMonthDate[0].RentalMonths;\r\n\r\n var otherItemCharge = this.otherItemList.filter(e => e.Id == item.Id)[0].OtherItemCharge;\r\n if (!this.masterRentChargeforResOtherItems && this.allrentedOtherItems.length > 0) {\r\n otherItemCharge = this.customCurrency.transform(this.allrentedOtherItems.filter(e => e.OtherItemId == item.Id)[0].OtherCharge);\r\n }\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: item.Id,\r\n VendorId: this.vendorId,\r\n Quantity: item.Quantity,\r\n OtherItemCharge: otherItemCharge.includes('(') && otherItemCharge.includes(')') ? (-1) * parseFloat(otherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(otherItemCharge.replace(/[^0-9.-]/g, ''))\r\n }\r\n\r\n var res = await this.rentalService.getOtherItemsRentalCharges(obj).toPromise();\r\n const isNegative = otherItemCharge.includes('(') && otherItemCharge.includes(')');\r\n const totalValue = parseFloat(otherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n const OtherItemtotal = this.customCurrency.transform((finalCharge * item.Quantity).toString());\r\n item.Quantity = item.Quantity;\r\n item.MonthlyRentalIds += ',' + item.Id\r\n item.OtherItemtotal = OtherItemtotal;\r\n item.CMRenewalMonth = rentalEndMonth;\r\n\r\n this.totalOtherRentalCharge += item.OtherItemtotal.toString().includes('(') && item.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(item.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n otherCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n \r\n }\r\n else{\r\n item.BookingCanExtend = false;\r\n item.RenewalStartMonth = \"This booking cannot be extended further!\";\r\n item.CMRenewalMonth = item.RentalMonth;\r\n }\r\n }\r\n }\r\n \r\n // Helper functions \r\n // Process selected booths for rental dates\r\n async processSelectedBooths(rentalDates: any[]) {\r\n const selectedBoothRecord = this.selectedMonthlyBooths.filter(e => e.NewBooth || e.ExtendRental);\r\n for (const record of selectedBoothRecord) {\r\n for (const el of this.selectedMarketDays) {\r\n this.addRentalDates(record, rentalDates, el - 1);\r\n }\r\n }\r\n }\r\n \r\n // Check if the booth should be processed\r\n shouldProcessBooth(item: any): boolean {\r\n return new Date(item.RentEndPeriod.split('-')[0]) < new Date(item.CMRenewalMonth) &&\r\n !item.Drop && item.Reservation;\r\n }\r\n \r\n // Process rental dates for a booth\r\n async processBoothRentalDates(item: any, rentalDates: any[]) {\r\n const recordExist = this.selectedMonthlyBooths.findIndex(e =>\r\n e.RentStartPeriod === item.RentStartPeriod && e.RentEndPeriod === item.RentEndPeriod &&\r\n e.BoothNumber === item.BoothNumber && (item.MonthlyRentalId === 0 || e.MonthlyRentalId === item.MonthlyRentalId)\r\n );\r\n \r\n if (recordExist !== -1) {\r\n const startDate = new Date(this.selectedMonthlyBooths[recordExist].RentalStartDate);\r\n let endDate = await this.calculateEndDate(item);\r\n \r\n // Loop through selected market days and add dates\r\n this.selectedMarketDays.forEach((el) => {\r\n this.addRentalDates({ RentalStartDate: startDate, RentalEndDate: endDate }, rentalDates, el - 1);\r\n });\r\n }\r\n }\r\n \r\n // Add rental dates based on the day of the week\r\n addRentalDates(record: any, rentalDates: any[], dayOfWeek: number) {\r\n let currentDay = new Date(record.RentalStartDate);\r\n const endDate = new Date(record.RentalEndDate);\r\n \r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === dayOfWeek) {\r\n rentalDates.push({ startDate: this.datePipe.transform(currentDay, 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n \r\n // Calculate end date based on CMRenewalMonth\r\n async calculateEndDate(item: any): Promise {\r\n const [endMonthDate, endMonthYear] = item.CMRenewalMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n let endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n \r\n if (this.combinedMonthlyBookingEndDate) {\r\n const rentalEndDateYearMonth = `${endDate.getFullYear()}${(endDate.getMonth() + 1).toString().padStart(2, '0')}`;\r\n endDate = await this.getMonthEndingDateFromSetting(rentalEndDateYearMonth);\r\n }\r\n \r\n return endDate;\r\n }\r\n \r\n // Update vendor rental days by comparing with existing rental dates\r\n updateVendorRentalDays(rentalDates: any[]) {\r\n rentalDates.forEach(date => {\r\n const targetDateString = this.datePipe.transform(date.startDate, \"MM/dd/yyyy\");\r\n const dateExist = this.vendorRentalDays.some(el => {\r\n const rentalDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n \r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(date.startDate, \"MM/dd/yyyy\");\r\n this.vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n }\r\n });\r\n }\r\n \r\n // Add vendor rental days from API response\r\n addVendorRentalDays(res: any[]) {\r\n res.forEach(el => {\r\n const targetDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n const dateExist = this.vendorRentalDays.some(data => {\r\n const rentalDateString = this.datePipe.transform(data.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n \r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n this.vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n }\r\n });\r\n }\r\n \r\n // Check conditions for resale or business license\r\n async checkResaleOrBusinessLicense(noResale: boolean) {\r\n if (this.ResaleNumberRequired && !this.exemptResale && !this.resaleNo && \r\n this.marketDayCountForResale > this.DaysSellWithoutResaleNumber && !this.resaleOptionSelected) {\r\n const modal = this.modalResaleNo.nativeElement;\r\n modal.classList.add('show');\r\n modal.style.display = 'block';\r\n noResale = false;\r\n } else if (this.BusinessLicenseNumberRequired && \r\n this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n await this.handleBusinessLicenseNumber();\r\n } else {\r\n await this.renewAllBooths();\r\n }\r\n }\r\n\r\n async validateResaleAndBusinessLicense() {\r\n var addToGrid = false;\r\n var closeModalPopup = false;\r\n const modal = this.modalResaleNo.nativeElement;\r\n if (!this.resaleNo || this.resaleNo.trim() === '') {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Enter the resale number`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n else {\r\n addToGrid = true;\r\n closeModalPopup = true;\r\n this.resaleOptionSelected = true;\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'none';\r\n modal.classList.remove('show');\r\n }\r\n }\r\n if (addToGrid) {\r\n const obj = {\r\n VendorID: this.vendorId,\r\n ExemptResaleNo: false,\r\n ExemptResaleReason: \"\",\r\n ResaleNo: this.resaleNo,\r\n MarketId: this.marketId\r\n }\r\n\r\n this.subscriptions.push(this.rentalService.UpdateVendorResaleInfo(obj).subscribe((res: any) => {\r\n }));\r\n }\r\n\r\n if (addToGrid) {\r\n this.ResaleOrBusinessHeader = \"Business License Number\";\r\n if (this.BusinessLicenseNumberRequired &&\r\n this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n await this.handleBusinessLicenseNumber();\r\n }\r\n else{\r\n await this.renewAllBooths();\r\n }\r\n }\r\n }\r\n\r\n // Handle business license number validation\r\n async handleBusinessLicenseNumber() {\r\n if (!this.businessLicenseNumber) {\r\n const result = await Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Business License Number is required! Do you want to continue without Business License Number?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n });\r\n \r\n if (result.value) {\r\n await this.renewAllBooths();\r\n }\r\n } else {\r\n await this.checkBusinessLicenseExpiry();\r\n }\r\n }\r\n \r\n // Check business license expiry date\r\n async checkBusinessLicenseExpiry() {\r\n if (!this.businessLicenseExpiryDate) {\r\n const result = await Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Business License expiry date is not provided! Do you want to continue without that?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n });\r\n \r\n if (result.value) {\r\n await this.renewAllBooths();\r\n }\r\n } else if (new Date(this.businessLicenseExpiryDate) < new Date()) {\r\n const result = await Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Business License is expired! Do you want to continue?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n });\r\n \r\n if (result.value) {\r\n await this.renewAllBooths();\r\n }\r\n } else {\r\n await this.renewAllBooths();\r\n }\r\n }\r\n \r\n\r\n async getMonthEndingDateFromSetting(rentalYearMonth: string): Promise {\r\n if (this.monthEndDateCache.has(rentalYearMonth)) {\r\n return this.monthEndDateCache.get(rentalYearMonth);\r\n }\r\n const response = await this.rentalService.GetSelectedMonthEndDate(rentalYearMonth,this.marketId).toPromise();\r\n if (response) {\r\n const monthEndDate = new Date(response.MonthEndDateSelected);\r\n this.monthEndDateCache.set(rentalYearMonth, monthEndDate);\r\n return monthEndDate;\r\n }\r\n else {\r\n return null\r\n }\r\n }\r\n\r\n async renewAllBooths() {\r\n const nonAvailableBooths = [];\r\n\r\n for (const item of this.selectedMonthlyBooths) {\r\n if (item.Status != \"R\") {\r\n const { RentEndPeriod, CMRenewalMonth, Drop, Reservation, MonthlyRentalId, BoothNumber, RentStartPeriod, Status } = item;\r\n const rentEndDate = new Date(RentEndPeriod.split('-')[0]);\r\n const renewalMonth = new Date(CMRenewalMonth);\r\n\r\n if (rentEndDate < renewalMonth && !Drop && Reservation && this.allowCMRentalRenewal) {\r\n const recordExist = this.selectedMonthlyBooths.findIndex(e =>\r\n e.RentStartPeriod === RentStartPeriod &&\r\n e.RentEndPeriod === RentEndPeriod &&\r\n e.BoothNumber === BoothNumber &&\r\n e.MonthlyRentalId === MonthlyRentalId &&\r\n e.Reservation && !e.Drop\r\n );\r\n\r\n if (recordExist != -1) {\r\n const rentalDates = [];\r\n var currentMonthRentalDates = [];\r\n var rentalstartDate = \"\";\r\n var marketDays = 0;\r\n this.selectedMarketDays = [];\r\n this.selectedMonthlyBooths[recordExist].Sunday == true ? this.selectedMarketDays.push(1) : 0;\r\n this.selectedMonthlyBooths[recordExist].Monday ? this.selectedMarketDays.push(2) : 0;\r\n this.selectedMonthlyBooths[recordExist].Tuesday == true ? this.selectedMarketDays.push(3) : 0;\r\n this.selectedMonthlyBooths[recordExist].Wednesday == true ? this.selectedMarketDays.push(4) : 0;\r\n this.selectedMonthlyBooths[recordExist].Thursday == true ? this.selectedMarketDays.push(5) : 0;\r\n this.selectedMonthlyBooths[recordExist].Friday == true ? this.selectedMarketDays.push(6) : 0;\r\n this.selectedMonthlyBooths[recordExist].Saturday == true ? this.selectedMarketDays.push(7) : 0;\r\n for (const el of this.selectedMarketDays) {\r\n const currentDate = new Date();\r\n const currentYear = currentDate.getFullYear();\r\n const currentMonth = currentDate.getMonth();\r\n var endDateYearMonth;\r\n const currentYearMonth = `${currentYear}${(currentMonth + 1) < 10 ? '0' : ''}${(currentMonth + 1)}`;\r\n var startDate = new Date(this.selectedMonthlyBooths[recordExist].RenewalStartMonth);\r\n const endMonth = item.CMRenewalMonth;\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n var endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n var previousRentalYearMonth;\r\n if (this.combinedMonthlyBookingEndDate) {\r\n const rentalEndDateYear = endDate.getFullYear();\r\n const rentalEndDateMonth = endDate.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n endDate = await this.getMonthEndingDateFromSetting(rentalEndDateYearMonth);\r\n endDateYearMonth = rentalEndDateYearMonth;\r\n\r\n const rentalStartDate = new Date(startDate);\r\n var previousMonth = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() - 1)).getMonth() + 1;\r\n var PreviousMonthYear = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() - 1)).getFullYear();\r\n const PreviousMonthYearAndMonth = `${PreviousMonthYear}${previousMonth < 10 ? '0' : ''}${previousMonth}`;\r\n // if (PreviousMonthYearAndMonth >= currentYearMonth) {\r\n const monthEndDate = await this.getMonthEndingDateFromSetting(PreviousMonthYearAndMonth);\r\n const dateDiff = this.getDaysDifference(monthEndDate, new Date(startDate)); //calculates the diff between current month start date and previous monthend date \r\n if (dateDiff <= 7 && new Date(monthEndDate) < startDate) {\r\n if (new Date() > new Date(monthEndDate)) {\r\n startDate = new Date();\r\n }\r\n else {\r\n startDate = new Date(monthEndDate.setDate(monthEndDate.getDate() + 1));\r\n }\r\n }\r\n // }\r\n }\r\n var previousRentalYearMonth;\r\n var currentMonthEnd = new Date(startDate.getFullYear(), startDate.getMonth() + 1, 0);\r\n if (this.combinedMonthlyBookingEndDate) {\r\n const currentStartMonth = this.selectedMonthlyBooths[recordExist].RentStartPeriod;\r\n const [startMonthDate, startMonthYear] = currentStartMonth.split(' ');\r\n const startMonthIndex = this.getMonthIndex(startMonthDate);\r\n var currentMonthEnd = new Date(startMonthYear, startMonthIndex + 1, 0);\r\n const rentalEndDateYear = currentMonthEnd.getFullYear();\r\n const rentalEndDateMonth = currentMonthEnd.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n previousRentalYearMonth = rentalEndDateYearMonth;\r\n if (endDateYearMonth == rentalEndDateYearMonth)\r\n currentMonthEnd = await this.getMonthEndingDateFromSetting(rentalEndDateYearMonth);\r\n }\r\n const selectedDayOfWeek = el - 1\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n\r\n if (this.combinedMonthlyBookingEndDate) {\r\n currentDay = new Date(startDate);\r\n while (currentDay <= currentMonthEnd) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n currentMonthRentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n };\r\n\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates);\r\n\r\n if (this.combinedMonthlyBookingEndDate) {\r\n const compareCurrentMonthDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const currentMonthSortedDates = currentMonthRentalDates.sort(compareCurrentMonthDates);\r\n }\r\n else {\r\n currentMonthRentalDates = rentalDates;\r\n\r\n }\r\n\r\n var allRentalDates = rentalDates.map(el => new Date(el.startDate));\r\n var currentRentedEndDate = new Date(this.selectedMonthlyBooths[recordExist].RentalEndDate);\r\n const filteredRentalDates = allRentalDates.filter(rentalDate => rentalDate > currentRentedEndDate);\r\n var obj1 = {\r\n RentalDates: filteredRentalDates,\r\n BoothNumber: this.selectedMonthlyBooths[recordExist].BoothNumber\r\n }\r\n\r\n const rentalExist = await this.rentalService.checkRentalExits(this.marketId, obj1).toPromise();\r\n if (!rentalExist.Success) {\r\n await this.updateBoothRentDetails(recordExist, rentalDates, marketDays);\r\n } else {\r\n nonAvailableBooths.push(BoothNumber);\r\n }\r\n }\r\n }\r\n else {\r\n item.CMRenewalMonth = item.RentEndPeriod;\r\n item.RenewalStartMonth = \"This booking cannot be extended further!\"\r\n item.BookingCanExtend = false;\r\n nonAvailableBooths.push(item.BoothNumber);\r\n }\r\n }\r\n }\r\n }\r\n \r\n private async getEndDate(CMRenewalMonth, startDate: Date) {\r\n const [endMonthDate, endMonthYear] = CMRenewalMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n return new Date(endMonthYear, endMonthIndex + 1, 0);\r\n }\r\n \r\n private async getPreviousMonthEndDate(startDate: Date) {\r\n const rentalStartDate = new Date(startDate);\r\n rentalStartDate.setMonth(rentalStartDate.getMonth() - 1);\r\n const previousMonth = rentalStartDate.getMonth() + 1;\r\n const previousYear = rentalStartDate.getFullYear();\r\n return await this.getMonthEndingDateFromSetting(`${previousYear}${previousMonth.toString().padStart(2, '0')}`);\r\n }\r\n \r\n private filterCurrentMonthDates(startDate: Date, selectedDayOfWeek: number, currentMonthRentalDates: any[]) {\r\n let currentDay = new Date(startDate);\r\n const currentMonthEnd = new Date(startDate.getFullYear(), startDate.getMonth() + 1, 0);\r\n while (currentDay <= currentMonthEnd) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n currentMonthRentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n return currentMonthRentalDates;\r\n }\r\n \r\n private sortDates(dates: any[]): any[] {\r\n return dates.sort((a, b) => new Date(a.startDate).getTime() - new Date(b.startDate).getTime());\r\n }\r\n \r\n private filterDatesAfterEndDate(allRentalDates: Date[], currentRentedEndDate: string): Date[] {\r\n const currentEndDate = new Date(currentRentedEndDate);\r\n return allRentalDates.filter(date => date > currentEndDate);\r\n }\r\n \r\n private async updateBoothRentDetails(recordExist: number, rentalDates: any[], marketDays: number) {\r\n const { BoothTypeId, RenewalStartMonth, Status, PerDiem, Rent, SalesTax, CityTax } = this.selectedMonthlyBooths[recordExist];\r\n const res = await this.rentalService.getBoothRentalCombinedMonthlyCharges(this.marketId, {\r\n BoothTypeId,\r\n VendorId: this.vendorId,\r\n RentalStartPeriod: new Date(RenewalStartMonth),\r\n RentalEndPeriod: new Date(rentalDates[rentalDates.length - 1].startDate),\r\n PerDiemApplicable: PerDiem,\r\n Rent: this.parseCurrency(Rent),\r\n SalesTax: this.parseCurrency(SalesTax),\r\n CityTax: this.parseCurrency(CityTax)\r\n }).toPromise();\r\n \r\n if (res) {\r\n RentalEndDate: this.datePipe.transform(new Date(rentalDates[rentalDates.length - 1].startDate), 'MMM d, y'),\r\n this.selectedMonthlyBooths[recordExist].RentalEndDate = this.datePipe.transform(new Date(rentalDates[rentalDates.length - 1].startDate), 'MMM d, y');\r\n this.selectedMonthlyBooths[recordExist].MktDays = marketDays;\r\n this.selectedMonthlyBooths[recordExist].Rent = this.customCurrency.transform(res.Rent);\r\n this.selectedMonthlyBooths[recordExist].SalesTax = this.customCurrency.transform(res.SalesTax);\r\n this.selectedMonthlyBooths[recordExist].CityTax = this.customCurrency.transform(res.CityTax);\r\n this.selectedMonthlyBooths[recordExist].January = this.customCurrency.transform(res.JanRent);\r\n this.selectedMonthlyBooths[recordExist].February = this.customCurrency.transform(res.FebRent);\r\n this.selectedMonthlyBooths[recordExist].March = this.customCurrency.transform(res.MarRent);\r\n this.selectedMonthlyBooths[recordExist].April = this.customCurrency.transform(res.AprRent);\r\n this.selectedMonthlyBooths[recordExist].May = this.customCurrency.transform(res.MayRent);\r\n this.selectedMonthlyBooths[recordExist].June = this.customCurrency.transform(res.JunRent);\r\n this.selectedMonthlyBooths[recordExist].July = this.customCurrency.transform(res.JulRent);\r\n this.selectedMonthlyBooths[recordExist].August = this.customCurrency.transform(res.AugRent);\r\n this.selectedMonthlyBooths[recordExist].September = this.customCurrency.transform(res.SepRent);\r\n this.selectedMonthlyBooths[recordExist].October = this.customCurrency.transform(res.OctRent);\r\n this.selectedMonthlyBooths[recordExist].November = this.customCurrency.transform(res.NovRent);\r\n this.selectedMonthlyBooths[recordExist].December = this.customCurrency.transform(res.DecRent);\r\n this.selectedMonthlyBooths[recordExist].JanuaryMonthPresent = res.JanuaryMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].FebruaryMonthPresent = res.FebruaryMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].MarchMonthPresent = res.MarchMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].AprilMonthPresent = res.AprilMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].MayMonthPresent = res.MayMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].JuneMonthPresent = res.JuneMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].JulyMonthPresent = res.JulyMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].AugustMonthPresent = res.AugustMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].SeptemberMonthPresent = res.SeptemberMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].OctoberMonthPresent = res.OctoberMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].NovemberMonthPresent = res.NovemberMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].DecemberMonthPresent = res.DecemberMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].DisableJanMonth = res.JanRent || res.JanRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableFebMonth = res.FebRent || res.FebRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableMarMonth = res.MarRent || res.MarRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableAprMonth = res.AprRent || res.AprRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableMayMonth = res.MayRent || res.MayRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableJunMonth = res.JunRent || res.JunRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableJulMonth = res.JulRent || res.JulRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableAugMonth = res.AugRent || res.AugRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableSepMonth = res.SepRent || res.SepRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableOctMonth = res.OctRent || res.OctRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableNovMonth = res.NovRent || res.NovRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableDecMonth = res.DecRent || res.DecRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].ExtendRental = true;\r\n this.selectedMonthlyBooths[recordExist].AllRentalDates = rentalDates.map(el => new Date(el.startDate)); \r\n this.updateTotalCharges(res.Rent, res.SalesTax, res.CityTax);\r\n }\r\n }\r\n \r\n private parseCurrency(value: string) {\r\n return value.includes('(') && value.includes(')') ? -parseFloat(value.replace(/[^0-9.-]/g, '')) : parseFloat(value.replace(/[^0-9.-]/g, ''));\r\n }\r\n \r\n private updateTotalCharges(Rent, SalesTax, CityTax) {\r\n this.totalRentalCharge += Rent;\r\n this.totalSalesTax += SalesTax;\r\n this.totalSecondLeveltax += CityTax;\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString()) \r\n });\r\n }\r\n \r\n getCombinedMonthlyOtherRentals() {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedOtherItems = [];\r\n const currentYear = new Date().getFullYear();\r\n const currentMonth = new Date().getMonth() + 1;\r\n const currentYearMonth = `${currentYear}${currentMonth < 10 ? '0' : ''}${currentMonth}`;\r\n const sub = this.rentalService.getCombinedMonthlyOtherRentals(this.marketId, this.vendorId).subscribe(async (res: any[]) => {\r\n if (res) {\r\n this.allrentedOtherItems = res;\r\n for(const el of res){\r\n if (el.YearMonth >= currentYearMonth) { \r\n const year = parseInt(el.YearMonth.substring(0, 4));\r\n const month = parseInt(el.YearMonth.substring(4, 6));\r\n const date = new Date(year, month - 1, 1);\r\n const formattedDate = this.datePipe.transform(date, 'MMMM yyyy');\r\n const rentEndPeriodIndex = this.monthlyMarketDays.findIndex(e => e.RentalMonths ==formattedDate);\r\n const renewalStartMonth = this.monthlyMarketDays.length > 1 ? this.monthlyMarketDays[rentEndPeriodIndex +1].RentalMonths : \"\";\r\n \r\n const index = this.selectedOtherItems.findIndex(item => item.Id === el.OtherItemId && item.RentalMonth == formattedDate && item.Reference == el.Reference && item.BoothNo == el.BoothNumber && item.Recurring == el.Recurring);\r\n if (index !== -1) {\r\n this.selectedOtherItems[index].Quantity += el.Quantity;\r\n this.selectedOtherItems[index].MonthlyRentalIds += ',' + el.OtherRentalId\r\n var otherItemTotal = (el.OtherCharge * this.selectedOtherItems[index].Quantity).toString(); \r\n this.selectedOtherItems[index].OtherItemtotal = otherItemTotal;\r\n }\r\n else { \r\n var otherItemTotal = (el.OtherCharge * el.Quantity).toString(); \r\n const ob = {\r\n Id: el.OtherItemId,\r\n MonthOtherRentalId: el.OtherRentalId,\r\n OtherItem: el.OtherItemName,\r\n OtherItemCharge: this.customCurrency.transform(\"0\"),\r\n Quantity: el.Quantity,\r\n OtherItemtotal: this.customCurrency.transform(\"0\"),\r\n RentalMonth: formattedDate,\r\n SalesTax: this.customCurrency.transform('0'),\r\n CityTax: this.customCurrency.transform('0'),\r\n CurrentRentalMonth: formattedDate,\r\n CurrentOtherItemtotal: this.customCurrency.transform(el.OtherCharge.toString()),\r\n CurrentSalesTax: this.customCurrency.transform(el.SalesTax.toString()),\r\n CurrentSecLevelTax: this.customCurrency.transform(el.SecLevelTax.toString()),\r\n BoothNo: el.BoothNumber ? el.BoothNumber : \"none\",\r\n Recurring: el.Recurring,\r\n Reference: el.Reference,\r\n NewItem: false,\r\n MonthlyRentalIds: el.OtherRentalId.toString(),\r\n RenewalStartMonth: formattedDate,\r\n CMRenewalMonth:formattedDate,\r\n BookingCanExtend: true,\r\n RentEndPeriodIndex:rentEndPeriodIndex\r\n }\r\n this.selectedOtherItems.push(ob);\r\n }\r\n }\r\n else {\r\n const rentEndPeriodIndex = this.monthlyMarketDays.findIndex(e => e.RentalMonths ==formattedDate);\r\n const renewalStartMonth = this.monthlyMarketDays.length > 1 ? this.monthlyMarketDays[rentEndPeriodIndex +1].RentalMonths : \"\";\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: el.OtherItemId,\r\n VendorId: this.vendorId,\r\n Quantity: el.Quantity,\r\n OtherItemCharge: el.OtherCharge\r\n }\r\n const date = new Date(currentYear, currentMonth - 1, 1);\r\n const formattedDate = this.datePipe.transform(date, 'MMMM yyyy');\r\n const res = await this.rentalService.getOtherItemsRentalCharges(obj).toPromise();\r\n if(res)\r\n {\r\n const ob = {\r\n Id: el.OtherItemId,\r\n MonthOtherRentalId: el.OtherRentalId,\r\n OtherItem: el.OtherItemName,\r\n OtherItemCharge: this.customCurrency.transform(el.OtherCharge),\r\n Quantity: el.Quantity,\r\n OtherItemtotal: this.customCurrency.transform((el.OtherCharge * el.Quantity).toString()),\r\n RentalMonth: formattedDate,\r\n SalesTax: this.customCurrency.transform(res.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(res.CityTax.toString()),\r\n BoothNo: el.BoothNumber ? el.BoothNumber : \"none\",\r\n Recurring: el.Recurring,\r\n Reference: el.Reference,\r\n NewItem: false,\r\n MonthlyRentalIds: '',\r\n Status: \"R\",\r\n RentEndPeriodIndex:rentEndPeriodIndex,\r\n BookingCanExtend: true,\r\n RenewalStartMonth: formattedDate,\r\n CMRenewalMonth:formattedDate,\r\n }\r\n this.selectedOtherItems.push(ob);\r\n const OtherItemtotal = el.OtherCharge * el.Quantity;\r\n if (this.allowOtherItemRenewal) {\r\n this.totalOtherRentalCharge = OtherItemtotal;\r\n this.totalSalesTax = res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax = res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n otherCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n }\r\n }\r\n }\r\n } \r\n \r\n this.renewCMOtherCharges();\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n saveRentalWithPayment() { \r\n this.savePayment = false; \r\n var creditCardAmount = this.bookingDetailsForm.get('paymentAmount').value.toString().includes('(') && this.bookingDetailsForm.get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, ''));\r\n var convenienceFee = this.bookingDetailsForm.get('convenienceFee').value.toString().includes('(') && this.bookingDetailsForm.get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, ''));\r\n const totalAmountPaid = creditCardAmount + convenienceFee;\r\n if (totalAmountPaid != 0 || (totalAmountPaid == 0 && this.paymentAdjustedWithPriorBal)) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to proceed with the payment?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n if (this.paymentAdjustedWithPriorBal) {\r\n var obj = {\r\n PaymentSuccess: true,\r\n OrderId: \"\",\r\n VerifoneId: 0\r\n }\r\n this.savePayment = true;\r\n this.PaymentResponse(obj)\r\n } else {\r\n if (this.paymentGatewayCredentials && this.processCreditCardOnline)\r\n this.processPayment = true;\r\n else {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Credit card cannot be processed.`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n }\r\n }\r\n });\r\n }\r\n else {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Please enter the payment amount!`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n }\r\n\r\n getCombinedWeeklyOtherRentals() {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedOtherItems = []; \r\n const weekStartDate = this.weeklyMarketDays[0].RentalStartDays.split('-')[0];\r\n const sub = this.rentalService.getCombinedWeeklyOtherRentals(this.marketId,this.vendorId).subscribe(async (res: any[]) => {\r\n if (res) {\r\n this.allrentedOtherItems = res;\r\n for(const el of res){\r\n var RentalWeekRecord = this.weeklyMarketDays.filter(date => new Date(date.RentalStartDays.split('-')[0]) <= new Date(el.RentalWeekDay)\r\n && new Date(date.RentalStartDays.split('-')[1]) >= new Date(el.RentalWeekDay))\r\n if (RentalWeekRecord.length > 0)\r\n var RentalWeek = RentalWeekRecord[0].RentalStartDays\r\n const rentEndPeriodIndex = this.weeklyMarketDays.findIndex(e=>e.RentalEndDays == RentalWeek);\r\n const renewalStartWeek = this.weeklyMarketDays.length > 1 ? this.weeklyMarketDays[rentEndPeriodIndex +1].RentalEndDays : \"\";\r\n\r\n if (new Date(el.RentalWeekDay) >= new Date(weekStartDate)) {\r\n const index = this.selectedOtherItems.findIndex(item => item.Id === el.OtherItemId && item.RentalWeek == el.RentalWeek && item.Reference == el.Reference && item.BoothNo == el.BoothNumber && item.Recurring == el.Recurring);\r\n if (index !== -1) {\r\n this.selectedOtherItems[index].Quantity += el.Quantity;\r\n this.selectedOtherItems[index].WeeklyOtherRentalIds += ',' + el.OtherRentalId\r\n }\r\n const ob = {\r\n Id: el.OtherItemId,\r\n WeekOtherRentalId: el.OtherRentalId,\r\n OtherItem: el.OtherItemName,\r\n OtherItemCharge: this.customCurrency.transform('0'),\r\n Quantity: el.Quantity,\r\n OtherItemtotal: this.customCurrency.transform('0'),\r\n RentalWeek: RentalWeek,\r\n SalesTax: this.customCurrency.transform('0'),\r\n CityTax: this.customCurrency.transform('0'),\r\n CurrentRentalWeek: RentalWeek,\r\n CurrentOtherItemtotal: this.customCurrency.transform(el.OtherCharge.toString()),\r\n CurrentSalesTax: this.customCurrency.transform(el.SalesTax.toString()),\r\n CurrentSecLevelTax: this.customCurrency.transform(el.SecLevelTax.toString()),\r\n BoothNo: el.BoothNumber,\r\n Recurring: el.Recurring,\r\n NewItem: false,\r\n Reference: el.Reference,\r\n WeeklyOtherRentalIds: el.OtherRentalId.toString(),\r\n Status: \"B\",\r\n RentEndPeriodIndex: rentEndPeriodIndex,\r\n RenewalStartWeek: renewalStartWeek,\r\n CWRenewalWeek: renewalStartWeek,\r\n BookingCanExtend: true,\r\n }\r\n this.selectedOtherItems.push(ob);\r\n }\r\n else {\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: el.OtherItemId,\r\n VendorId: this.vendorId,\r\n Quantity: el.Quantity,\r\n OtherItemCharge: el.OtherCharge\r\n }\r\n\r\n const res = await this.rentalService.getOtherItemsRentalCharges(obj).toPromise();\r\n if(res)\r\n {\r\n const ob = {\r\n Id: el.OtherItemId,\r\n MonthOtherRentalId: el.OtherRentalId,\r\n OtherItem: el.OtherItemName,\r\n OtherItemCharge: this.customCurrency.transform(el.OtherCharge),\r\n Quantity: el.Quantity,\r\n OtherItemtotal: this.customCurrency.transform((el.OtherCharge * el.Quantity).toString()),\r\n RentalWeek: this.weeklyMarketDays[0].RentalStartDays,\r\n SalesTax: this.customCurrency.transform(res.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(res.CityTax.toString()),\r\n BoothNo: el.BoothNumber ? el.BoothNumber : \"none\",\r\n Recurring: el.Recurring,\r\n Reference: el.Reference,\r\n NewItem: false,\r\n WeeklyOtherRentalIds: '',\r\n Status: \"R\",\r\n RentEndPeriodIndex:rentEndPeriodIndex,\r\n RenewalStartWeek: this.weeklyMarketDays[0].RentalStartDays,\r\n CWRenewalWeek: this.weeklyMarketDays[0].RentalStartDays,\r\n BookingCanExtend: true,\r\n }\r\n this.selectedOtherItems.push(ob);\r\n const OtherItemtotal = el.OtherCharge * el.Quantity;\r\n if (this.allowOtherItemRenewal) {\r\n this.totalOtherRentalCharge += OtherItemtotal;\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n otherCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n }\r\n }\r\n }\r\n }\r\n this.renewCWOtherCharges();\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getDateRange(endDate: Date): string {\r\n const startDate = new Date(endDate);\r\n startDate.setDate(endDate.getDate() - 6); // Subtract 6 days\r\n\r\n // Format dates as \"MMM d, yyyy\"\r\n const options: Intl.DateTimeFormatOptions = { month: 'short', day: 'numeric', year: 'numeric' };\r\n const startDateStr = startDate.toLocaleDateString('en-US', options);\r\n const endDateStr = endDate.toLocaleDateString('en-US', options);\r\n\r\n return `${startDateStr} - ${endDateStr}`;\r\n }\r\n\r\n private async fetchMarketDays() {\r\n if (!this.selectedMarketDays || this.selectedMarketDays.length === 0) {\r\n const response = await this.marketInfoService.getMarketDays(this.marketId).toPromise();\r\n if (response) {\r\n response.Sunday && this.selectedMarketDays.push(1);\r\n response.Monday && this.selectedMarketDays.push(2);\r\n response.Tuesday && this.selectedMarketDays.push(3);\r\n response.Wednesday && this.selectedMarketDays.push(4);\r\n response.Thursday && this.selectedMarketDays.push(5);\r\n response.Friday && this.selectedMarketDays.push(6);\r\n response.Saturday && this.selectedMarketDays.push(7);\r\n }\r\n }\r\n }\r\n\r\n private async CWRentalDateList(startDate,endDate){\r\n var StartDateList = [];\r\n for (const date of this.selectedMarketDays) {\r\n const selectedDayOfWeek = date - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n // marketDays += 1;\r\n StartDateList.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n\r\n if (this.datePipe.transform(currentDay, 'MM/dd/yyyy') == this.datePipe.transform(endDate, 'MM/dd/yyyy')) {\r\n if (StartDateList && StartDateList.length == 0) {\r\n endDate.setDate(endDate.getDate() + 1);\r\n endDate = new Date(this.weeklyMarketDays[0].RentalEndDays.split('-')[1]);\r\n }\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = StartDateList.sort(compareDates);\r\n return StartDateList;\r\n }\r\n\r\n getCombinedWeeklyRental() {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedWeeklyBooths = [];\r\n var existingBooths = []; \r\n const sub = this.rentalService.getCombinedWeeklyBookings(this.marketId,this.vendorId).subscribe(async (res: any[]) => {\r\n if (res) {\r\n existingBooths = res;\r\n for (const el of existingBooths) {\r\n var StartDateList;\r\n var initialStartDate;\r\n var marketDays = 0;\r\n //var marketDay;\r\n const today: Date = new Date(new Date().toDateString());\r\n\r\n var startDate = new Date(el.RentalStartDate);\r\n var endDate = new Date(el.RentalEndDate);\r\n if (el.Status == \"R\" && startDate < today) {\r\n startDate = today;\r\n initialStartDate = startDate;\r\n endDate = new Date(this.weeklyMarketDays[0].RentalEndDays.split('-')[1]);\r\n }\r\n await this.fetchMarketDays(); \r\n StartDateList = await this.CWRentalDateList(startDate,endDate); \r\n\r\n if (el.Status == \"R\") {\r\n if (initialStartDate <= today) {\r\n el.RentalStartDate = StartDateList[0].startDate\r\n el.RentalEndDate = StartDateList[StartDateList.length - 1].startDate;\r\n }\r\n }\r\n \r\n if (el.Status == \"R\") {\r\n await this.bindCWReservations(el,StartDateList,marketDays);\r\n }\r\n else {\r\n var rentalStartDateRecord = this.weeklyMarketDays.filter(date => new Date(date.RentalStartDays.split('-')[0]) <= new Date(el.RentalStartDate)\r\n && new Date(date.RentalStartDays.split('-')[1]) >= new Date(el.RentalStartDate))\r\n if (rentalStartDateRecord.length > 0)\r\n var rentalStartDate = rentalStartDateRecord[0].RentalStartDays\r\n\r\n var rentalEndDateRecord = this.weeklyMarketDays.filter(date => new Date(date.RentalEndDays.split('-')[0]) <= new Date(el.RentalEndDate)\r\n && new Date(date.RentalEndDays.split('-')[1]) >= new Date(el.RentalEndDate))\r\n if (rentalEndDateRecord.length > 0)\r\n var rentalEndDate = rentalEndDateRecord[0].RentalEndDays\r\n \r\n if (!rentalEndDate) {\r\n rentalEndDate = this.getDateRange(new Date(rentalEndDate));\r\n }\r\n \r\n const rentEndPeriodIndex = this.weeklyMarketDays.findIndex(e=>e.RentalEndDays == rentalEndDate);\r\n const renewalStartWeek = this.weeklyMarketDays.length > 1 ? this.weeklyMarketDays[rentEndPeriodIndex +1].RentalEndDays : \"\";\r\n\r\n if (rentalStartDate && rentalEndDate) {\r\n var month = this.datePipe.transform(el.RentalEndDate, 'MMM');\r\n const monthMap: Record = {\r\n jan: \"JanuaryMonthPresent\",\r\n feb: \"FebruaryMonthPresent\",\r\n mar: \"MarchMonthPresent\",\r\n apr: \"AprilMonthPresent\",\r\n may: \"MayMonthPresent\",\r\n jun: \"JuneMonthPresent\",\r\n jul: \"JulyMonthPresent\",\r\n aug: \"AugustMonthPresent\",\r\n sep: \"SeptemberMonthPresent\",\r\n oct: \"OctoberMonthPresent\",\r\n nov: \"NovemberMonthPresent\",\r\n dec: \"DecemberMonthPresent\"\r\n };\r\n \r\n // Initialize month presence variables dynamically\r\n const monthPresence: Record = {};\r\n Object.keys(monthMap).forEach(key => monthPresence[monthMap[key]] = false);\r\n \r\n // Set the correct month to true\r\n if (monthMap[month.toLowerCase()]) {\r\n monthPresence[monthMap[month.toLowerCase()]] = true;\r\n }\r\n \r\n // Create an object with dynamic month fields\r\n const months = [\r\n \"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \r\n \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"\r\n ];\r\n\r\n const monthValues = months.reduce((acc, month) => {\r\n acc[month] = this.customCurrency.transform('0.00');\r\n acc[`Disable${month.slice(0, 3)}Month`] = true;\r\n return acc;\r\n }, {} as Record);\r\n \r\n const ob = {\r\n WeeklyRentalId: el.WeeklyRentalId,\r\n BoothNumber: el.BoothNumber,\r\n BoothType: el.BoothType,\r\n BoothTypeId: el.BoothTypeId,\r\n RentStartPeriod: rentalStartDate,\r\n RentEndPeriod: rentalEndDate,\r\n RentalStartDate: this.datePipe.transform(new Date(el.RentalStartDate), 'MMM d, y'),\r\n RentalEndDate: this.datePipe.transform(new Date(el.RentalEndDate), 'MMM d, y'),\r\n RentalSavedEndDate: this.datePipe.transform(el.RentalEndDate, 'MMM d, y'),\r\n Product: el.ProductId,\r\n ProductName: this.vendorProducts.find(e => e.ProductId == el.ProductId)?.ProductName,\r\n MktDays: marketDays,\r\n PerDiemRent: this.customCurrency.transform('0.00'),\r\n StartDateList: StartDateList,\r\n Rent: this.customCurrency.transform(el.RentalCharge),\r\n SalesTax: this.customCurrency.transform(el.SalesTax),\r\n CityTax: this.customCurrency.transform(el.SecLevelTax),\r\n CurrentRentStartPeriod: this.weeklyMarketDays[0].RentalEndDays,\r\n CurrentRentEndPeriod: this.weeklyMarketDays[0].RentalEndDays,\r\n CurrentRent: this.customCurrency.transform(el.RentalCharge),\r\n CurrentSalesTax: this.customCurrency.transform(el.SalesTax),\r\n CurrentSecondTax: this.customCurrency.transform(el.SecLevelTax),\r\n Sunday: el.Sunday,\r\n Monday: el.Monday,\r\n Tuesday: el.Tuesday,\r\n Wednesday: el.Wednesday,\r\n Thursday: el.Thursday,\r\n Friday: el.Friday,\r\n Saturday: el.Saturday,\r\n Reservation: el.BoothReserved,\r\n Drop: el.DoNotRenew,\r\n NewBooth: false,\r\n ...monthPresence,\r\n ...monthValues, // Replaces `Object.fromEntries()`\r\n DisableStartDate: true,\r\n BookingCanExtend: true,\r\n RenewalStartWeek: renewalStartWeek,\r\n CWRenewalWeek: this.weeklyMarketDays.length > 1 ? this.weeklyMarketDays[rentEndPeriodIndex + 1].RentalEndDays : \"\",\r\n RentEndPeriodIndex: rentEndPeriodIndex,\r\n BlockRenewal: false\r\n }; \r\n this.selectedWeeklyBooths.push(ob);\r\n \r\n }\r\n }\r\n } \r\n \r\n this.loaderIcon = Promise.resolve(false);\r\n this.handleCWEndDateChange();\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n async bindCWReservations(el,StartDateList,marketDays){\r\n var obj = {\r\n BoothTypeId: el.BoothTypeId,\r\n VendorId: this.vendorId,\r\n RentalStartPeriod: new Date(this.weeklyMarketDays[0].RentalEndDays.split('-')[0]),\r\n RentalEndPeriod: new Date(this.weeklyMarketDays[0].RentalEndDays.split('-')[1]),\r\n }\r\n var res = await this.rentalService.getBoothRentalCombinedWeeklyCharges(this.marketId,obj).toPromise();\r\n if(res){\r\n var rentalStartDateRecord = this.weeklyMarketDays.filter(date => this.datePipe.transform(new Date(date.RentalStartDays.split('-')[0]), 'MM/dd/yyyy') <= this.datePipe.transform(new Date(el.RentalStartDate), 'MM/dd/yyyy')\r\n && this.datePipe.transform(new Date(date.RentalStartDays.split('-')[1]), 'MM/dd/yyyy') >= this.datePipe.transform(new Date(el.RentalStartDate), 'MM/dd/yyyy'))\r\n if (rentalStartDateRecord.length > 0)\r\n var rentalStartDate = rentalStartDateRecord[0].RentalStartDays\r\n\r\n var rentalEndDateRecord = this.weeklyMarketDays.filter(date => this.datePipe.transform(new Date(date.RentalEndDays.split('-')[0]), 'MM/dd/yyyy') <= this.datePipe.transform(new Date(el.RentalEndDate), 'MM/dd/yyyy')\r\n && this.datePipe.transform(new Date(date.RentalEndDays.split('-')[1]), 'MM/dd/yyyy') >= this.datePipe.transform(new Date(el.RentalEndDate), 'MM/dd/yyyy'))\r\n if (rentalEndDateRecord.length > 0)\r\n var rentalEndDate = rentalEndDateRecord[0].RentalEndDays\r\n\r\n const rentEndPeriodIndex = this.weeklyMarketDays.findIndex(e=>e.RentalEndDays == rentalEndDate);\r\n const renewalStartWeek = this.weeklyMarketDays[rentEndPeriodIndex].RentalEndDays;\r\n\r\n const ob = {\r\n WeeklyRentalId: el.WeeklyRentalId,\r\n BoothNumber: el.BoothNumber,\r\n BoothType: el.BoothType,\r\n BoothTypeId: el.BoothTypeId,\r\n RentStartPeriod: rentalStartDate,\r\n RentEndPeriod: rentalEndDate,\r\n RentalStartDate: this.datePipe.transform(new Date(el.RentalStartDate), 'MMM d, y'),\r\n RentalEndDate: this.datePipe.transform(new Date(el.RentalEndDate), 'MMM d, y'),\r\n RentalSavedEndDate: this.datePipe.transform(el.RentalEndDate, 'MMM d, y'),\r\n Product: el.ProductId,\r\n ProductName: this.vendorProducts.filter(e=>e.ProductId == el.ProductId)[0]?.ProductName,\r\n StartDateList: StartDateList,\r\n MktDays: marketDays,\r\n PerDiemRent: this.customCurrency.transform('0.00'),\r\n Rent: this.customCurrency.transform(res.Rent),\r\n SalesTax: this.customCurrency.transform(res.SalesTax),\r\n CityTax: this.customCurrency.transform(res.CityTax),\r\n CurrentRentStartPeriod: this.weeklyMarketDays[0].RentalEndDays,\r\n CurrentRentEndPeriod: this.weeklyMarketDays[0].RentalEndDays,\r\n CurrentRent: this.customCurrency.transform(el.RentalCharge),\r\n CurrentSalesTax: this.customCurrency.transform(el.SalesTax),\r\n CurrentSecondTax: this.customCurrency.transform(el.SecLevelTax),\r\n Sunday: el.Sunday,\r\n Monday: el.Monday,\r\n Tuesday: el.Tuesday,\r\n Wednesday: el.Wednesday,\r\n Thursday: el.Thursday,\r\n Friday: el.Friday,\r\n Saturday: el.Saturday,\r\n Reservation: el.BoothReserved,\r\n Drop: el.DoNotRenew,\r\n January: this.customCurrency.transform(res.JanRent),\r\n February: this.customCurrency.transform(res.FebRent),\r\n March: this.customCurrency.transform(res.MarRent),\r\n April: this.customCurrency.transform(res.AprRent),\r\n May: this.customCurrency.transform(res.MayRent),\r\n June: this.customCurrency.transform(res.JunRent),\r\n July: this.customCurrency.transform(res.JulRent),\r\n August: this.customCurrency.transform(res.AugRent),\r\n September: this.customCurrency.transform(res.SepRent),\r\n October: this.customCurrency.transform(res.OctRent),\r\n November: this.customCurrency.transform(res.NovRent),\r\n December: this.customCurrency.transform(res.DecRent),\r\n JanuaryMonthPresent: res.JanuaryMonthPresent,\r\n FebruaryMonthPresent: res.FebruaryMonthPresent,\r\n MarchMonthPresent: res.MarchMonthPresent,\r\n AprilMonthPresent: res.AprilMonthPresent,\r\n MayMonthPresent: res.MayMonthPresent,\r\n JuneMonthPresent: res.JuneMonthPresent,\r\n JulyMonthPresent: res.JulyMonthPresent,\r\n AugustMonthPresent: res.AugustMonthPresent,\r\n SeptemberMonthPresent: res.SeptemberMonthPresent,\r\n OctoberMonthPresent: res.OctoberMonthPresent,\r\n NovemberMonthPresent: res.NovemberMonthPresent,\r\n DecemberMonthPresent: res.DecemberMonthPresent,\r\n DisableJanMonth: res.JanRent ? false : true,\r\n DisableFebMonth: res.FebRent ? false : true,\r\n DisableMarMonth: res.MarRent ? false : true,\r\n DisableAprMonth: res.AprRent ? false : true,\r\n DisableMayMonth: res.MayRent ? false : true,\r\n DisableJunMonth: res.JunRent ? false : true,\r\n DisableJulMonth: res.JulRent ? false : true,\r\n DisableAugMonth: res.AugRent ? false : true,\r\n DisableSepMonth: res.SepRent ? false : true,\r\n DisableOctMonth: res.OctRent ? false : true,\r\n DisableNovMonth: res.NovRent ? false : true,\r\n DisableDecMonth: res.DecRent ? false : true,\r\n DisableStartDate: false,\r\n Status: el.Status,\r\n NewBooth: false,\r\n BookingCanExtend: true,\r\n RenewalStartWeek:renewalStartWeek,\r\n CWRenewalWeek: this.weeklyMarketDays[rentEndPeriodIndex].RentalEndDays,\r\n RentEndPeriodIndex:rentEndPeriodIndex,\r\n BlockRenewal: false\r\n }\r\n if (this.allowCWRentalRenewal) {\r\n this.totalRentalCharge += res.Rent.toString().includes('(') && res.Rent.toString().includes(')') ? -1 * parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n }\r\n this.selectedWeeklyBooths.push(ob);\r\n };\r\n }\r\n\r\n PaymentResponse(response) {\r\n this.loaderIcon = Promise.resolve(true);\r\n if (response.PaymentSuccess) {\r\n this.verifoneId = response.VerifoneId;\r\n switch (this.rentalType) {\r\n case 1:\r\n var convenienceFee = this.bookingDetailsForm.get('convenienceFee').value.toString().includes('(') && this.bookingDetailsForm.get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, ''));\r\n if (convenienceFee > 0 && this.paymentOnly) {\r\n this.paymentOnly = false;\r\n }\r\n var obj = {\r\n VendorId: this.vendorId,\r\n PaymentOrderId: response.OrderId,\r\n RentalCharge: this.bookingDetailsForm.get('rentalCharge').value.toString().includes('(') && this.bookingDetailsForm.get('rentalCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, '')),\r\n SalesTax: 0,\r\n SecLevelTax: 0,\r\n OtherCharge: this.bookingDetailsForm.get('otherCharge').value.toString().includes('(') && this.bookingDetailsForm.get('otherCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, '')),\r\n PriorBalance: this.bookingDetailsForm.get('priorBalance').value.toString().includes('(') && this.bookingDetailsForm.get('priorBalance').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('priorBalance').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('priorBalance').value.toString().replace(/[^0-9.-]/g, '')),\r\n TotalBalanceDue: this.bookingDetailsForm.get('balanceDue').value.toString().includes('(') && this.bookingDetailsForm.get('balanceDue').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')),\r\n RentalNotes: \"\",\r\n CashAmount: 0,\r\n CheckAmount: 0,\r\n CheckNo: \"\",\r\n ChangeAmount: 0,\r\n CardAmount: this.bookingDetailsForm.get('paymentAmount').value.toString().includes('(') && this.bookingDetailsForm.get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')),\r\n DirectDebitAmount: 0,\r\n CardType: \"\",\r\n PaymentDone: true,\r\n WebRentalRequest: true,\r\n PaymentDueDate: null,\r\n VerifoneId: response.VerifoneId,\r\n DiscountAmount: this.bookingDetailsForm.get('discount').value.toString().includes('(') && this.bookingDetailsForm.get('discount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('discount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('discount').value.toString().replace(/[^0-9.-]/g, '')),\r\n ConvenienceFee: this.bookingDetailsForm.get('convenienceFee').value.toString().includes('(') && this.bookingDetailsForm.get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')),\r\n BookingFee: this.bookingDetailsForm.get('additionalCharge').value.toString().includes('(') && this.bookingDetailsForm.get('additionalCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('additionalCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('additionalCharge').value.toString().replace(/[^0-9.-]/g, '')),\r\n DailyRentalBooth: [],\r\n DailyRentalOtherCharges: [],\r\n AppliedDiscountModel: []\r\n }\r\n\r\n var objSelectedBooth = [];\r\n if (this.selectedBooths.length > 0) {\r\n this.selectedBooths.forEach((item) => {\r\n if (item.NewBooth) {\r\n objSelectedBooth.push({\r\n DailyRentalId: item.DailyRentalId,\r\n BoothNumber: item.BoothNumber,\r\n BoothTypeId: item.BoothTypeId,\r\n ProductId: item.Product,\r\n BoothType: item.BoothType,\r\n RentalDay: new Date(item.RentalDay),\r\n RentalCharge: item.Rent.includes('(') && item.Rent.includes(')') ? -1 * parseFloat(item.Rent.replace(/[^0-9.-]/g, '')) : parseFloat(item.Rent.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n })\r\n }\r\n });\r\n }\r\n\r\n var objSelectedOtherCharge = [];\r\n if (this.selectedOtherItems.length > 0) {\r\n this.selectedOtherItems.forEach((item) => {\r\n if (item.NewItem) {\r\n objSelectedOtherCharge.push({\r\n OtherItemId: item.Id,\r\n OtherItemName: item.OtherItem,\r\n OtherItemCharge: item.OtherItemtotal.includes('(') && item.OtherItemtotal.includes(')') ? -1 * parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')),\r\n Quantity: item.Quantity,\r\n RentalDay: new Date(item.RentalDay),\r\n BoothNumber: item.BoothNo,\r\n OtherCharge: item.OtherItemCharge.includes('(') && item.OtherItemCharge.includes(')') ? -1 * parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n Reference: item.Reference\r\n })\r\n }\r\n });\r\n }\r\n\r\n if (objSelectedBooth.length > 0)\r\n obj.DailyRentalBooth = objSelectedBooth;\r\n\r\n if (objSelectedOtherCharge.length > 0)\r\n obj.DailyRentalOtherCharges = objSelectedOtherCharge;\r\n\r\n const sub = this.rentalService.SaveDailyRental(obj).subscribe(async (res: any) => {\r\n if (res.Success) {\r\n this.accountReceipId = res.Id;\r\n this.toastr.success($localize`Transaction saved successfully`, $localize`Success`, this.toasterConfig);\r\n this.openConfirmationPage = true;\r\n } else {\r\n this.toastr.error($localize`Error occurred while saving the rental transaction`, $localize`Error`, this.toasterConfig);\r\n if (this.verifoneId) {\r\n this.voidPayment = true;\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, (err) => {\r\n this.toastr.error($localize`Error occurred while saving the rental transaction`, $localize`Error`, this.toasterConfig);\r\n // const url = 'ops/vendors/details/' + this.vendorId + '/3';\r\n // this.router.navigate([url]); \r\n\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n\r\n this.subscriptions.push(sub);\r\n break;\r\n\r\n case 4:\r\n var convenienceFee = this.bookingDetailsForm.get('convenienceFee').value.toString().includes('(') && this.bookingDetailsForm.get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, ''));\r\n if (convenienceFee > 0 && this.paymentOnly) {\r\n this.paymentOnly = false;\r\n }\r\n var objCM = {\r\n VendorId: this.vendorId,\r\n PaymentOrderId: response.OrderId,\r\n RentalCharge: this.bookingDetailsForm.get('rentalCharge').value.toString().includes('(') && this.bookingDetailsForm.get('rentalCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, '')),\r\n SalesTax: 0,\r\n SecLevelTax: 0,\r\n OtherCharge: this.bookingDetailsForm.get('otherCharge').value.toString().includes('(') && this.bookingDetailsForm.get('otherCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, '')),\r\n PriorBalance: this.bookingDetailsForm.get('priorBalance').value.toString().includes('(') && this.bookingDetailsForm.get('priorBalance').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('priorBalance').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('priorBalance').value.toString().replace(/[^0-9.-]/g, '')),\r\n TotalBalanceDue: this.bookingDetailsForm.get('balanceDue').value.toString().includes('(') && this.bookingDetailsForm.get('balanceDue').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')),\r\n RentalNotes: \"\",\r\n CashAmount: 0,\r\n CheckAmount: 0,\r\n CheckNo: \"\",\r\n ChangeAmount: 0,\r\n CardAmount: this.bookingDetailsForm.get('paymentAmount').value.toString().includes('(') && this.bookingDetailsForm.get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')),\r\n DirectDebitAmount: 0,\r\n CardType: \"\",\r\n PaymentDone: true,\r\n WebRentalRequest: true,\r\n PaymentDueDate: null,\r\n VerifoneId: response.VerifoneId,\r\n DiscountAmount: this.bookingDetailsForm.get('discount').value.toString().includes('(') && this.bookingDetailsForm.get('discount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('discount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('discount').value.toString().replace(/[^0-9.-]/g, '')),\r\n ConvenienceFee: this.bookingDetailsForm.get('convenienceFee').value.toString().includes('(') && this.bookingDetailsForm.get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')),\r\n BookingFee: this.bookingDetailsForm.get('additionalCharge').value.toString().includes('(') && this.bookingDetailsForm.get('additionalCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('additionalCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('additionalCharge').value.toString().replace(/[^0-9.-]/g, '')),\r\n MonthlyRentalBooth: [],\r\n MonthlyOtherRentalCharges: [],\r\n AppliedDiscountModel: []\r\n }\r\n\r\n var objSelectedBooth = [];\r\n if (this.selectedMonthlyBooths.length > 0) {\r\n this.selectedMonthlyBooths.forEach((item, i) => {\r\n const rentalStartDateYear = new Date(item.RentalEndDate).getFullYear();\r\n const rentalStartDateMonth = new Date(item.RentalEndDate).getMonth() + 1;\r\n const rentalStartDateYearMonth = `${rentalStartDateYear}${rentalStartDateMonth < 10 ? '0' : ''}${rentalStartDateMonth}`;\r\n if (item.Reservation) {\r\n objSelectedBooth.push({\r\n MonthlyRentalId: item.MonthlyRentalId,\r\n BoothNumber: item.BoothNumber,\r\n BoothTypeId: item.BoothTypeId,\r\n ProductId: item.Product,\r\n BoothType: item.BoothType,\r\n RentalStartDate: new Date(item.RentalStartDate),\r\n RentalEndDate: new Date(item.RentalEndDate),\r\n RentalYearMonth: rentalStartDateYearMonth,\r\n BoothReserved: item.Reservation,\r\n DoNotRenew: item.Drop,\r\n PerDiem: item.PerDiem,\r\n PerdiemRent: item.PerDiemRent.includes('(') && item.PerDiemRent.includes(')') ? -1 * parseFloat(item.PerDiemRent.replace(/[^0-9.-]/g, '')) : parseFloat(item.PerDiemRent.replace(/[^0-9.-]/g, '')),\r\n Monday: item.Monday,\r\n Tuesday: item.Tuesday,\r\n Wednesday: item.Wednesday,\r\n Thursday: item.Thursday,\r\n Friday: item.Friday,\r\n Saturday: item.Saturday,\r\n Sunday: item.Sunday,\r\n RentalCharge: item.Rent.includes('(') && item.Rent.includes(')') ? -1 * parseFloat(item.Rent.replace(/[^0-9.-]/g, '')) : parseFloat(item.Rent.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n JanRent: item.January ? (item.January.includes('(') && item.January.includes(')') ? -1 * parseFloat(item.January.replace(/[^0-9.-]/g, '')) : parseFloat(item.January.replace(/[^0-9.-]/g, ''))) : 0,\r\n FebRent: item.February ? (item.February.includes('(') && item.February.includes(')') ? -1 * parseFloat(item.February.replace(/[^0-9.-]/g, '')) : parseFloat(item.February.replace(/[^0-9.-]/g, ''))) : 0,\r\n MarRent: item.March ? (item.March.includes('(') && item.March.includes(')') ? -1 * parseFloat(item.March.replace(/[^0-9.-]/g, '')) : parseFloat(item.March.replace(/[^0-9.-]/g, ''))) : 0,\r\n AprRent: item.April ? (item.April.includes('(') && item.April.includes(')') ? -1 * parseFloat(item.April.replace(/[^0-9.-]/g, '')) : parseFloat(item.April.replace(/[^0-9.-]/g, ''))) : 0,\r\n MayRent: item.May ? (item.May.includes('(') && item.May.includes(')') ? -1 * parseFloat(item.May.replace(/[^0-9.-]/g, '')) : parseFloat(item.May.replace(/[^0-9.-]/g, ''))) : 0,\r\n JunRent: item.June ? (item.June.includes('(') && item.June.includes(')') ? -1 * parseFloat(item.June.replace(/[^0-9.-]/g, '')) : parseFloat(item.June.replace(/[^0-9.-]/g, ''))) : 0,\r\n JulRent: item.July ? (item.July.includes('(') && item.July.includes(')') ? -1 * parseFloat(item.July.replace(/[^0-9.-]/g, '')) : parseFloat(item.July.replace(/[^0-9.-]/g, ''))) : 0,\r\n AugRent: item.August ? (item.August.includes('(') && item.August.includes(')') ? -1 * parseFloat(item.August.replace(/[^0-9.-]/g, '')) : parseFloat(item.August.replace(/[^0-9.-]/g, ''))) : 0,\r\n SepRent: item.September ? (item.September.includes('(') && item.September.includes(')') ? -1 * parseFloat(item.September.replace(/[^0-9.-]/g, '')) : parseFloat(item.September.replace(/[^0-9.-]/g, ''))) : 0,\r\n OctRent: item.October ? (item.October.includes('(') && item.October.includes(')') ? -1 * parseFloat(item.October.replace(/[^0-9.-]/g, '')) : parseFloat(item.October.replace(/[^0-9.-]/g, ''))) : 0,\r\n NovRent: item.November ? (item.November.includes('(') && item.November.includes(')') ? -1 * parseFloat(item.November.replace(/[^0-9.-]/g, '')) : parseFloat(item.November.replace(/[^0-9.-]/g, ''))) : 0,\r\n DecRent: item.December ? (item.December.includes('(') && item.December.includes(')') ? -1 * parseFloat(item.December.replace(/[^0-9.-]/g, '')) : parseFloat(item.December.replace(/[^0-9.-]/g, ''))) : 0,\r\n BookingLog: i + 1,\r\n AllRentalDates: item.AllRentalDates\r\n });\r\n }\r\n });\r\n }\r\n\r\n if (objSelectedBooth.length > 0)\r\n objCM.MonthlyRentalBooth = objSelectedBooth;\r\n\r\n var objSelectedOtherCharge = [];\r\n if (this.selectedOtherItems.length > 0) {\r\n this.selectedOtherItems.forEach((item) => {\r\n const otherRentalYear = new Date(item.RentalMonth.split('-')[0]).getFullYear();\r\n const otherRentalMonth = new Date(item.RentalMonth.split('-')[0]).getMonth() + 1;\r\n const otherRentalYearMonth = `${otherRentalYear}${otherRentalMonth <\r\n 10 ? '0' : ''}${otherRentalMonth}`;\r\n\r\n if (item.Recurring && item.allowOtherItemRenewal) {\r\n objSelectedOtherCharge.push({\r\n OtherItemId: item.Id,\r\n MonthOtherRentalId: item.MonthOtherRentalId,\r\n OtherItemName: item.OtherItem,\r\n OtherItemCharge: item.OtherItemtotal.includes('(') && item.OtherItemtotal.includes(')') ? -1 * parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')),\r\n Quantity: item.Quantity,\r\n YearMonth: otherRentalYearMonth,\r\n BoothNumber: item.BoothNo,\r\n Recurring: item.Recurring,\r\n OtherCharge: item.OtherItemCharge.includes('(') && item.OtherItemCharge.includes(')') ? -1 * parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n Reference: item.Reference,\r\n MonthlyRentalIds: item.MonthlyRentalIds\r\n })\r\n }\r\n });\r\n }\r\n if (objSelectedOtherCharge.length > 0)\r\n objCM.MonthlyOtherRentalCharges = objSelectedOtherCharge;\r\n\r\n var objDiscountData = [];\r\n if (this.vendorDiscountPlans.length > 0 && this.totalDiscountCharge > 0) {\r\n this.vendorDiscountPlans.forEach((item) => {\r\n if (item.CheckAll) {\r\n objDiscountData.push({\r\n PlanId: item.PlanSeqId,\r\n DiscountAmount: item.AppliedDiscount.includes('(') && item.AppliedDiscount.includes(')') ? -1 * parseFloat(item.AppliedDiscount.replace(/[^0-9.-]/g, '')) : parseFloat(item.AppliedDiscount.replace(/[^0-9.-]/g, '')),\r\n OtherCharges: item.OtherItems,\r\n SalesTax: item.SalesTaxApplied,\r\n SecondLevelTax: item.SecondLevelTaxApplied,\r\n DiscountType: item.DiscountType == DiscountType.Percentage ? \"0\" : \"1\",\r\n DiscountValue: item.DiscountValue,\r\n SalesTaxAmount: item.SalesTaxAmount.includes('(') && item.SalesTaxAmount.includes(')') ? -1 * parseFloat(item.SalesTaxAmount.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTaxAmount.replace(/[^0-9.-]/g, '')),\r\n SecondLevelTaxAmount: item.SecondLevelTaxAmount.includes('(') && item.SecondLevelTaxAmount.includes(')') ? -1 * parseFloat(item.SecondLevelTaxAmount.replace(/[^0-9.-]/g, '')) : parseFloat(item.SecondLevelTaxAmount.replace(/[^0-9.-]/g, ''))\r\n })\r\n }\r\n });\r\n }\r\n if (objDiscountData.length > 0)\r\n objCM.AppliedDiscountModel = objDiscountData;\r\n\r\n const subCM = this.rentalService.SaveCombinedMonthlyRentalTransactions(objCM).subscribe(async (res: any) => {\r\n if (res.Success) {\r\n this.accountReceipId = res.Id;\r\n this.toastr.success($localize`Transaction saved successfully`, $localize`Success`, this.toasterConfig);\r\n this.openConfirmationPage = true;\r\n } else {\r\n this.toastr.error($localize`Error occurred while saving the rental transaction`, $localize`Error`, this.toasterConfig);\r\n if (this.verifoneId) {\r\n this.voidPayment = true;\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, (err) => {\r\n this.toastr.error($localize`Error occurred while saving the rental transaction`, $localize`Error`, this.toasterConfig);\r\n // const url = 'ops/vendors/details/' + this.vendorId + '/3';\r\n // this.router.navigate([url]); \r\n\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n\r\n this.subscriptions.push(subCM);\r\n break;\r\n \r\n case 5:\r\n var convenienceFee = this.bookingDetailsForm.get('convenienceFee').value.toString().includes('(') && this.bookingDetailsForm.get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, ''));\r\n if (convenienceFee > 0 && this.paymentOnly) {\r\n this.paymentOnly = false;\r\n }\r\n var objCombinedWeekly = {\r\n VendorId: this.vendorId,\r\n PaymentOrderId: response.OrderId,\r\n RentalCharge: this.bookingDetailsForm.get('rentalCharge').value.toString().includes('(') && this.bookingDetailsForm.get('rentalCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, '')),\r\n SalesTax: 0,\r\n SecLevelTax: 0,\r\n OtherCharge: this.bookingDetailsForm.get('otherCharge').value.toString().includes('(') && this.bookingDetailsForm.get('otherCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, '')),\r\n PriorBalance: this.bookingDetailsForm.get('priorBalance').value.toString().includes('(') && this.bookingDetailsForm.get('priorBalance').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('priorBalance').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('priorBalance').value.toString().replace(/[^0-9.-]/g, '')),\r\n TotalBalanceDue: this.bookingDetailsForm.get('balanceDue').value.toString().includes('(') && this.bookingDetailsForm.get('balanceDue').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')),\r\n RentalNotes: \"\",\r\n CashAmount: 0,\r\n CheckAmount: 0,\r\n CheckNo: \"\",\r\n ChangeAmount: 0,\r\n CardAmount: this.bookingDetailsForm.get('paymentAmount').value.toString().includes('(') && this.bookingDetailsForm.get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')),\r\n DirectDebitAmount: 0,\r\n CardType: \"\",\r\n PaymentDone: true,\r\n WebRentalRequest: true,\r\n PaymentDueDate: null,\r\n VerifoneId: response.VerifoneId,\r\n DiscountAmount: this.bookingDetailsForm.get('discount').value.toString().includes('(') && this.bookingDetailsForm.get('discount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('discount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('discount').value.toString().replace(/[^0-9.-]/g, '')),\r\n ConvenienceFee: this.bookingDetailsForm.get('convenienceFee').value.toString().includes('(') && this.bookingDetailsForm.get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')),\r\n BookingFee: this.bookingDetailsForm.get('additionalCharge').value.toString().includes('(') && this.bookingDetailsForm.get('additionalCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('additionalCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('additionalCharge').value.toString().replace(/[^0-9.-]/g, '')),\r\n CombinedWeeklyRentalBooth: [],\r\n WeeklyRentalOtherCharges: [],\r\n AppliedDiscountModel: []\r\n }\r\n\r\n var objSelectedBooth = [];\r\n if (this.selectedWeeklyBooths.length > 0) {\r\n this.selectedWeeklyBooths.forEach((item, i) => {\r\n if (item.Reservation && !item.BlockRenewal) {\r\n objSelectedBooth.push({\r\n WeeklyRentalId: item.WeeklyRentalId,\r\n BoothNumber: item.BoothNumber,\r\n BoothTypeId: item.BoothTypeId,\r\n ProductId: item.Product,\r\n BoothType: item.BoothType,\r\n RentalWeeekStartDate: new Date(item.RentStartPeriod.split('-')[0]),\r\n RentalWeeekEndDate: new Date(item.CWRenewalWeek.split('-')[1]),\r\n RentalStartDate: new Date(item.RentalStartDate),\r\n RentalEndDate: new Date(item.RentalEndDate),\r\n SelectedRentalDates: \"\",\r\n BoothReserved: item.Reservation,\r\n DoNotRenew: item.Drop,\r\n PerDiem: item.PerDiem,\r\n PerdiemRent: item.PerDiemRent.includes('(') && item.PerDiemRent.includes(')') ? -1 * parseFloat(item.PerDiemRent.replace(/[^0-9.-]/g, '')) : parseFloat(item.PerDiemRent.replace(/[^0-9.-]/g, '')),\r\n Monday: item.Monday,\r\n Tuesday: item.Tuesday,\r\n Wednesday: item.Wednesday,\r\n Thursday: item.Thursday,\r\n Friday: item.Friday,\r\n Saturday: item.Saturday,\r\n Sunday: item.Sunday,\r\n RentalCharge: item.Rent.includes('(') && item.Rent.includes(')') ? -1 * parseFloat(item.Rent.replace(/[^0-9.-]/g, '')) : parseFloat(item.Rent.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n JanRent: item.January ? (item.January.includes('(') && item.January.includes(')') ? -1 * parseFloat(item.January.replace(/[^0-9.-]/g, '')) : parseFloat(item.January.replace(/[^0-9.-]/g, ''))) : 0,\r\n FebRent: item.February ? (item.February.includes('(') && item.February.includes(')') ? -1 * parseFloat(item.February.replace(/[^0-9.-]/g, '')) : parseFloat(item.February.replace(/[^0-9.-]/g, ''))) : 0,\r\n MarRent: item.March ? (item.March.includes('(') && item.March.includes(')') ? -1 * parseFloat(item.March.replace(/[^0-9.-]/g, '')) : parseFloat(item.March.replace(/[^0-9.-]/g, ''))) : 0,\r\n AprRent: item.April ? (item.April.includes('(') && item.April.includes(')') ? -1 * parseFloat(item.April.replace(/[^0-9.-]/g, '')) : parseFloat(item.April.replace(/[^0-9.-]/g, ''))) : 0,\r\n MayRent: item.May ? (item.May.includes('(') && item.May.includes(')') ? -1 * parseFloat(item.May.replace(/[^0-9.-]/g, '')) : parseFloat(item.May.replace(/[^0-9.-]/g, ''))) : 0,\r\n JunRent: item.June ? (item.June.includes('(') && item.June.includes(')') ? -1 * parseFloat(item.June.replace(/[^0-9.-]/g, '')) : parseFloat(item.June.replace(/[^0-9.-]/g, ''))) : 0,\r\n JulRent: item.July ? (item.July.includes('(') && item.July.includes(')') ? -1 * parseFloat(item.July.replace(/[^0-9.-]/g, '')) : parseFloat(item.July.replace(/[^0-9.-]/g, ''))) : 0,\r\n AugRent: item.August ? (item.August.includes('(') && item.August.includes(')') ? -1 * parseFloat(item.August.replace(/[^0-9.-]/g, '')) : parseFloat(item.August.replace(/[^0-9.-]/g, ''))) : 0,\r\n SepRent: item.September ? (item.September.includes('(') && item.September.includes(')') ? -1 * parseFloat(item.September.replace(/[^0-9.-]/g, '')) : parseFloat(item.September.replace(/[^0-9.-]/g, ''))) : 0,\r\n OctRent: item.October ? (item.October.includes('(') && item.October.includes(')') ? -1 * parseFloat(item.October.replace(/[^0-9.-]/g, '')) : parseFloat(item.October.replace(/[^0-9.-]/g, ''))) : 0,\r\n NovRent: item.November ? (item.November.includes('(') && item.November.includes(')') ? -1 * parseFloat(item.November.replace(/[^0-9.-]/g, '')) : parseFloat(item.November.replace(/[^0-9.-]/g, ''))) : 0,\r\n DecRent: item.December ? (item.December.includes('(') && item.December.includes(')') ? -1 * parseFloat(item.December.replace(/[^0-9.-]/g, '')) : parseFloat(item.December.replace(/[^0-9.-]/g, ''))) : 0,\r\n BookingLog: i + 1\r\n })\r\n }\r\n });\r\n }\r\n\r\n if (objSelectedBooth.length > 0)\r\n objCombinedWeekly.CombinedWeeklyRentalBooth = objSelectedBooth;\r\n\r\n var objSelectedOtherCharge = [];\r\n if (this.selectedOtherItems.length > 0) {\r\n this.selectedOtherItems.forEach((item) => {\r\n if (item.Recurring && this.allowOtherItemRenewal) {\r\n objSelectedOtherCharge.push({\r\n OtherItemId: item.Id,\r\n WeekOtherRentalId: item.WeekOtherRentalId,\r\n Quantity: item.Quantity,\r\n OtherItemName: item.OtherItem,\r\n OtherItemCharge: item.OtherItemtotal.includes('(') && item.OtherItemtotal.includes(')') ? -1 * parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')),\r\n RentalWeek: item.RentalWeek.split('-')[0],\r\n BoothNumber: item.BoothNo,\r\n Recurring: item.Recurring,\r\n OtherCharge: item.OtherItemCharge.includes('(') && item.OtherItemCharge.includes(')') ? -1 * parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n Reference: item.Reference,\r\n WeeklyOtherRentalIds: item.WeeklyOtherRentalIds\r\n })\r\n }\r\n });\r\n }\r\n if (objSelectedOtherCharge.length > 0)\r\n objCombinedWeekly.WeeklyRentalOtherCharges = objSelectedOtherCharge;\r\n\r\n var objDiscountData = [];\r\n if (this.vendorDiscountPlans.length > 0 && this.totalDiscountCharge > 0) {\r\n this.vendorDiscountPlans.forEach((item) => {\r\n if (item.CheckAll) {\r\n objDiscountData.push({\r\n PlanId: item.PlanSeqId,\r\n DiscountAmount: item.AppliedDiscount.includes('(') && item.AppliedDiscount.includes(')') ? -1 * parseFloat(item.AppliedDiscount.replace(/[^0-9.-]/g, '')) : parseFloat(item.AppliedDiscount.replace(/[^0-9.-]/g, '')),\r\n OtherCharges: item.OtherItems,\r\n SalesTax: item.SalesTaxApplied,\r\n SecondLevelTax: item.SecondLevelTaxApplied,\r\n DiscountType: item.DiscountType == DiscountType.Percentage ? \"0\" : \"1\",\r\n DiscountValue: item.DiscountValue,\r\n SalesTaxAmount: item.SalesTaxAmount.includes('(') && item.SalesTaxAmount.includes(')') ? -1 * parseFloat(item.SalesTaxAmount.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTaxAmount.replace(/[^0-9.-]/g, '')),\r\n SecondLevelTaxAmount: item.SecondLevelTaxAmount.includes('(') && item.SecondLevelTaxAmount.includes(')') ? -1 * parseFloat(item.SecondLevelTaxAmount.replace(/[^0-9.-]/g, '')) : parseFloat(item.SecondLevelTaxAmount.replace(/[^0-9.-]/g, ''))\r\n })\r\n }\r\n });\r\n }\r\n if (objDiscountData.length > 0)\r\n obj.AppliedDiscountModel = objDiscountData;\r\n\r\n const subCW = this.rentalService.SaveCombinedWeeklyRentalTransactions(objCombinedWeekly).subscribe((res: any) => {\r\n if (res.Success) {\r\n if (res.Success) {\r\n this.accountReceipId = res.Id;\r\n this.toastr.success($localize`Transaction saved successfully`, $localize`Success`, this.toasterConfig);\r\n this.openConfirmationPage = true;\r\n } else {\r\n this.toastr.error($localize`Error occurred while saving the rental transaction`, $localize`Error`, this.toasterConfig);\r\n if (this.verifoneId) {\r\n this.voidPayment = true;\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }, (err) => {\r\n this.toastr.error($localize`Error occurred while saving the rental transaction`, $localize`Error`, this.toasterConfig);\r\n // const url = 'ops/vendors/details/' + this.vendorId + '/3';\r\n // this.router.navigate([url]); \r\n\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n\r\n this.subscriptions.push(subCW);\r\n break;\r\n }\r\n }\r\n else {\r\n this.processPayment = false;\r\n this.voidPayment = false;\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }\r\n\r\n voidPaymentResponse() {\r\n this.voidPayment = false;\r\n const url = 'home/' + this.marketId\r\n this.router.navigate([url]);\r\n }\r\n\r\n setMinimum(controls) {\r\n const value = controls.value;\r\n var enteredAmount = value.toString().includes('(') && value.toString().includes(')') ? -1 * parseFloat(value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(value.toString().replace(/[^0-9.-]/g, ''));\r\n if (!enteredAmount) {\r\n controls.setValue(this.customCurrency.transform(\"0.00\"));\r\n }\r\n var totalrentalCharge = this.bookingDetailsForm.get('rentalCharge').value.toString().includes('(') && this.bookingDetailsForm.get('rentalCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, ''));\r\n var otherRentalCharge = this.bookingDetailsForm.get('otherCharge').value.toString().includes('(') && this.bookingDetailsForm.get('otherCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, ''));\r\n var totalDue = this.actualTotalDue + totalrentalCharge + otherRentalCharge + this.renewalFeeAmount;\r\n if (enteredAmount > totalDue) {\r\n this.bookingDetailsForm.get(\"paymentAmount\").setValue(this.customCurrency.transform(totalDue.toString()));\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Payment amount cannot be greater than total due.`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n this.calculateBalance();\r\n }\r\n\r\n calculateBalance() {\r\n const creditCardAmount = this.bookingDetailsForm.get('paymentAmount').value.toString().includes('(') && this.bookingDetailsForm.get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, ''));\r\n this.creditCardAmount = this.bookingDetailsForm.get('paymentAmount').value.toString().includes('(') && this.bookingDetailsForm.get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, ''));\r\n var totalrentalCharge = this.bookingDetailsForm.get('rentalCharge').value.toString().includes('(') && this.bookingDetailsForm.get('rentalCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, ''));\r\n var otherRentalCharge = this.bookingDetailsForm.get('otherCharge').value.toString().includes('(') && this.bookingDetailsForm.get('otherCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, ''));\r\n var totalSalesTax = this.bookingDetailsForm.get('totalSalesTax').value.toString().includes('(') && this.bookingDetailsForm.get('totalSalesTax').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('totalSalesTax').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('totalSalesTax').value.toString().replace(/[^0-9.-]/g, ''));\r\n var totalSecondLeveltax = this.bookingDetailsForm.get('totalSecondLeveltax').value.toString().includes('(') && this.bookingDetailsForm.get('totalSecondLeveltax').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('totalSecondLeveltax').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('totalSecondLeveltax').value.toString().replace(/[^0-9.-]/g, ''));\r\n var renewalFee = this.renewalFeeAmount.toString().includes('(') && this.renewalFeeAmount.toString().includes(')') ? -1 * parseFloat(this.renewalFeeAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.renewalFeeAmount.toString().replace(/[^0-9.-]/g, ''));\r\n\r\n var totalDue = this.actualTotalDue + totalrentalCharge + otherRentalCharge + totalSalesTax + totalSecondLeveltax;\r\n if(totalDue > 0){\r\n totalDue = totalDue + renewalFee;\r\n }\r\n else{\r\n renewalFee = 0;\r\n }\r\n const convenienceFee = 0;\r\n\r\n var totalAmount;\r\n totalAmount = creditCardAmount + convenienceFee;\r\n const balanceAmount = totalDue != 0 ? totalDue - totalAmount : 0;\r\n\r\n this.bookingDetailsForm.patchValue({\r\n totalDue: this.customCurrency.transform(totalDue.toString()),\r\n balanceDue: this.customCurrency.transform(balanceAmount.toString()),\r\n convenienceFee: this.customCurrency.transform(convenienceFee.toString()),\r\n additionalCharge: this.customCurrency.transform(renewalFee.toString()),\r\n totalPayment: this.customCurrency.transform(totalAmount.toString()) \r\n })\r\n\r\n this.paymentAmount = this.bookingDetailsForm.get('totalPayment').value.toString().includes('(') && this.bookingDetailsForm.get('totalPayment').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('totalPayment').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('totalPayment').value.toString().replace(/[^0-9.-]/g, ''));\r\n\r\n if (this.applyCCCharge && creditCardAmount > 0) {\r\n this.calculateConvenienceFee();\r\n }\r\n }\r\n\r\n handledblClick(event: any) {\r\n clearTimeout(this.clickTimeout);\r\n\r\n const inputElement = event.target as HTMLInputElement;\r\n inputElement.select(); // Select the entire text on double-click\r\n }\r\n\r\n handleClick(event: any) {\r\n // Get the current value of the input field\r\n let currentValue: string = event.target.value;\r\n const currentCursorPosition = event.target.selectionStart;\r\n const currentSelectionLength = event.target.selectionEnd - event.target.selectionStart;\r\n const inputElement = event.target as HTMLInputElement;\r\n const inputValue = inputElement.value;\r\n clearTimeout(this.clickTimeout);\r\n\r\n this.clickTimeout = setTimeout(() => {\r\n if (inputValue === '$0.00') {\r\n const selectionLength = inputElement.selectionEnd - inputElement.selectionStart;\r\n\r\n // If the entire text is not selected, set the cursor position after the \"$\" sign\r\n if (selectionLength !== inputValue.length) {\r\n inputElement.setSelectionRange(1, 1);\r\n }\r\n }\r\n }, 200); // Delay to check for double click\r\n \r\n if (currentSelectionLength === currentValue.length) {\r\n return true;\r\n }\r\n // Check if the input value is \"$0.00\"\r\n if (currentValue === '$0.00') {\r\n // Set the cursor position after the \"$\" sign\r\n event.target.setSelectionRange(1, 1);\r\n return;\r\n }\r\n\r\n // Check if the \"$\" sign is present in the current value\r\n const hasDollarSign = currentValue.includes('$');\r\n // Get the cursor position\r\n const caretPosition = event.target.selectionStart;\r\n // Check if the cursor position is after the \"$\" sign\r\n const hasDollarSignBeforeCaret = currentValue.slice(0, caretPosition).includes('$');\r\n // If the cursor is not after the \"$\" sign, adjust the cursor position\r\n if (!hasDollarSignBeforeCaret && hasDollarSign) {\r\n // Find the index of \"$\" sign\r\n const dollarSignIndex = currentValue.indexOf('$');\r\n // Set the cursor position after the \"$\" sign\r\n event.target.setSelectionRange(dollarSignIndex + 1, dollarSignIndex + 1);\r\n }\r\n }\r\n\r\n setCurrencyFormat(controls) {\r\n const value = controls.value;\r\n let inputValue = value;\r\n if(inputValue.toString().substring(1,2) == \"$\")\r\n inputValue = `${inputValue.slice(1)}`;\r\n controls.setValue(inputValue);\r\n }\r\n\r\n\r\n numberOnly(event): boolean {\r\n const inputValue = event.target.value;\r\n const charCode = (event.which) ? event.which : event.keyCode;\r\n const currentCursorPosition = event.target.selectionStart;\r\n const currentSelectionLength = event.target.selectionEnd - event.target.selectionStart;\r\n // Check if the input value is \"$0.00\"\r\n if (charCode == 45) {\r\n return false;\r\n }\r\n if (currentSelectionLength === inputValue.length) {\r\n return true;\r\n }\r\n if (inputValue === '$0.00') {\r\n // Set the cursor position after the \"$\" sign\r\n event.target.setSelectionRange(1, 1);\r\n return true; // Allow further input\r\n }\r\n // Check if the \"$\" sign is present in the current value\r\n const hasDollarSign = inputValue.includes('$');\r\n // Check if the cursor position is after the \"$\" sign\r\n const hasDollarSignBeforeCaret = inputValue.slice(0, currentCursorPosition).includes('$');\r\n // If the cursor is not after the \"$\" sign and \"$\" sign is present, prevent input\r\n if (!hasDollarSignBeforeCaret && hasDollarSign && charCode !== 46 && (charCode < 48 || charCode > 57)) {\r\n return false;\r\n }\r\n // If the entered character is a dot and there's already a dot in the input, prevent input\r\n if (charCode == 46 && inputValue.includes('.') && inputValue.indexOf('.') !== currentCursorPosition) {\r\n return false;\r\n }\r\n if (charCode > 31 && (charCode < 46 || charCode > 57 || charCode === 47)) {\r\n return false;\r\n }\r\n return true; // Allow input\r\n }\r\n\r\n getCCCredentials() {\r\n this.paymentService.getCCCredentials(this.marketId).subscribe((res) => {\r\n if (res !== null) {\r\n this.paymentGatewayCredentials = res.GatewayDetails ? JSON.parse(res.GatewayDetails) : null;\r\n this.processCreditCardOnline = res.ProcessCreditCardOnline;\r\n }\r\n })\r\n }\r\n\r\n getWebRentalSetting() {\r\n const sub = this.marketInfoService.getWebRentalSetting(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.applyCCCharge = res.ApplyCcporcessingFeePercentage;\r\n this.CcfeeinPercentage = res.CcfeeinPercentage;\r\n this.AllowPartialPay = res.AllowPartialPay; \r\n this.bookingDetailsForm.get('paymentAmount').enable(); \r\n this.allowCWRentalRenewal = res.AllowRenewalsCw;\r\n this.allowCMRentalRenewal = res.AllowRenewalsCm;\r\n this.allowOtherItemRenewal = res.AllowRenewingOtherItems;\r\n this.applyRenewalFee = res.ApplyBookingFee;\r\n this.bookingRenewalFeeId = res.ApplyBookingFeeId;\r\n if (this.bookingRenewalFeeId) {\r\n this.subscriptions.push(this.rentalService.getBookingRenewalFeeById(this.marketId, this.bookingRenewalFeeId).subscribe((resFee: any) => {\r\n if (resFee) {\r\n this.renewalFeeAmount = (this.rentalType == 1 ? resFee.OtherItemCharge :\r\n this.rentalType == 4 ? resFee.OtherItemCombinedMonthlyCharge :\r\n this.rentalType == 5 ? resFee.OtherItemCombinedWeeklyCharge : 0) ?? 0;\r\n }\r\n }));\r\n }\r\n if (!this.AllowPartialPay) {\r\n this.bookingDetailsForm.get('paymentAmount').disable();\r\n this.bookingDetailsForm.patchValue({\r\n paymentAmount: this.customCurrency.transform(this.actualTotalDue.toString()),\r\n totalPayment: this.customCurrency.transform(this.actualTotalDue.toString()),\r\n })\r\n }\r\n this.paymentAmount = this.bookingDetailsForm.get('totalPayment').value.toString().includes('(') && this.bookingDetailsForm.get('totalPayment').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('totalPayment').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('totalPayment').value.toString().replace(/[^0-9.-]/g, ''));\r\n const creditCardAmount = this.bookingDetailsForm.get('paymentAmount').value.toString().includes('(') && this.bookingDetailsForm.get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, ''));\r\n if (this.applyCCCharge && creditCardAmount > 0) {\r\n this.calculateConvenienceFee();\r\n }\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n calculateConvenienceFee() {\r\n var convenienceFee = 0;\r\n var creditCardAmount = this.bookingDetailsForm.get('paymentAmount').value.toString().includes('(') && this.bookingDetailsForm.get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, ''));\r\n var totalrentalCharge = this.bookingDetailsForm.get('rentalCharge').value.toString().includes('(') && this.bookingDetailsForm.get('rentalCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, ''));\r\n var otherRentalCharge = this.bookingDetailsForm.get('otherCharge').value.toString().includes('(') && this.bookingDetailsForm.get('otherCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, ''));\r\n var renewalFee = this.bookingDetailsForm.get('additionalCharge').value.toString().includes('(') && this.bookingDetailsForm.get('additionalCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('additionalCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('additionalCharge').value.toString().replace(/[^0-9.-]/g, ''));\r\n var totalDue = this.actualTotalDue + totalrentalCharge + otherRentalCharge;\r\n if(totalDue > 0){\r\n totalDue = totalDue + renewalFee;\r\n }\r\n else{\r\n renewalFee = 0;\r\n }\r\n if (creditCardAmount > 0) {\r\n var convenienceFee = creditCardAmount * ((this.CcfeeinPercentage) / 100);\r\n totalDue += convenienceFee;\r\n this.creditCardAmount += convenienceFee;\r\n }\r\n var totalAmount = 0;\r\n totalAmount = creditCardAmount + convenienceFee;\r\n const balanceAmount = totalDue - totalAmount;\r\n\r\n this.bookingDetailsForm.patchValue({\r\n convenienceFee: this.customCurrency.transform(convenienceFee.toString()),\r\n balanceDue: this.customCurrency.transform(balanceAmount.toString()),\r\n totalPayment: this.customCurrency.transform(totalAmount.toString()),\r\n totalCharge: this.customCurrency.transform(totalDue.toString()) \r\n })\r\n this.paymentAmount = this.bookingDetailsForm.get('totalPayment').value.toString().includes('(') && this.bookingDetailsForm.get('totalPayment').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('totalPayment').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('totalPayment').value.toString().replace(/[^0-9.-]/g, ''));\r\n }\r\n\r\n getRentalPaymentSettings() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.rentalService.getRentalSettings(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.ResaleNumberRequired = res.ResaleNumberRequired;\r\n this.DaysSellWithoutResaleNumber = res.DaysSellWithoutResaleNumber;\r\n this.BusinessLicenseNumberRequired = res.BusinessLicenseNumberRequired;\r\n this.DaysSellWithoutBusiLicNumber = res.DaysSellWithoutBusiLicNumber;\r\n this.combinedMonthlyBookingEndDate = res.CombinedMonthlyBookingEndDate;\r\n this.masterRentChargeforResOtherItems = res.MasterChargeForOtherChargeRenewal;\r\n this.secondTaxName = res.SecondTaxName ? res.SecondTaxName: \"Sec Level Tax\";\r\n }\r\n });\r\n }\r\n\r\n extendCWRental(extendRentalRecord) {\r\n if (extendRentalRecord) {\r\n var recordExist = this.selectedWeeklyBooths.findIndex(e => e.RentStartPeriod == extendRentalRecord.RentStartPeriod && e.RentEndPeriod == extendRentalRecord.RentEndPeriod\r\n && e.BoothNumber == extendRentalRecord.BoothNumber)\r\n if (recordExist != -1) {\r\n const rentalDates = [];\r\n const currentMonthRentalDates = [];\r\n var rentalstartDate;\r\n var marketDays = 0;\r\n this.selectedMarketDays.map((el, i) => {\r\n const startDate = this.selectedWeeklyBooths[recordExist].RentalStartDate;\r\n const endDate = new Date(extendRentalRecord.CWRenewalWeek.split(\"-\")[1]);\r\n const selectedDayOfWeek = el - 1;\r\n const today: Date = new Date(new Date().toDateString())\r\n let currentDay = new Date(startDate);\r\n const currentMonthEnd = new Date(this.selectedWeeklyBooths[recordExist].RentEndPeriod.split('-')[1]);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n\r\n currentDay = new Date(startDate);\r\n while (currentDay <= currentMonthEnd) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n currentMonthRentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates);\r\n\r\n const compareCurrentMonthDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const currentMonthSortedDates = currentMonthRentalDates.sort(compareCurrentMonthDates);\r\n });\r\n\r\n var allRentalDates = rentalDates.map(el => new Date(el.startDate));\r\n var currentRentedEndDate = new Date(this.selectedWeeklyBooths[recordExist].RentalEndDate);\r\n const filteredRentalDates = allRentalDates.filter(rentalDate => rentalDate > currentRentedEndDate);\r\n var obj1 = {\r\n RentalDates: filteredRentalDates,\r\n BoothNumber: this.selectedWeeklyBooths[recordExist].BoothNumber\r\n }\r\n\r\n var RentAmount = this.selectedWeeklyBooths[recordExist].Rent;\r\n var SalesTax = this.selectedWeeklyBooths[recordExist].SalesTax;\r\n var CityTax = this.selectedWeeklyBooths[recordExist].CityTax;\r\n var JanRentAmount = this.selectedWeeklyBooths[recordExist].January ?? 0;\r\n var FebRentAmount = this.selectedWeeklyBooths[recordExist].February ?? 0;\r\n var MarRentAmount = this.selectedWeeklyBooths[recordExist].March ?? 0;\r\n var AprRentAmount = this.selectedWeeklyBooths[recordExist].April ?? 0;\r\n var MayRentAmount = this.selectedWeeklyBooths[recordExist].May ?? 0;\r\n var JunRentAmount = this.selectedWeeklyBooths[recordExist].June ?? 0;\r\n var JulRentAmount = this.selectedWeeklyBooths[recordExist].July ?? 0;\r\n var AugRentAmount = this.selectedWeeklyBooths[recordExist].August ?? 0;\r\n var SepRentAmount = this.selectedWeeklyBooths[recordExist].September ?? 0;\r\n var OctRentAmount = this.selectedWeeklyBooths[recordExist].October ?? 0;\r\n var NovRentAmount = this.selectedWeeklyBooths[recordExist].November ?? 0;\r\n var DecRentAmount = this.selectedWeeklyBooths[recordExist].December ?? 0;\r\n\r\n this.totalRentalCharge -= RentAmount.toString().includes('(') && RentAmount.toString().includes(')') ? -1 * parseFloat(RentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(RentAmount.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= SalesTax.toString().includes('(') && SalesTax.toString().includes(')') ? -1 * parseFloat(SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= CityTax.toString().includes('(') && CityTax.toString().includes(')') ? -1 * parseFloat(CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n\r\n var extendRentalStartPeriod;\r\n if (!this.selectedWeeklyBooths[recordExist].NewBooth && this.selectedWeeklyBooths[recordExist].Status != \"R\") {\r\n extendRentalStartPeriod = new Date(this.selectedWeeklyBooths[recordExist].RentalSavedEndDate);\r\n extendRentalStartPeriod.setDate(extendRentalStartPeriod.getDate() + 1);\r\n }\r\n else {\r\n extendRentalStartPeriod = new Date(this.selectedWeeklyBooths[recordExist].RentStartPeriod.split(\"-\")[0]);\r\n }\r\n\r\n var obj = {\r\n BoothTypeId: this.selectedWeeklyBooths[recordExist].BoothTypeId,\r\n VendorId: this.vendorId,\r\n RentalStartPeriod: new Date(extendRentalStartPeriod),\r\n RentalEndPeriod: new Date(extendRentalRecord.CWRenewalWeek.split(\"-\")[1]),\r\n PerDiemApplicable: this.selectedWeeklyBooths[recordExist].PerDiem,\r\n JanRent: JanRentAmount.toString().includes('(') && JanRentAmount.toString().includes(')') ? -1 * parseFloat(JanRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(JanRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n FebRent: FebRentAmount.toString().includes('(') && FebRentAmount.toString().includes(')') ? -1 * parseFloat(FebRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(FebRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n MarRent: MarRentAmount.toString().includes('(') && MarRentAmount.toString().includes(')') ? -1 * parseFloat(MarRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(MarRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n AprRent: AprRentAmount.toString().includes('(') && AprRentAmount.toString().includes(')') ? -1 * parseFloat(AprRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(AprRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n MayRent: MayRentAmount.toString().includes('(') && MayRentAmount.toString().includes(')') ? -1 * parseFloat(MayRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(MayRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n JunRent: JunRentAmount.toString().includes('(') && JunRentAmount.toString().includes(')') ? -1 * parseFloat(JunRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(JunRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n JulRent: JulRentAmount.toString().includes('(') && JulRentAmount.toString().includes(')') ? -1 * parseFloat(JulRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(JulRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n AugRent: AugRentAmount.toString().includes('(') && AugRentAmount.toString().includes(')') ? -1 * parseFloat(AugRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(AugRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n SepRent: SepRentAmount.toString().includes('(') && SepRentAmount.toString().includes(')') ? -1 * parseFloat(SepRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(SepRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n OctRent: OctRentAmount.toString().includes('(') && OctRentAmount.toString().includes(')') ? -1 * parseFloat(OctRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(OctRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n NovRent: NovRentAmount.toString().includes('(') && NovRentAmount.toString().includes(')') ? -1 * parseFloat(NovRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(NovRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n DecRent: DecRentAmount.toString().includes('(') && DecRentAmount.toString().includes(')') ? -1 * parseFloat(DecRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(DecRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n }\r\n this.rentalService.getBoothRentalCombinedWeeklyCharges(this.marketId, obj).subscribe((res: any) => {\r\n this.selectedWeeklyBooths[recordExist].MktDays = marketDays;\r\n this.selectedWeeklyBooths[recordExist].RentalEndDate = rentalDates[rentalDates.length - 1].startDate;\r\n this.selectedWeeklyBooths[recordExist].RentEndPeriod = extendRentalRecord.CWRenewalWeek;\r\n this.selectedWeeklyBooths[recordExist].January = this.customCurrency.transform(res.JanRent);\r\n this.selectedWeeklyBooths[recordExist].February = this.customCurrency.transform(res.FebRent);\r\n this.selectedWeeklyBooths[recordExist].March = this.customCurrency.transform(res.MarRent);\r\n this.selectedWeeklyBooths[recordExist].April = this.customCurrency.transform(res.AprRent);\r\n this.selectedWeeklyBooths[recordExist].May = this.customCurrency.transform(res.MayRent);\r\n this.selectedWeeklyBooths[recordExist].June = this.customCurrency.transform(res.JunRent);\r\n this.selectedWeeklyBooths[recordExist].July = this.customCurrency.transform(res.JulRent);\r\n this.selectedWeeklyBooths[recordExist].August = this.customCurrency.transform(res.AugRent);\r\n this.selectedWeeklyBooths[recordExist].September = this.customCurrency.transform(res.SepRent);\r\n this.selectedWeeklyBooths[recordExist].October = this.customCurrency.transform(res.OctRent);\r\n this.selectedWeeklyBooths[recordExist].November = this.customCurrency.transform(res.NovRent);\r\n this.selectedWeeklyBooths[recordExist].December = this.customCurrency.transform(res.DecRent);\r\n this.selectedWeeklyBooths[recordExist].Rent = this.customCurrency.transform(res.Rent);\r\n this.selectedWeeklyBooths[recordExist].SalesTax = this.customCurrency.transform(res.SalesTax);\r\n this.selectedWeeklyBooths[recordExist].CityTax = this.customCurrency.transform(res.CityTax);\r\n this.selectedWeeklyBooths[recordExist].JanuaryMonthPresent = res.JanuaryMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].FebruaryMonthPresent = res.FebruaryMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].MarchMonthPresent = res.MarchMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].AprilMonthPresent = res.AprilMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].MayMonthPresent = res.MayMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].JuneMonthPresent = res.JuneMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].JulyMonthPresent = res.JulyMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].AugustMonthPresent = res.AugustMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].SeptemberMonthPresent = res.SeptemberMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].OctoberMonthPresent = res.OctoberMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].NovemberMonthPresent = res.NovemberMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].DecemberMonthPresent = res.DecemberMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].DisableJanMonth = res.JanRent || res.JanRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableFebMonth = res.FebRent || res.FebRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableMarMonth = res.MarRent || res.MarRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableAprMonth = res.AprRent || res.AprRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableMayMonth = res.MayRent || res.MayRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableJunMonth = res.JunRent || res.JunRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableJulMonth = res.JulRent || res.JulRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableAugMonth = res.AugRent || res.AugRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableSepMonth = res.SepRent || res.SepRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableOctMonth = res.OctRent || res.OctRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableNovMonth = res.NovRent || res.NovRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableDecMonth = res.DecRent || res.DecRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].ExtendRental = true;\r\n\r\n this.totalRentalCharge += res.Rent.toString().includes('(') && res.Rent.toString().includes(')') ? -1 * parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n });\r\n }\r\n }\r\n }\r\n\r\n extendCMRental(extendRentalRecord) {\r\n const extendedRentalEndDates =extendRentalRecord.CMRenewalMonth;\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you wish to extend the bookings till ` + extendedRentalEndDates + '? Please note that the extended period cannot be cancelled',\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then(async (result) => {\r\n if (result.value) {\r\n var rentalDates = [];\r\n let noResale = true;\r\n const vendorRentalDays = [];\r\n var marketDayCountForResale = 0 \r\n if ((this.ResaleNumberRequired && !this.exemptResale) || (this.BusinessLicenseNumberRequired)) {\r\n var rentalstartDate = \"\";\r\n var selectedBoothRecord = this.selectedMonthlyBooths.filter(e => e.NewBooth == true || e.ExtendRental == true);\r\n if (selectedBoothRecord.length > 0) {\r\n selectedBoothRecord.forEach(record => {\r\n this.selectedMarketDays.map(el => {\r\n const startDate = new Date(record.RentalStartDate);\r\n const endDate = new Date(record.RentalEndDate);\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) { \r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates);\r\n });\r\n }); \r\n }\r\n \r\n if (extendRentalRecord.MonthlyRentalId != 0)\r\n var recordExist = this.selectedMonthlyBooths.findIndex(e => e.RentStartPeriod == extendRentalRecord.RentStartPeriod && e.RentEndPeriod == extendRentalRecord.RentEndPeriod\r\n && e.BoothNumber == extendRentalRecord.BoothNumber && e.MonthlyRentalId == extendRentalRecord.MonthlyRentalId);\r\n else\r\n var recordExist = this.selectedMonthlyBooths.findIndex(e => e.RentStartPeriod == extendRentalRecord.RentStartPeriod && e.RentEndPeriod == extendRentalRecord.RentEndPeriod\r\n && e.BoothNumber == extendRentalRecord.BoothNumber);\r\n \r\n if (recordExist != -1) { \r\n var rentalstartDate = \"\";\r\n for(const el of this.selectedMarketDays){\r\n const selectedDayOfWeek = el - 1;\r\n const startDate = new Date(this.selectedMonthlyBooths[recordExist].RentalStartDate);\r\n const endMonth = extendRentalRecord.CMRenewalMonth;\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n var endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n if (this.combinedMonthlyBookingEndDate) {\r\n const rentalEndDateYear = endDate.getFullYear();\r\n const rentalEndDateMonth = endDate.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n endDate = await this.getMonthEndingDateFromSetting(rentalEndDateYearMonth);\r\n }\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) { \r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n }\r\n \r\n rentalDates.map(date => {\r\n const targetDateString = this.datePipe.transform(date.startDate, \"MM/dd/yyyy\");\r\n const dateExist = vendorRentalDays.find(el => {\r\n const rentalDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(date.startDate, \"MM/dd/yyyy\");\r\n vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n marketDayCountForResale += 1;\r\n if (marketDayCountForResale > this.DaysSellWithoutResaleNumber) {\r\n return; // exits the forEach loop when the condition is met\r\n }\r\n }\r\n });\r\n \r\n const obj = {\r\n VendorID: this.vendorId,\r\n VendorRentalDate: new Date()\r\n };\r\n \r\n this.subscriptions.push(this.rentalService.getVendorRentalDays(obj).subscribe((res: any[]) => {\r\n if (marketDayCountForResale <= this.DaysSellWithoutResaleNumber || marketDayCountForResale <= this.DaysSellWithoutBusiLicNumber) {\r\n if (res && res.length > 0) {\r\n res.forEach(el => {\r\n const targetDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n const dateExist = vendorRentalDays.find(data => {\r\n const rentalDateString = this.datePipe.transform(data.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n marketDayCountForResale += 1;\r\n }\r\n });\r\n }\r\n }\r\n if (this.ResaleNumberRequired && !this.exemptResale && !this.resaleNo && marketDayCountForResale > this.DaysSellWithoutResaleNumber && !this.resaleOptionSelected) {\r\n const modal = this.modalResaleNo.nativeElement;\r\n modal.classList.add('show');\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'block';\r\n }\r\n noResale = false;\r\n }\r\n else if (this.BusinessLicenseNumberRequired && marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n if (!this.businessLicenseNumber) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Business License Number is required! Do you want to continue without Business License Number?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n this.proceedExtendingRental(extendRentalRecord);\r\n }\r\n else {\r\n //this.refreshAddBooth();\r\n }\r\n });\r\n }\r\n else {\r\n if (!this.businessLicenseExpiryDate) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Business License expiry date is not provided! Do you want to continue without that?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n this.proceedExtendingRental(extendRentalRecord);\r\n }\r\n else {\r\n // this.refreshAddBooth();\r\n }\r\n });\r\n }\r\n else {\r\n if (new Date(this.businessLicenseExpiryDate) < new Date()) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Business License is expired! Do you want to continue?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n this.proceedExtendingRental(extendRentalRecord);\r\n }\r\n else {\r\n // this.refreshAddBooth();\r\n }\r\n });\r\n }\r\n else {\r\n this.proceedExtendingRental(extendRentalRecord);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n noResale = true;\r\n this.proceedExtendingRental(extendRentalRecord);\r\n }\r\n }));\r\n } else {\r\n this.proceedExtendingRental(extendRentalRecord);\r\n }\r\n }\r\n });\r\n }\r\n\r\n async proceedExtendingRental(extendRentalRecord) {\r\n if (extendRentalRecord.MonthlyRentalId != 0)\r\n var recordExist = this.selectedMonthlyBooths.findIndex(e => e.RentStartPeriod == extendRentalRecord.RentStartPeriod && e.RentEndPeriod == extendRentalRecord.RentEndPeriod\r\n && e.BoothNumber == extendRentalRecord.BoothNumber && e.MonthlyRentalId == extendRentalRecord.MonthlyRentalId);\r\n else\r\n var recordExist = this.selectedMonthlyBooths.findIndex(e => e.RentStartPeriod == extendRentalRecord.RentStartPeriod && e.RentEndPeriod == extendRentalRecord.RentEndPeriod\r\n && e.BoothNumber == extendRentalRecord.BoothNumber && e.RentalMarketDay == extendRentalRecord.RentalMarketDay);\r\n\r\n if (recordExist != -1) {\r\n if (!this.selectedMonthlyBooths[recordExist].Drop && this.selectedMonthlyBooths[recordExist].Reservation && this.allowCMRentalRenewal) {\r\n const rentalDates = [];\r\n var currentMonthRentalDates = [];\r\n var rentalstartDate;\r\n var marketDays = 0;\r\n \r\n for (const el of this.selectedMarketDays) {\r\n const selectedDayOfWeek = el - 1;\r\n var endDateYearMonth;\r\n const currentDate = new Date();\r\n const currentYear = currentDate.getFullYear();\r\n const currentMonth = currentDate.getMonth();\r\n const currentYearMonth = `${currentYear}${(currentMonth + 1) < 10 ? '0' : ''}${(currentMonth + 1)}`;\r\n var startDate = new Date(this.selectedMonthlyBooths[recordExist].RentalStartDate);\r\n const endMonth = extendRentalRecord.CMRenewalMonth;\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n var endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n if (this.combinedMonthlyBookingEndDate) {\r\n const rentalEndDateYear = endDate.getFullYear();\r\n const rentalEndDateMonth = endDate.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n endDate = await this.getMonthEndingDateFromSetting(rentalEndDateYearMonth);\r\n endDateYearMonth = rentalEndDateYearMonth;\r\n\r\n const rentalStartDate = new Date(startDate);\r\n var previousMonth = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() - 1)).getMonth() + 1;\r\n var PreviousMonthYear = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() - 1)).getFullYear();\r\n const PreviousMonthYearAndMonth = `${PreviousMonthYear}${previousMonth < 10 ? '0' : ''}${previousMonth}`;\r\n // if (PreviousMonthYearAndMonth >= currentYearMonth) {\r\n const monthEndDate = await this.getMonthEndingDateFromSetting(PreviousMonthYearAndMonth);\r\n const dateDiff = this.getDaysDifference(monthEndDate, new Date(startDate)); //calculates the diff between current month start date and previous monthend date \r\n if (dateDiff <= 7 && new Date(monthEndDate) < startDate) {\r\n if (new Date() > new Date(monthEndDate)) {\r\n startDate = new Date();\r\n }\r\n else {\r\n startDate = new Date(monthEndDate.setDate(monthEndDate.getDate() + 1));\r\n }\r\n }\r\n // }\r\n }\r\n var previousRentalYearMonth;\r\n var currentMonthEnd = new Date(startDate.getFullYear(), startDate.getMonth() + 1, 0);\r\n if (this.combinedMonthlyBookingEndDate) {\r\n const currentStartMonth = this.selectedMonthlyBooths[recordExist].RentStartPeriod;\r\n const [startMonthDate, startMonthYear] = currentStartMonth.split(' ');\r\n const startMonthIndex = this.getMonthIndex(startMonthDate);\r\n var currentMonthEnd = new Date(startMonthYear, startMonthIndex + 1, 0);\r\n const rentalEndDateYear = currentMonthEnd.getFullYear();\r\n const rentalEndDateMonth = currentMonthEnd.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n previousRentalYearMonth = rentalEndDateYearMonth;\r\n if (endDateYearMonth == rentalEndDateYearMonth)\r\n currentMonthEnd = await this.getMonthEndingDateFromSetting(rentalEndDateYearMonth);\r\n }\r\n\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n\r\n if (this.combinedMonthlyBookingEndDate) {\r\n currentDay = new Date(startDate);\r\n while (currentDay <= currentMonthEnd) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n //marketDays += 1;\r\n currentMonthRentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n }\r\n\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates);\r\n\r\n if (this.combinedMonthlyBookingEndDate) {\r\n const compareCurrentMonthDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const currentMonthSortedDates = currentMonthRentalDates.sort(compareCurrentMonthDates);\r\n }\r\n else {\r\n currentMonthRentalDates = rentalDates;\r\n }\r\n\r\n var allRentalDates = rentalDates.map(el => new Date(el.startDate));\r\n var currentRentedEndDate = new Date(this.selectedMonthlyBooths[recordExist].RentalEndDate);\r\n const filteredRentalDates = allRentalDates.filter(rentalDate => rentalDate > currentRentedEndDate);\r\n var obj1 = {\r\n RentalDates: filteredRentalDates,\r\n BoothNumber: this.selectedMonthlyBooths[recordExist].BoothNumber\r\n }\r\n\r\n this.subscriptions.push(this.rentalService.checkRentalExits(this.marketId, obj1).subscribe((res) => {\r\n if (!res.Success) {\r\n var RentAmount = this.selectedMonthlyBooths[recordExist].Rent;\r\n var SalesTax = this.selectedMonthlyBooths[recordExist].SalesTax;\r\n var CityTax = this.selectedMonthlyBooths[recordExist].CityTax;\r\n var JanRentAmount = this.selectedMonthlyBooths[recordExist].January ?? 0;\r\n var FebRentAmount = this.selectedMonthlyBooths[recordExist].February ?? 0;\r\n var MarRentAmount = this.selectedMonthlyBooths[recordExist].March ?? 0;\r\n var AprRentAmount = this.selectedMonthlyBooths[recordExist].April ?? 0;\r\n var MayRentAmount = this.selectedMonthlyBooths[recordExist].May ?? 0;\r\n var JunRentAmount = this.selectedMonthlyBooths[recordExist].June ?? 0;\r\n var JulRentAmount = this.selectedMonthlyBooths[recordExist].July ?? 0;\r\n var AugRentAmount = this.selectedMonthlyBooths[recordExist].August ?? 0;\r\n var SepRentAmount = this.selectedMonthlyBooths[recordExist].September ?? 0;\r\n var OctRentAmount = this.selectedMonthlyBooths[recordExist].October ?? 0;\r\n var NovRentAmount = this.selectedMonthlyBooths[recordExist].November ?? 0;\r\n var DecRentAmount = this.selectedMonthlyBooths[recordExist].December ?? 0;\r\n\r\n this.totalRentalCharge -= RentAmount.toString().includes('(') && RentAmount.toString().includes(')') ? -1 * parseFloat(RentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(RentAmount.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= SalesTax.toString().includes('(') && SalesTax.toString().includes(')') ? -1 * parseFloat(SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= CityTax.toString().includes('(') && CityTax.toString().includes(')') ? -1 * parseFloat(CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n\r\n var extendRentalStartPeriod;\r\n if (!this.selectedMonthlyBooths[recordExist].NewBooth && this.selectedMonthlyBooths[recordExist].Status != \"R\") {\r\n extendRentalStartPeriod = new Date(this.selectedMonthlyBooths[recordExist].RentalSavedEndDate);\r\n if (extendRentalStartPeriod.getDate() == 31) {\r\n extendRentalStartPeriod.setDate(extendRentalStartPeriod.getDate() + 1);\r\n }\r\n else {\r\n extendRentalStartPeriod.setMonth(extendRentalStartPeriod.getMonth() + 1);\r\n }\r\n extendRentalStartPeriod.setDate(1);\r\n }\r\n else {\r\n extendRentalStartPeriod = this.selectedMonthlyBooths[recordExist].RentalStartDate;\r\n }\r\n var obj = {\r\n BoothTypeId: this.selectedMonthlyBooths[recordExist].BoothTypeId,\r\n VendorId: this.vendorId,\r\n RentalStartPeriod: new Date(extendRentalStartPeriod),\r\n RentalEndPeriod: new Date(rentalDates[rentalDates.length - 1].startDate),\r\n PerDiemApplicable: this.selectedMonthlyBooths[recordExist].PerDiem,\r\n JanRent: JanRentAmount.toString().includes('(') && JanRentAmount.toString().includes(')') ? -1 * parseFloat(JanRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(JanRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n FebRent: FebRentAmount.toString().includes('(') && FebRentAmount.toString().includes(')') ? -1 * parseFloat(FebRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(FebRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n MarRent: MarRentAmount.toString().includes('(') && MarRentAmount.toString().includes(')') ? -1 * parseFloat(MarRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(MarRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n AprRent: AprRentAmount.toString().includes('(') && AprRentAmount.toString().includes(')') ? -1 * parseFloat(AprRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(AprRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n MayRent: MayRentAmount.toString().includes('(') && MayRentAmount.toString().includes(')') ? -1 * parseFloat(MayRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(MayRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n JunRent: JunRentAmount.toString().includes('(') && JunRentAmount.toString().includes(')') ? -1 * parseFloat(JunRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(JunRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n JulRent: JulRentAmount.toString().includes('(') && JulRentAmount.toString().includes(')') ? -1 * parseFloat(JulRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(JulRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n AugRent: AugRentAmount.toString().includes('(') && AugRentAmount.toString().includes(')') ? -1 * parseFloat(AugRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(AugRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n SepRent: SepRentAmount.toString().includes('(') && SepRentAmount.toString().includes(')') ? -1 * parseFloat(SepRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(SepRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n OctRent: OctRentAmount.toString().includes('(') && OctRentAmount.toString().includes(')') ? -1 * parseFloat(OctRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(OctRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n NovRent: NovRentAmount.toString().includes('(') && NovRentAmount.toString().includes(')') ? -1 * parseFloat(NovRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(NovRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n DecRent: DecRentAmount.toString().includes('(') && DecRentAmount.toString().includes(')') ? -1 * parseFloat(DecRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(DecRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n }\r\n\r\n this.subscriptions.push(this.rentalService.getBoothRentalCombinedMonthlyCharges(this.marketId, obj).subscribe((res: any) => {\r\n this.selectedMonthlyBooths[recordExist].RentEndPeriod = extendRentalRecord.CMRenewalMonth;\r\n this.selectedMonthlyBooths[recordExist].RentalEndDate = this.datePipe.transform(new Date(rentalDates[rentalDates.length - 1].startDate), 'MMM d, y');\r\n this.selectedMonthlyBooths[recordExist].MktDays = marketDays;\r\n this.selectedMonthlyBooths[recordExist].Rent = this.customCurrency.transform(res.Rent);\r\n this.selectedMonthlyBooths[recordExist].SalesTax = this.customCurrency.transform(res.SalesTax);\r\n this.selectedMonthlyBooths[recordExist].CityTax = this.customCurrency.transform(res.CityTax);\r\n this.selectedMonthlyBooths[recordExist].January = this.customCurrency.transform(res.JanRent);\r\n this.selectedMonthlyBooths[recordExist].February = this.customCurrency.transform(res.FebRent);\r\n this.selectedMonthlyBooths[recordExist].March = this.customCurrency.transform(res.MarRent);\r\n this.selectedMonthlyBooths[recordExist].April = this.customCurrency.transform(res.AprRent);\r\n this.selectedMonthlyBooths[recordExist].May = this.customCurrency.transform(res.MayRent);\r\n this.selectedMonthlyBooths[recordExist].June = this.customCurrency.transform(res.JunRent);\r\n this.selectedMonthlyBooths[recordExist].July = this.customCurrency.transform(res.JulRent);\r\n this.selectedMonthlyBooths[recordExist].August = this.customCurrency.transform(res.AugRent);\r\n this.selectedMonthlyBooths[recordExist].September = this.customCurrency.transform(res.SepRent);\r\n this.selectedMonthlyBooths[recordExist].October = this.customCurrency.transform(res.OctRent);\r\n this.selectedMonthlyBooths[recordExist].November = this.customCurrency.transform(res.NovRent);\r\n this.selectedMonthlyBooths[recordExist].December = this.customCurrency.transform(res.DecRent);\r\n this.selectedMonthlyBooths[recordExist].JanuaryMonthPresent = res.JanuaryMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].FebruaryMonthPresent = res.FebruaryMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].MarchMonthPresent = res.MarchMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].AprilMonthPresent = res.AprilMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].MayMonthPresent = res.MayMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].JuneMonthPresent = res.JuneMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].JulyMonthPresent = res.JulyMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].AugustMonthPresent = res.AugustMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].SeptemberMonthPresent = res.SeptemberMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].OctoberMonthPresent = res.OctoberMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].NovemberMonthPresent = res.NovemberMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].DecemberMonthPresent = res.DecemberMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].DisableJanMonth = res.JanRent || res.JanRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableFebMonth = res.FebRent || res.FebRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableMarMonth = res.MarRent || res.MarRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableAprMonth = res.AprRent || res.AprRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableMayMonth = res.MayRent || res.MayRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableJunMonth = res.JunRent || res.JunRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableJulMonth = res.JulRent || res.JulRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableAugMonth = res.AugRent || res.AugRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableSepMonth = res.SepRent || res.SepRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableOctMonth = res.OctRent || res.OctRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableNovMonth = res.NovRent || res.NovRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableDecMonth = res.DecRent || res.DecRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].StartDateList = currentMonthRentalDates;\r\n this.selectedMonthlyBooths[recordExist].ExtendRental = true;\r\n this.selectedMonthlyBooths[recordExist].AllRentalDates = rentalDates.map(el => new Date(el.startDate));\r\n\r\n this.totalRentalCharge += res.Rent.toString().includes('(') && res.Rent.toString().includes(')') ? -1 * parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n // this.getDiscounts();\r\n }, err => {\r\n }));\r\n }\r\n else {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Rental End Period cannot be extended further`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n }));\r\n }\r\n else {\r\n this.selectedMonthlyBooths[recordExist].CMRenewalMonth = this.selectedMonthlyBooths[recordExist].RentEndPeriod;\r\n this.selectedMonthlyBooths[recordExist].RenewalStartMonth = \"This booking cannot be extended further!\"\r\n this.selectedMonthlyBooths[recordExist].BookingCanExtend = false;\r\n }\r\n }\r\n }\r\n\r\n async handleCWEndDateChange() {\r\n\r\n this.renewAllBoothsFromGrid = true;\r\n this.vendorRentalDays = [];\r\n this.marketDayCountForResale = 0;\r\n\r\n let rentalDates = this.calculateRentalDates();\r\n await this.processVendorRentalDays(rentalDates);\r\n }\r\n \r\n calculateRentalDates() {\r\n let rentalDates = [];\r\n const selectedBooths = this.selectedWeeklyBooths.filter(e => e.NewBooth || e.ExtendRental);\r\n \r\n selectedBooths.forEach(record => {\r\n const selectedDayOfWeek = this.getSelectedDayOfWeek(record);\r\n let currentDay = new Date(record.RentalStartDate);\r\n const endDate = new Date(record.RentalEndDate);\r\n \r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n rentalDates.push({ startDate: this.datePipe.transform(currentDay, 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n });\r\n \r\n return rentalDates;\r\n }\r\n \r\n getSelectedDayOfWeek(record) {\r\n return record.Sunday ? 0 :\r\n record.Monday ? 1 :\r\n record.Tuesday ? 2 :\r\n record.Wednesday ? 3 :\r\n record.Thursday ? 4 :\r\n record.Friday ? 5 :\r\n record.Saturday ? 6 : null;\r\n }\r\n \r\n async processVendorRentalDays(rentalDates) {\r\n rentalDates.forEach(date => {\r\n const targetDateString = this.datePipe.transform(date.startDate, \"MM/dd/yyyy\");\r\n if (!this.vendorRentalDays.some(el => this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\") === targetDateString)) {\r\n this.vendorRentalDays.push({ VendorRentalDate: targetDateString });\r\n this.marketDayCountForResale += 1;\r\n if (this.marketDayCountForResale > this.DaysSellWithoutResaleNumber && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n return;\r\n }\r\n }\r\n });\r\n \r\n const obj = { VendorID: this.vendorId, VendorRentalDate: new Date() };\r\n const res = await this.rentalService.getVendorRentalDays(obj).toPromise();\r\n \r\n if (res && res.length > 0) {\r\n res.forEach(el => {\r\n const targetDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n if (!this.vendorRentalDays.some(data => this.datePipe.transform(data.VendorRentalDate, \"MM/dd/yyyy\") === targetDateString)) {\r\n this.vendorRentalDays.push({ VendorRentalDate: targetDateString });\r\n this.marketDayCountForResale += 1;\r\n }\r\n });\r\n }\r\n \r\n await this.checkResaleAndBusinessLicense();\r\n }\r\n \r\n async checkResaleAndBusinessLicense() {\r\n if (this.ResaleNumberRequired && !this.exemptResale && !this.resaleNo && this.marketDayCountForResale > this.DaysSellWithoutResaleNumber && !this.resaleOptionSelected) {\r\n this.showModal(this.modalResaleNo.nativeElement);\r\n } else if (this.BusinessLicenseNumberRequired && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n if (!this.businessLicenseNumber) {\r\n await this.promptBusinessLicense();\r\n } else if (!this.businessLicenseExpiryDate || new Date(this.businessLicenseExpiryDate) < new Date()) {\r\n await this.promptExpiredBusinessLicense();\r\n } else {\r\n this.renewCWAllBooths();\r\n }\r\n } else {\r\n this.renewCWAllBooths();\r\n }\r\n }\r\n \r\n showModal(modal) {\r\n modal.classList.add('show');\r\n modal.style.display = 'block';\r\n }\r\n \r\n async promptBusinessLicense() {\r\n const result = await Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Business License Number is required! Do you want to continue without Business License Number?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n });\r\n \r\n if (result.value) {\r\n this.renewCWAllBooths();\r\n }\r\n }\r\n \r\n async promptExpiredBusinessLicense() {\r\n const result = await Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Business License is expired! Do you want to continue?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n });\r\n \r\n if (result.value) {\r\n this.renewCWAllBooths();\r\n }\r\n }\r\n \r\n\r\n async renewCWAllBooths(){\r\n var nonAvailableBooths = [];\r\n for (const item of this.selectedWeeklyBooths) {\r\n // this.selectedWeeklyBooths.forEach((item, i) => {\r\n if (new Date(item.RentEndPeriod.split('-')[0]) <= new Date(item.CWRenewalWeek.split('-')[0])\r\n && !item.Drop && item.Reservation && this.allowCWRentalRenewal) {\r\n if (item.WeeklyRentalId != 0)\r\n var recordExist = this.selectedWeeklyBooths.findIndex(e => e.RentStartPeriod == item.RentStartPeriod && e.RentEndPeriod == item.RentEndPeriod\r\n && e.BoothNumber == item.BoothNumber && e.WeeklyRentalId == item.WeeklyRentalId);\r\n else\r\n var recordExist = this.selectedWeeklyBooths.findIndex(e => e.RentStartPeriod == item.RentStartPeriod && e.RentEndPeriod == item.RentEndPeriod\r\n && e.BoothNumber == item.BoothNumber && e.RentalMarketDay == item.RentalMarketDay);\r\n\r\n if (recordExist != -1 && item.Status != \"R\") {\r\n var rentalstartDate = \"\";\r\n var marketDays = 0;\r\n var currentMonthRentalDates = [];\r\n const startDate = new Date(this.selectedWeeklyBooths[recordExist].RentalStartDate);\r\n const endDate = new Date(item.CWRenewalWeek.split('-')[1]); \r\n const currentMonthEnd = new Date(this.selectedWeeklyBooths[recordExist].RentEndPeriod.split('-')[1])\r\n var rentalDates = [];\r\n this.selectedMarketDays =[];\r\n this.selectedWeeklyBooths[recordExist].Sunday == true ? this.selectedMarketDays.push(1) : 0;\r\n this.selectedWeeklyBooths[recordExist].Monday ? this.selectedMarketDays.push(2) : 0;\r\n this.selectedWeeklyBooths[recordExist].Tuesday == true ? this.selectedMarketDays.push(3) : 0;\r\n this.selectedWeeklyBooths[recordExist].Wednesday == true ? this.selectedMarketDays.push(4) : 0;\r\n this.selectedWeeklyBooths[recordExist].Thursday == true ? this.selectedMarketDays.push(5) : 0;\r\n this.selectedWeeklyBooths[recordExist].Friday == true ? this.selectedMarketDays.push(6) : 0;\r\n this.selectedWeeklyBooths[recordExist].Saturday == true ? this.selectedMarketDays.push(7) : 0;\r\n\r\n let currentDay = new Date(startDate);\r\n rentalDates = await this.CWRentalDateList(startDate,endDate); \r\n currentMonthRentalDates = await this.CWRentalDateList(startDate,currentMonthEnd); \r\n\r\n var allRentalDates = rentalDates.map(el => new Date(el.startDate));\r\n var currentRentedEndDate = new Date(this.selectedWeeklyBooths[recordExist].RentalEndDate);\r\n const filteredRentalDates = allRentalDates.filter(rentalDate => rentalDate > currentRentedEndDate);\r\n var obj1 = {\r\n RentalDates: filteredRentalDates,\r\n BoothNumber: this.selectedWeeklyBooths[recordExist].BoothNumber\r\n }\r\n\r\n const rentalExist = await this.rentalService.checkRentalExits(this.marketId,obj1).toPromise();\r\n if (!rentalExist.Success) {\r\n var RentAmount = this.selectedWeeklyBooths[recordExist].Rent;\r\n var SalesTax = this.selectedWeeklyBooths[recordExist].SalesTax;\r\n var CityTax = this.selectedWeeklyBooths[recordExist].CityTax;\r\n var JanRentAmount = this.selectedWeeklyBooths[recordExist].January ?? 0;\r\n var FebRentAmount = this.selectedWeeklyBooths[recordExist].February ?? 0;\r\n var MarRentAmount = this.selectedWeeklyBooths[recordExist].March ?? 0;\r\n var AprRentAmount = this.selectedWeeklyBooths[recordExist].April ?? 0;\r\n var MayRentAmount = this.selectedWeeklyBooths[recordExist].May ?? 0;\r\n var JunRentAmount = this.selectedWeeklyBooths[recordExist].June ?? 0;\r\n var JulRentAmount = this.selectedWeeklyBooths[recordExist].July ?? 0;\r\n var AugRentAmount = this.selectedWeeklyBooths[recordExist].August ?? 0;\r\n var SepRentAmount = this.selectedWeeklyBooths[recordExist].September ?? 0;\r\n var OctRentAmount = this.selectedWeeklyBooths[recordExist].October ?? 0;\r\n var NovRentAmount = this.selectedWeeklyBooths[recordExist].November ?? 0;\r\n var DecRentAmount = this.selectedWeeklyBooths[recordExist].December ?? 0;\r\n\r\n var extendRentalStartPeriod;\r\n if (!this.selectedWeeklyBooths[recordExist].NewBooth && this.selectedWeeklyBooths[recordExist].Status != \"R\") {\r\n extendRentalStartPeriod = new Date(this.selectedWeeklyBooths[recordExist].RentalSavedEndDate);\r\n extendRentalStartPeriod.setDate(extendRentalStartPeriod.getDate() + 1);\r\n }\r\n else {\r\n extendRentalStartPeriod = new Date(this.selectedWeeklyBooths[recordExist].RentStartPeriod.split(\"-\")[0]);\r\n }\r\n\r\n var obj = {\r\n BoothTypeId: this.selectedWeeklyBooths[recordExist].BoothTypeId,\r\n VendorId: this.vendorId,\r\n RentalStartPeriod: new Date(extendRentalStartPeriod),\r\n RentalEndPeriod: new Date(item.CWRenewalWeek.split(\"-\")[1]),\r\n PerDiemApplicable: this.selectedWeeklyBooths[recordExist].PerDiem,\r\n JanRent: JanRentAmount.toString().includes('(') && JanRentAmount.toString().includes(')') ? -1 * parseFloat(JanRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(JanRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n FebRent: FebRentAmount.toString().includes('(') && FebRentAmount.toString().includes(')') ? -1 * parseFloat(FebRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(FebRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n MarRent: MarRentAmount.toString().includes('(') && MarRentAmount.toString().includes(')') ? -1 * parseFloat(MarRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(MarRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n AprRent: AprRentAmount.toString().includes('(') && AprRentAmount.toString().includes(')') ? -1 * parseFloat(AprRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(AprRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n MayRent: MayRentAmount.toString().includes('(') && MayRentAmount.toString().includes(')') ? -1 * parseFloat(MayRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(MayRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n JunRent: JunRentAmount.toString().includes('(') && JunRentAmount.toString().includes(')') ? -1 * parseFloat(JunRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(JunRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n JulRent: JulRentAmount.toString().includes('(') && JulRentAmount.toString().includes(')') ? -1 * parseFloat(JulRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(JulRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n AugRent: AugRentAmount.toString().includes('(') && AugRentAmount.toString().includes(')') ? -1 * parseFloat(AugRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(AugRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n SepRent: SepRentAmount.toString().includes('(') && SepRentAmount.toString().includes(')') ? -1 * parseFloat(SepRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(SepRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n OctRent: OctRentAmount.toString().includes('(') && OctRentAmount.toString().includes(')') ? -1 * parseFloat(OctRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(OctRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n NovRent: NovRentAmount.toString().includes('(') && NovRentAmount.toString().includes(')') ? -1 * parseFloat(NovRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(NovRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n DecRent: DecRentAmount.toString().includes('(') && DecRentAmount.toString().includes(')') ? -1 * parseFloat(DecRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(DecRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n }\r\n\r\n const res = await this.rentalService.getBoothRentalCombinedWeeklyCharges(this.marketId,obj).toPromise();\r\n if (res) {\r\n this.selectedWeeklyBooths[recordExist].MktDays = marketDays;\r\n this.selectedWeeklyBooths[recordExist].RentalEndDate = rentalDates[rentalDates.length - 1].startDate;\r\n this.selectedWeeklyBooths[recordExist].RentEndPeriod = item.RentEndPeriod;\r\n this.selectedWeeklyBooths[recordExist].January = this.customCurrency.transform(res.JanRent);\r\n this.selectedWeeklyBooths[recordExist].February = this.customCurrency.transform(res.FebRent);\r\n this.selectedWeeklyBooths[recordExist].March = this.customCurrency.transform(res.MarRent);\r\n this.selectedWeeklyBooths[recordExist].April = this.customCurrency.transform(res.AprRent);\r\n this.selectedWeeklyBooths[recordExist].May = this.customCurrency.transform(res.MayRent);\r\n this.selectedWeeklyBooths[recordExist].June = this.customCurrency.transform(res.JunRent);\r\n this.selectedWeeklyBooths[recordExist].July = this.customCurrency.transform(res.JulRent);\r\n this.selectedWeeklyBooths[recordExist].August = this.customCurrency.transform(res.AugRent);\r\n this.selectedWeeklyBooths[recordExist].September = this.customCurrency.transform(res.SepRent);\r\n this.selectedWeeklyBooths[recordExist].October = this.customCurrency.transform(res.OctRent);\r\n this.selectedWeeklyBooths[recordExist].November = this.customCurrency.transform(res.NovRent);\r\n this.selectedWeeklyBooths[recordExist].December = this.customCurrency.transform(res.DecRent);\r\n this.selectedWeeklyBooths[recordExist].Rent = this.customCurrency.transform(res.Rent);\r\n this.selectedWeeklyBooths[recordExist].SalesTax = this.customCurrency.transform(res.SalesTax);\r\n this.selectedWeeklyBooths[recordExist].CityTax = this.customCurrency.transform(res.CityTax);\r\n this.selectedWeeklyBooths[recordExist].JanuaryMonthPresent = res.JanuaryMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].FebruaryMonthPresent = res.FebruaryMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].MarchMonthPresent = res.MarchMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].AprilMonthPresent = res.AprilMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].MayMonthPresent = res.MayMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].JuneMonthPresent = res.JuneMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].JulyMonthPresent = res.JulyMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].AugustMonthPresent = res.AugustMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].SeptemberMonthPresent = res.SeptemberMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].OctoberMonthPresent = res.OctoberMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].NovemberMonthPresent = res.NovemberMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].DecemberMonthPresent = res.DecemberMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].DisableJanMonth = res.JanRent || res.JanRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableFebMonth = res.FebRent || res.FebRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableMarMonth = res.MarRent || res.MarRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableAprMonth = res.AprRent || res.AprRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableMayMonth = res.MayRent || res.MayRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableJunMonth = res.JunRent || res.JunRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableJulMonth = res.JulRent || res.JulRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableAugMonth = res.AugRent || res.AugRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableSepMonth = res.SepRent || res.SepRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableOctMonth = res.OctRent || res.OctRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableNovMonth = res.NovRent || res.NovRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableDecMonth = res.DecRent || res.DecRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].StartDateList = currentMonthRentalDates;\r\n this.selectedWeeklyBooths[recordExist].ExtendRental = true;\r\n\r\n this.updateTotalCharges(res.Rent, res.SalesTax, res.CityTax); \r\n // this.getDiscounts();\r\n }\r\n }\r\n else {\r\n nonAvailableBooths.push(this.selectedWeeklyBooths[recordExist].BoothNumber);\r\n this.selectedWeeklyBooths[recordExist].CWRenewalWeek = item.RentEndPeriod;\r\n this.selectedWeeklyBooths[recordExist].RenewalStartWeek = \"This booking cannot be extended further!\"\r\n this.selectedWeeklyBooths[recordExist].BookingCanExtend = false;\r\n this.selectedWeeklyBooths[recordExist].Rent = this.customCurrency.transform(\"0\");\r\n this.selectedWeeklyBooths[recordExist].BlockRenewal = true;\r\n }\r\n }\r\n }\r\n else{\r\n var recordExist = this.selectedWeeklyBooths.findIndex(e => e.RentStartPeriod == item.RentStartPeriod && e.RentEndPeriod == item.RentEndPeriod\r\n && e.BoothNumber == item.BoothNumber && e.WeeklyRentalId == item.WeeklyRentalId);\r\n item.CWRenewalWeek = item.RentEndPeriod;\r\n item.RenewalStartWeek = \"This booking cannot be extended further!\"\r\n item.BookingCanExtend = false;\r\n this.selectedWeeklyBooths[recordExist].BlockRenewal = true;\r\n //if (!this.allowCWRentalRenewal) {\r\n if (recordExist != -1) {\r\n this.selectedWeeklyBooths[recordExist].Rent = this.customCurrency.transform(\"0\")\r\n }\r\n // }\r\n }\r\n }\r\n\r\n if (nonAvailableBooths.length > 0) {\r\n const nonAvailableBoothsString = nonAvailableBooths.join(', ');\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Cannot be renewed further as the booth number ` + nonAvailableBoothsString + ` is not available`,\r\n icon: \"info\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n }\r\n\r\n updateCMOtherItemRecord(record){\r\n if (record.Recurring) {\r\n const rentEndPeriodIndex = this.monthlyMarketDays.findIndex(e => e.RentalMonths == record.RentalMonth);\r\n const renewalStartMonth = this.monthlyMarketDays[rentEndPeriodIndex + 1].RentalMonths;\r\n record.BookingCanExtend = true;\r\n record.Quantity = 1;\r\n record.RenewalStartMonth = renewalStartMonth;\r\n record.CMRenewalMonth = renewalStartMonth;\r\n record.RentEndPeriodIndex = rentEndPeriodIndex\r\n this.extendCMOtherRental(record);\r\n }\r\n else { \r\n record.BookingCanExtend = false;\r\n record.RenewalStartWeek = \"This booking cannot be extended further!\";\r\n record.CMRenewalMonth = record.RentalMonth;\r\n this.totalOtherRentalCharge -= record.OtherItemtotal.toString().includes('(') && record.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(record.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= record.SalesTax.toString().includes('(') && record.SalesTax.toString().includes(')') ? -1 * parseFloat(record.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= record.CityTax.toString().includes('(') && record.CityTax.toString().includes(')') ? -1 * parseFloat(record.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n otherCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n record.OtherItemtotal = this.customCurrency.transform(\"0\");\r\n record.Quantity = 0;\r\n record.OtherItemCharge = this.customCurrency.transform(\"0\");\r\n }\r\n }\r\n\r\n updateCWOtherItemRecord(record){\r\n if (record.Recurring) {\r\n const rentEndPeriodIndex = this.weeklyMarketDays.findIndex(e => e.RentalEndDays == record.RentalWeek);\r\n var renewalStartWeek = this.weeklyMarketDays[rentEndPeriodIndex + 1].RentalEndDays;\r\n if (record.RentalWeek == \"R\") {\r\n renewalStartWeek = this.weeklyMarketDays[rentEndPeriodIndex].RentalEndDays;\r\n }\r\n record.BookingCanExtend = true;\r\n record.Quantity = 1;\r\n record.RenewalStartWeek = renewalStartWeek\r\n record.CWRenewalWeek = renewalStartWeek;\r\n record.RentEndPeriodIndex = rentEndPeriodIndex\r\n this.extendCWOtherRental(record);\r\n }\r\n else {\r\n record.BookingCanExtend = false;\r\n record.RenewalStartWeek = \"This booking cannot be extended further!\";\r\n record.CWRenewalWeek = record.RentalWeek;\r\n this.totalOtherRentalCharge -= record.OtherItemtotal.toString().includes('(') && record.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(record.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= record.SalesTax.toString().includes('(') && record.SalesTax.toString().includes(')') ? -1 * parseFloat(record.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= record.CityTax.toString().includes('(') && record.CityTax.toString().includes(')') ? -1 * parseFloat(record.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n otherCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n record.OtherItemtotal = this.customCurrency.transform(\"0\");\r\n record.Quantity = 0;\r\n record.OtherItemCharge = this.customCurrency.transform(\"0\");\r\n }\r\n }\r\n\r\n updateCWRentalRecord(record) {\r\n if (record.Reservation && this.allowCWRentalRenewal && !record.BlockRenewal) {\r\n const rentEndPeriodIndex = this.weeklyMarketDays.findIndex(e => e.RentalEndDays == record.CurrentRentEndPeriod);\r\n const renewalStartWeek = this.weeklyMarketDays[rentEndPeriodIndex + 1].RentalEndDays;\r\n record.BookingCanExtend = true;\r\n record.RenewalStartWeek = renewalStartWeek\r\n record.CWRenewalWeek = renewalStartWeek;\r\n record.RentEndPeriodIndex = rentEndPeriodIndex\r\n this.extendCWRental(record);\r\n }\r\n else {\r\n record.BookingCanExtend = false;\r\n record.RenewalStartWeek = \"This booking cannot be extended further!\";\r\n record.CWRenewalWeek = record.CurrentRentEndPeriod;\r\n this.totalRentalCharge -= record.Rent.toString().includes('(') && record.Rent.toString().includes(')') ? -1 * parseFloat(record.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= record.SalesTax.toString().includes('(') && record.SalesTax.toString().includes(')') ? -1 * parseFloat(record.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= record.CityTax.toString().includes('(') && record.CityTax.toString().includes(')') ? -1 * parseFloat(record.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n record.Rent = this.customCurrency.transform(\"0\");\r\n }\r\n }\r\n\r\n renewCWOtherCharges() {\r\n if (this.selectedOtherItems.length > 0) {\r\n this.proceedRenewingCWOtherCharges();\r\n }\r\n }\r\n\r\n getActualAmountFromInp(value) {\r\n var amount = value.toString().includes('(') && value.toString().includes(')') ? -1 * parseFloat(value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(value.toString().replace(/[^0-9.-]/g, ''));\r\n return amount;\r\n }\r\n\r\n disableSavePayment() {\r\n var proceedPayment = false;\r\n this.paymentAdjustedWithPriorBal = false;\r\n const rentalCharge = this.getActualAmountFromInp(this.bookingDetailsForm.get('rentalCharge').value)\r\n const otherCharge = this.getActualAmountFromInp(this.bookingDetailsForm.get('otherCharge').value)\r\n const salesTax = this.getActualAmountFromInp(this.bookingDetailsForm.get('totalSalesTax').value)\r\n const secondTax = this.getActualAmountFromInp(this.bookingDetailsForm.get('totalSecondLeveltax').value)\r\n const additionalCharge = this.getActualAmountFromInp(this.bookingDetailsForm.get('additionalCharge').value)\r\n const priorBalance = this.getActualAmountFromInp(this.bookingDetailsForm.get('priorBalance').value)\r\n var totalCharges = rentalCharge + otherCharge + salesTax + secondTax + additionalCharge;\r\n if(totalCharges + priorBalance == 0){\r\n proceedPayment = true;\r\n this.paymentAdjustedWithPriorBal = true;\r\n }\r\n \r\n const paymentAmount = this.bookingDetailsForm.get('totalPayment').value.toString().includes('(') && this.bookingDetailsForm.get('totalPayment').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('totalPayment').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('totalPayment').value.toString().replace(/[^0-9.-]/g, ''));\r\n if (paymentAmount > 0 || proceedPayment) {\r\n return false\r\n }\r\n else\r\n return true\r\n }\r\n\r\n addDays(date: Date, days: number): Date {\r\n const result = new Date(date);\r\n result.setDate(result.getDate() + days);\r\n return result;\r\n }\r\n\r\n proceedRenewingCWOtherCharges(){\r\n for(const item of this.selectedOtherItems){\r\n if (new Date(item.RentalWeek.split('-')[0]) <= new Date(item.CWRenewalWeek.split('-')[0])\r\n && item.Recurring && this.allowOtherItemRenewal) {\r\n var nextDate = this.addDays(new Date(item.RentalWeek.split('-')[0]), 7);\r\n var rentalWeekDate = this.weeklyMarketDays.filter(date => new Date(date.RentalEndDays.split('-')[0]) <= new Date(nextDate)\r\n && new Date(date.RentalEndDays.split('-')[1]) >= new Date(nextDate))\r\n if (rentalWeekDate.length > 0)\r\n var rentalStartWeek = rentalWeekDate[0].RentalStartDays;\r\n\r\n var recordExist = this.selectedOtherItems.findIndex(e => e.RentalWeek == item.RentalWeek && e.Id == item.Id && e.Reference == item.Reference && e.BoothNo == item.BoothNo)\r\n var otherItemCharge;\r\n if (this.otherItemList.length > 0) {\r\n otherItemCharge = this.otherItemList.filter(e => e.Id == item.Id)[0].OtherItemCharge;\r\n if (!this.masterRentChargeforResOtherItems && this.allrentedOtherItems.length > 0) {\r\n otherItemCharge = this.customCurrency.transform(this.allrentedOtherItems.filter(e => e.OtherItemId == item.Id)[0].OtherCharge);\r\n }\r\n } else {\r\n otherItemCharge = this.customCurrency.transform(this.allrentedOtherItems.filter(e => e.OtherItemId == item.Id)[0].OtherCharge);\r\n }\r\n if (item.Status != \"R\") {\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: item.Id,\r\n VendorId: this.vendorId,\r\n Quantity: item.Quantity,\r\n OtherItemCharge: otherItemCharge.includes('(') && otherItemCharge.includes(')') ? (-1) * parseFloat(otherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(otherItemCharge.replace(/[^0-9.-]/g, ''))\r\n }\r\n this.rentalService.getOtherItemsRentalCharges(obj).subscribe((res: any) => {\r\n if (recordExist != -1) {\r\n const isNegative = otherItemCharge.includes('(') && otherItemCharge.includes(')');\r\n const totalValue = parseFloat(otherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n item.OtherItemtotal = this.customCurrency.transform((finalCharge * item.Quantity).toString());\r\n\r\n this.selectedOtherItems[recordExist].OtherItemCharge = otherItemCharge;\r\n this.selectedOtherItems[recordExist].Quantity = item.Quantity;\r\n this.selectedOtherItems[recordExist].OtherItemtotal = item.OtherItemtotal;\r\n this.selectedOtherItems[recordExist].RentalWeek = rentalStartWeek;\r\n this.selectedOtherItems[recordExist].SalesTax = this.customCurrency.transform(res.SalesTax.toString());\r\n this.selectedOtherItems[recordExist].CityTax = this.customCurrency.transform(res.CityTax.toString());\r\n this.selectedOtherItems[recordExist].BoothNo = item.othChgBooths ?? \"none\";\r\n this.selectedOtherItems[recordExist].Recurring = item.Recurring;\r\n this.selectedOtherItems[recordExist].WeeklyOtherRentalIds = \"\";\r\n }\r\n this.totalOtherRentalCharge += item.OtherItemtotal.toString().includes('(') && item.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(item.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n otherCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n });\r\n }\r\n }\r\n else{\r\n var recordExist = this.selectedOtherItems.findIndex(e => e.MonthOtherRentalId == item.MonthOtherRentalId)\r\n item.BookingCanExtend = false;\r\n item.RenewalStartWeek = \"This booking cannot be extended further!\";\r\n item.CWRenewalWeek =\"\"\r\n if (!this.allowOtherItemRenewal) {\r\n if (recordExist != -1) {\r\n this.selectedOtherItems[recordExist].OtherItemCharge = this.customCurrency.transform(\"0\")\r\n this.selectedOtherItems[recordExist].OtherItemtotal = this.customCurrency.transform(\"0\")\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n closeResaleModal(){\r\n // this.refreshAddBooth();\r\n const modal = this.modalResaleNo.nativeElement;\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'none';\r\n modal.classList.remove('show');\r\n }\r\n }\r\n\r\n resaleOptionValidation() {\r\n this.exemptResaleReason = \"\";\r\n this.resaleNo = \"\";\r\n }\r\n \r\n ngOnDestroy(): void {\r\n this.subscriptions.forEach((subscription) => {\r\n if (subscription) {\r\n subscription.unsubscribe();\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Booking DetailsRenew BookingRenew Start MonthRenew End MonthRent
\r\n Booth # : {{item.BoothNumber}}
\r\n Status : {{item.Status == 'R'? 'Reserved' : 'Booked'}}
\r\n \r\n {{ item.showDetails ? 'Hide Details' : 'Show Details' }}\r\n \r\n
\r\n Product : {{item.ProductName}}
\r\n Rent Charged :{{item.CurrentRent}}
\r\n Sales Tax : {{item.CurrentSalesTax}}
\r\n {{secondTaxName}} : {{item.CurrentSecondTax}}
\r\n Booking Start Week : {{item.CurrentRentStartPeriod}}
\r\n Booking End Week : {{item.CurrentRentEndPeriod}}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
{{item.RenewalStartMonth}}\r\n {{item.Rent}}
No records found
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Booking DetailsRenew BookingsRenewal Start MonthRenewal End MonthChargeQtyTotal
\r\n Product: {{item.OtherItem}}
\r\n Status : Booked
\r\n \r\n \r\n {{ item.showOtherItemsDetails ? 'Hide Details' : 'Show Details' }}\r\n \r\n
\r\n Booking Start Month : {{item.CurrentRentalMonth}}
\r\n Rent Charged : {{item.CurrentOtherItemtotal}}
\r\n Sales Tax : {{item.CurrentSalesTax}}
\r\n {{secondTaxName}}: {{item.CurrentSecLevelTax}}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n {{item.RenewalStartMonth}}\r\n \r\n {{item.OtherItemCharge}} {{item.Quantity}} {{item.OtherItemtotal}}
No records found
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Booking DetailsProductRenew BookingRenewal Start WeekRenewal End WeekWeek DayRent
\r\n Booth # : {{item.BoothNumber}}
\r\n Status : {{item.Status == 'R'? 'Reserved' : 'Booked'}}
\r\n \r\n {{ item.showDetails ? 'Hide Details' : 'Show Details' }}\r\n \r\n
\r\n Product : {{item.ProductName}}
\r\n Rent Charged :{{item.CurrentRent}}
\r\n Sales Tax : {{item.CurrentSalesTax}}
\r\n {{secondTaxName}} : {{item.CurrentSecondTax}}
\r\n Booking Start Week : {{item.CurrentRentStartPeriod}}
\r\n Booking End Week : {{item.CurrentRentEndPeriod}}
\r\n
\r\n
{{item.ProductName}}\r\n \r\n
\r\n \r\n
\r\n
{{item.RenewalStartWeek}}\r\n {{item.WeekDay}}{{item.Rent}}
No records found
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Booking DetailsRenew BookingRenewal Start WeekRenewal End WeekChargeQtyTotal
\r\n Product: {{item.OtherItem}}
\r\n Status : Booked
\r\n \r\n \r\n {{ item.showOtherItemsDetails ? 'Hide Details' : 'Show Details' }}\r\n \r\n
\r\n Booking Start Week : {{item.CurrentRentalWeek}}
\r\n Rent Charged : {{item.CurrentOtherItemtotal}}
\r\n Sales Tax : {{item.CurrentSalesTax}}
\r\n {{secondTaxName}} : {{item.CurrentSecLevelTax}}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
{{item.RenewalStartWeek}}\r\n \r\n {{item.OtherItemCharge}}{{item.Quantity}}{{item.OtherItemtotal}}
No records found
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
Resale Number
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
","import { DatePipe } from '@angular/common';\r\nimport { Component, ElementRef, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';\r\nimport { AbstractControl, FormArray, FormBuilder, FormGroup } from '@angular/forms';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { forkJoin, Subscription } from 'rxjs';\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\nimport { PaymentService } from 'src/app/services/paymentService.service';\r\nimport { RentalService } from 'src/app/services/Rental.service';\r\nimport { VendorService } from 'src/app/services/Vendor.service';\r\nimport { customCurrencyPipe } from 'src/app/Shared/customCurrency.pipe';\r\nimport Swal from 'sweetalert2';\r\nimport { DiscountType } from 'src/app/Shared/enum';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { GeneralService } from 'src/app/services/General.service';\r\ninterface DateString {\r\n startDate: string;\r\n}\r\n\r\n@Component({\r\n selector: 'app-booking-details-weekly-monthly',\r\n templateUrl: './booking-details-weekly-monthly.component.html',\r\n styleUrls: ['./booking-details-weekly-monthly.component.scss']\r\n})\r\nexport class BookingDetailsWeeklyMonthlyComponent implements OnInit, OnDestroy {\r\n @Input() rentalType;\r\n RentalTypeText;\r\n voidPayment = false;\r\n selectedBooths = [];\r\n selectedMonthlyBooths =[]\r\n public loaderIcon: Promise;\r\n private subscriptions: Subscription[] = [];\r\n @Input() vendorId;\r\n @Input() marketId;\r\n processPayment = false;\r\n paymentAmount = 0;\r\n vendorProducts=[];\r\n vendorDiscountPlans=[];\r\n priorBalance;\r\n paymentGatewayCredentials;\r\n PromptRenewOther = false;\r\n processCreditCardOnline;\r\n verifoneId;\r\n paymentOnly = false;\r\n masterRentChargeforResOtherItems = false;\r\n openConfirmationPage = false;\r\n creditCardAmount = 0;\r\n accountReceipId;\r\n selectedWeeklyBooths;\r\n private clickTimeout: any;\r\n selectedMarketDays = [];\r\n rentEndPeriodIndex;\r\n private monthEndDateCache = new Map();\r\n totalRentalCharge = 0.00;\r\n totalOtherRentalCharge = 0.00;\r\n totalSalesTax = 0.00;\r\n totalSecondLeveltax = 0.00\r\n totalCharge = 0.00;\r\n otherItemList = [];\r\n toasterConfig = {\r\n closeButton: true,\r\n timeOut: 4500,\r\n easing: 'ease-out',\r\n progressBar: true,\r\n positionClass: 'toast-top-right',\r\n tapToDismiss: true,\r\n showEasing: 'swing',\r\n hideEasing: 'linear',\r\n showMethod: 'fadeIn',\r\n hideMethod: 'slideUp'\r\n };\r\n bookingDetailsForm: FormGroup;\r\n selectedOtherItems = [];\r\n applyCCCharge = false;\r\n CcfeeinPercentage;\r\n AllowPartialPay;\r\n vendorRentalDays;\r\n marketDayCountForResale = 0;\r\n actualTotalDue = 0;\r\n renewAllBoothsFromGrid;\r\n keyedInTransaction = true;\r\n MonthlyBookingEndDate = false;\r\n transactionType=\"CREDITSALE\"\r\n monthlyMarketDays = [];\r\n allrentedOtherItems = [];\r\n showDetails: boolean = false;\r\n ResaleNumberRequired = false;\r\n DaysSellWithoutResaleNumber;\r\n BusinessLicenseNumberRequired = false;\r\n DaysSellWithoutBusiLicNumber;\r\n resaleOptionSelected;\r\n resaleNoOption = \"1\";\r\n exemptResale = false;\r\n resaleNo = \"\";\r\n exemptResaleReason = \"\";\r\n businessLicenseNumber;\r\n businessLicenseExpiryDate;\r\n secondTaxName=\"\";\r\n weeklyMarketDays =[];\r\n @ViewChild('modalResaleNo', { static: false }) modalResaleNo: ElementRef;\r\n totalDiscountCharge;\r\n applyRenewalFee = false;\r\n bookingRenewalFeeId;\r\n renewalFeeAmount = 0\r\n rules: any[] = [];\r\n allowWeeklyRentalRenewal = false;\r\n allowMonthlyRentalRenewal = false;\r\n allowOtherItemRenewal = false;\r\n paymentAdjustedWithPriorBal = false;\r\n savePayment = false;\r\n constructor(\r\n private formbuilder: FormBuilder,\r\n private route: ActivatedRoute,\r\n public router: Router,\r\n public rentalService: RentalService,\r\n public vendorService: VendorService,\r\n private customCurrency: customCurrencyPipe,\r\n private paymentService: PaymentService,\r\n private toastr: ToastrService,\r\n private generalService: GeneralService,\r\n private marketInfoService: MarketInfoService,\r\n private datePipe: DatePipe) {\r\n this.bookingDetailsForm = this.formbuilder.group({\r\n priorBalance: [this.customCurrency.transform('0')],\r\n totalCharge: [this.customCurrency.transform('0')],\r\n paymentAmount: [this.customCurrency.transform('0')],\r\n convenienceFee: [this.customCurrency.transform('0')],\r\n totalPayment: [this.customCurrency.transform('0')],\r\n balanceDue: [this.customCurrency.transform('0')],\r\n rentalCharge: [this.customCurrency.transform('0')],\r\n otherCharge: [this.customCurrency.transform('0')],\r\n discount: [this.customCurrency.transform('0')],\r\n additionalCharge: [this.customCurrency.transform('0')],\r\n totalSalesTax: [this.customCurrency.transform('0')],\r\n totalSecondLeveltax: [this.customCurrency.transform('0')],\r\n rules: this.formbuilder.array(this.initializeRulesArray())\r\n });\r\n\r\n this.subscriptions.push(\r\n this.bookingDetailsForm.get('totalCharge')?.valueChanges.subscribe((val) => {\r\n if (!this.AllowPartialPay)\r\n var totalCharge = val.toString().includes('(') && val.toString().includes(')') ? -1 * parseFloat(val.toString().replace(/[^0-9.-]/g, '')) : parseFloat(val.toString().replace(/[^0-9.-]/g, ''));\r\n var convenienceFee = this.bookingDetailsForm.get('convenienceFee').value.toString().includes('(') && this.bookingDetailsForm.get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, ''));\r\n if (convenienceFee > 0) {\r\n val = totalCharge - convenienceFee;\r\n val = this.customCurrency.transform(val);\r\n }\r\n this.bookingDetailsForm.get('paymentAmount')?.setValue(val, { emitEvent: false });\r\n this.calculateBalance();\r\n })\r\n );\r\n }\r\n \r\n ngOnInit(): void {\r\n const rentalTypeMapping: { [key: string]: string } = {\r\n '2': 'Monthly',\r\n '3': 'Weekly'\r\n };\r\n\r\n this.rentalType = parseInt(this.rentalType);\r\n this.RentalTypeText = rentalTypeMapping[this.rentalType] || '';\r\n this.marketInfoService.setMarketId(this.marketId);\r\n this.getMonthlyMarketDays();\r\n this.getOtherRentalItems();\r\n // this.getVendorProducts();\r\n this.getVendorBalances();\r\n this.getCCCredentials();\r\n this.getWebRentalSetting();\r\n this.getRentalPaymentSettings();\r\n this.getMarketRulesAndRegulations();\r\n }\r\n\r\n getOtherRentalItems() {\r\n this.rentalService.getOtherRentalItems(this.marketId).subscribe((response) => {\r\n if (response) {\r\n response.map((el, i) => {\r\n const ob = {\r\n Id: el.OtherItemId,\r\n OtherItem: el.OtherItem,\r\n OtherItemCharge: this.customCurrency.transform(el.OtherItemCombinedMonthlyCharge),\r\n Quantity: 0,\r\n OtherItemtotal: this.customCurrency.transform('0'),\r\n Recurring: el.Recurring,\r\n othChgBooths: \"none\"\r\n }\r\n this.otherItemList.push(ob);\r\n });\r\n }\r\n }, (err) => {\r\n });\r\n }\r\n\r\n initializeRulesArray(): FormGroup[] {\r\n return this.rules.map(rule => this.formbuilder.group({\r\n isChecked: [false], // Initialize checkbox with false\r\n rulesAndRegualtions: [rule.rulesAndRegualtions],\r\n AgreementLinkRequired: [rule.AgreementLinkRequired],\r\n AgreementBlobURL: [rule.AgreementBlobURL],\r\n AgreementLinkTextContent: [rule.AgreementLinkTextContent]\r\n }));\r\n }\r\n\r\n updateArrayDirectly(index: number, updatedValue: any) {\r\n const isChecked = (event.target as HTMLInputElement).checked;\r\n const control = this.rulesFormArray.at(index);\r\n if (control) {\r\n this.bookingDetailsForm.value['rules'][index].isChecked = isChecked;\r\n }\r\n }\r\n\r\n getMarketRulesAndRegulations() {\r\n const sub = this.generalService.getWebrentalMarketRules(this.marketId).subscribe((rules: any) => {\r\n if (rules) {\r\n const rulesArray = this.bookingDetailsForm.get('rules') as FormArray;\r\n rules.forEach(rule => {\r\n rulesArray.push(this.formbuilder.group({\r\n id: rule.ID,\r\n isChecked: false,\r\n rulesAndRegualtions: rule.Rules,\r\n AgreementLinkRequired : rule.AgreementLinkRequired ?? false,\r\n AgreementLinkTextContent: rule.AgreementLinkTextContent ?? \"\",\r\n AgreementBlobURL : rule.AgreementBlobURL ?? \"\"\r\n }));\r\n });\r\n }\r\n });\r\n }\r\n\r\n allCheckboxesCheckedValidator(control: AbstractControl) {\r\n var allChecked = this.bookingDetailsForm.value['rules'].filter(e=>!e.isChecked).length > 0 ? false : true;\r\n return allChecked;\r\n }\r\n\r\n get rulesFormArray() {\r\n return this.bookingDetailsForm.value['rules'] as FormArray;\r\n }\r\n\r\n getVendorProducts() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.rentalService.GetVendorProductsById(this.marketId, this.vendorId).subscribe((res: any) => {\r\n if (res) {\r\n this.vendorProducts = res.body;\r\n this.loaderIcon = Promise.resolve(false);\r\n } \r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n ClosePaymentPage(){\r\n this.processPayment = false;\r\n }\r\n\r\n getMonthlyMarketDays() {\r\n forkJoin({\r\n response: this.marketInfoService.getMonthlyMarketDays(this.marketId),\r\n weeklyMarket: this.marketInfoService.getWeeklyMarketDays(this.marketId),\r\n resRentalSettings: this.rentalService.getRentalSettings(this.marketId),\r\n vendorProducts: this.rentalService.GetVendorProductsById(this.marketId, this.vendorId)\r\n }).subscribe(\r\n async ({ response, resRentalSettings, vendorProducts,weeklyMarket }: any) => {\r\n if (response) {\r\n this.monthlyMarketDays = response;\r\n }\r\n if(weeklyMarket){\r\n this.weeklyMarketDays = weeklyMarket;\r\n }\r\n if (vendorProducts) {\r\n this.vendorProducts = vendorProducts.body;\r\n }\r\n\r\n if (resRentalSettings) {\r\n this.MonthlyBookingEndDate = resRentalSettings.MonthlyBookingEndDate;\r\n if (this.MonthlyBookingEndDate && this.rentalType == 4) {\r\n const currentDate = new Date();\r\n const currentYear = currentDate.getFullYear();\r\n const currentMonth = currentDate.getMonth();\r\n const currentYearMonth = `${currentYear}${(currentMonth + 1) < 10 ? '0' : ''}${(currentMonth + 1)}`;\r\n const currentMonthEndDate =await this.getMonthEndingDateFromSetting(currentYearMonth);\r\n if (currentMonthEndDate <= new Date(currentDate)) {\r\n var currentDateYearAndMonth = this.datePipe.transform(currentDate, 'MMMM yyyy');\r\n this.monthlyMarketDays = response.filter(e => e.RentalMonths != currentDateYearAndMonth)\r\n }\r\n }\r\n }\r\n // this.selectedMonthlyMarketDays(); \r\n if (this.rentalType == 2) {\r\n this.getMonthlyBookings();\r\n this.getMonthlyOtherRentals();\r\n }\r\n else if(this.rentalType == 3){\r\n this.getWeeklyRental();\r\n this.getWeeklyOtherRentals();\r\n }\r\n }, (err) => {\r\n });\r\n }\r\n\r\n getMonthIndex(monthString: string): number {\r\n const months = [\r\n 'January', 'February', 'March', 'April', 'May', 'June',\r\n 'July', 'August', 'September', 'October', 'November', 'December'\r\n ];\r\n const monthIndex = months.findIndex(month => month.toLowerCase() === monthString.toLowerCase());\r\n return monthIndex !== -1 ? monthIndex : 0;\r\n }\r\n\r\n getVendorBalances() {\r\n this.rentalService.getVendorBalances(this.vendorId, this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.priorBalance = res.PriorBalance;\r\n this.actualTotalDue = res.PriorBalance;\r\n this.bookingDetailsForm.patchValue({\r\n priorBalance: this.customCurrency.transform(this.priorBalance),\r\n totalCharge: this.customCurrency.transform(this.priorBalance)\r\n });\r\n }\r\n });\r\n }\r\n\r\n getMonthEndDate(inputDate: Date): Date {\r\n const nextMonthFirstDay = new Date(inputDate);\r\n nextMonthFirstDay.setMonth(nextMonthFirstDay.getMonth() + 1, 1);\r\n const monthEndDate = new Date(nextMonthFirstDay);\r\n monthEndDate.setDate(monthEndDate.getDate() - 1);\r\n return monthEndDate;\r\n }\r\n\r\n toggleDetails(index: number) {\r\n this.selectedMonthlyBooths[index].showDetails = !this.selectedMonthlyBooths[index].showDetails;\r\n }\r\n\r\n toggleOtherItemsDetails(index: number) {\r\n this.selectedOtherItems[index].showOtherItemsDetails = !this.selectedOtherItems[index].showOtherItemsDetails;\r\n }\r\n\r\n toggleWeeklyBookingDetails(index: number) {\r\n this.selectedWeeklyBooths[index].showDetails = !this.selectedWeeklyBooths[index].showDetails;\r\n }\r\n\r\n async getMonthlyBookings(): Promise {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedMonthlyBooths = [];\r\n var existingBooths = [];\r\n const sub = this.rentalService.getMonthlyBookings(this.marketId, this.vendorId).subscribe(async (res: any[]) => {\r\n if (res) {\r\n existingBooths = res;\r\n this.bindMonthlyRentalData(existingBooths);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n async bindMonthlyRentalData(existingBooths) {\r\n for (const el of existingBooths) {\r\n const StartDateList = [];\r\n var initialStartDate;\r\n var marketDays = 0;\r\n var marketDay;\r\n const today: Date = new Date(new Date().toDateString());\r\n\r\n var startDate = new Date(el.RentalStartDate);\r\n var endDate = new Date(el.RentalEndDate);\r\n if (el.Status == \"R\" && startDate < today) {\r\n startDate = today;\r\n initialStartDate = startDate;\r\n endDate = this.getMonthEndDate(startDate);\r\n }\r\n\r\n var selectedDayOfWeek = new Date(el.RentalStartDate).getDay();\r\n marketDay = this.datePipe.transform(el.RentalStartDate, 'EEE');\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n marketDays += 1;\r\n StartDateList.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n\r\n if (this.datePipe.transform(currentDay, 'MM/dd/yyyy') == this.datePipe.transform(endDate, 'MM/dd/yyyy')) {\r\n if (StartDateList && StartDateList.length == 0) {\r\n endDate.setDate(endDate.getDate() + 1);\r\n endDate = this.getMonthEndDate(endDate);\r\n }\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = StartDateList.sort(compareDates);\r\n switch (el) {\r\n case 1: marketDay = 'Sun'\r\n break;\r\n case 2: marketDay = 'Mon'\r\n break;\r\n case 3: marketDay = 'Tue'\r\n break;\r\n case 4: marketDay = 'Wed'\r\n break;\r\n case 5: marketDay = 'Thu'\r\n break;\r\n case 6: marketDay = 'Fri'\r\n break;\r\n case 7: marketDay = 'Sat'\r\n break;\r\n }\r\n\r\n if (el.Status == \"R\") {\r\n if (initialStartDate <= today) {\r\n el.RentalStartDate = StartDateList[0].startDate\r\n el.RentalEndDate = StartDateList[StartDateList.length - 1].startDate;\r\n }\r\n }\r\n\r\n const rentEndPeriodIndex = this.monthlyMarketDays.findIndex(e => e.RentalMonths == this.datePipe.transform(el.RentalEndDate, 'MMMM yyyy'));\r\n var renewalStartMonth = this.monthlyMarketDays[rentEndPeriodIndex +1].RentalMonths\r\n\r\n if (el.Status == \"R\") {\r\n renewalStartMonth = this.monthlyMarketDays[rentEndPeriodIndex].RentalMonths\r\n var obj = {\r\n BoothTypeId: el.BoothTypeId,\r\n VendorId: this.vendorId,\r\n RentalStartPeriod: new Date(el.RentalStartDate),\r\n RentalEndPeriod: new Date(el.RentalEndDate),\r\n RentalMarketDay: marketDay\r\n }\r\n const res = await this.rentalService.getBoothRentalMontlyCharges(this.marketId, obj).toPromise();\r\n if (res) {\r\n const ob = {\r\n MonthlyRentalId: el.MonthlyRentalId,\r\n BoothNumber: el.BoothNumber,\r\n BoothType: el.BoothType,\r\n BoothTypeId: el.BoothTypeId,\r\n RentalStartDate: this.datePipe.transform(el.RentalStartDate, 'MMM d, y'),\r\n RentalEndDate: this.datePipe.transform(el.RentalEndDate, 'MMM d, y'),\r\n RentalSavedEndDate: this.datePipe.transform(el.RentalStartDate, 'MMM d, y'),\r\n RentStartPeriod: this.datePipe.transform(el.RentalStartDate, 'MMMM yyyy'),\r\n RentEndPeriod: this.datePipe.transform(el.RentalEndDate, 'MMMM yyyy'),\r\n Product: el.ProductId,\r\n ProductName: this.vendorProducts.filter(e => e.ProductId == el.ProductId)[0]?.ProductName,\r\n StartDateList: StartDateList,\r\n MktDays: marketDays,\r\n PerDiemRent: this.customCurrency.transform('0.00'),\r\n Rent: this.customCurrency.transform(res.Rent),\r\n SalesTax: this.customCurrency.transform(res.SalesTax),\r\n CityTax: this.customCurrency.transform(res.CityTax),\r\n CurrentRentStartPeriod: this.datePipe.transform(el.RentalStartDate, 'MMMM yyyy'),\r\n CurrentRentEndPeriod: this.datePipe.transform(el.RentalEndDate, 'MMMM yyyy'),\r\n CurrentRent: this.customCurrency.transform(el.RentalCharge),\r\n CurrentSalesTax: this.customCurrency.transform(el.SalesTax),\r\n CurrentSecondTax: this.customCurrency.transform(el.SecLevelTax),\r\n Sunday: el.Sunday,\r\n Monday: el.Monday,\r\n Tuesday: el.Tuesday,\r\n Wednesday: el.Wednesday,\r\n Thursday: el.Thursday,\r\n Friday: el.Friday,\r\n Saturday: el.Saturday,\r\n Reservation: el.BoothReserved,\r\n Drop: el.DoNotRenew,\r\n January: this.customCurrency.transform(res.JanRent),\r\n February: this.customCurrency.transform(res.FebRent),\r\n March: this.customCurrency.transform(res.MarRent),\r\n April: this.customCurrency.transform(res.AprRent),\r\n May: this.customCurrency.transform(res.MayRent),\r\n June: this.customCurrency.transform(res.JunRent),\r\n July: this.customCurrency.transform(res.JulRent),\r\n August: this.customCurrency.transform(res.AugRent),\r\n September: this.customCurrency.transform(res.SepRent),\r\n October: this.customCurrency.transform(res.OctRent),\r\n November: this.customCurrency.transform(res.NovRent),\r\n December: this.customCurrency.transform(res.DecRent),\r\n JanuaryMonthPresent: res.JanuaryMonthPresent,\r\n FebruaryMonthPresent: res.FebruaryMonthPresent,\r\n MarchMonthPresent: res.MarchMonthPresent,\r\n AprilMonthPresent: res.AprilMonthPresent,\r\n MayMonthPresent: res.MayMonthPresent,\r\n JuneMonthPresent: res.JuneMonthPresent,\r\n JulyMonthPresent: res.JulyMonthPresent,\r\n AugustMonthPresent: res.AugustMonthPresent,\r\n SeptemberMonthPresent: res.SeptemberMonthPresent,\r\n OctoberMonthPresent: res.OctoberMonthPresent,\r\n NovemberMonthPresent: res.NovemberMonthPresent,\r\n DecemberMonthPresent: res.DecemberMonthPresent,\r\n DisableJanMonth: res.JanRent ? false : true,\r\n DisableFebMonth: res.FebRent ? false : true,\r\n DisableMarMonth: res.MarRent ? false : true,\r\n DisableAprMonth: res.AprRent ? false : true,\r\n DisableMayMonth: res.MayRent ? false : true,\r\n DisableJunMonth: res.JunRent ? false : true,\r\n DisableJulMonth: res.JulRent ? false : true,\r\n DisableAugMonth: res.AugRent ? false : true,\r\n DisableSepMonth: res.SepRent ? false : true,\r\n DisableOctMonth: res.OctRent ? false : true,\r\n DisableNovMonth: res.NovRent ? false : true,\r\n DisableDecMonth: res.DecRent ? false : true,\r\n DiasbleStartDate: false,\r\n Status: el.Status,\r\n NewBooth: false,\r\n ExtendRental: true,\r\n BookingCanExtend: true,\r\n AllRentalDates: StartDateList.map(el => new Date(el.startDate)),\r\n RenewalStartMonth: renewalStartMonth,\r\n MonthlyRenewalMonth: this.monthlyMarketDays[rentEndPeriodIndex].RentalMonths,\r\n RentEndPeriodIndex: rentEndPeriodIndex\r\n }\r\n if (this.allowMonthlyRentalRenewal) {\r\n this.totalRentalCharge += res.Rent.toString().includes('(') && res.Rent.toString().includes(')') ? -1 * parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n }\r\n this.selectedMonthlyBooths.push(ob);\r\n }\r\n }\r\n else {\r\n var rentalStartPeriod;\r\n if (this.MonthlyBookingEndDate && this.rentalType == 4) {\r\n let rentalStartDate = new Date(el.RentalStartDate);\r\n var startMonth = rentalStartDate.getMonth() + 1;\r\n var startYear = rentalStartDate.getFullYear();\r\n const startYearAndMonth = `${startYear}${startMonth < 10 ? '0' : ''}${startMonth}`;\r\n const rentalMonthEndDate = await this.getMonthEndingDateFromSetting(startYearAndMonth);\r\n\r\n if (new Date(el.RentalStartDate) > rentalMonthEndDate) {\r\n rentalStartDate = new Date(el.RentalStartDate);\r\n const dayOfMonth = rentalStartDate.getDate();\r\n rentalStartDate.setMonth(rentalStartDate.getMonth() + 1);\r\n\r\n if (rentalStartDate.getDate() < dayOfMonth) {\r\n rentalStartDate.setDate(0); // Set to the last day of the previous month\r\n }\r\n rentalStartPeriod = this.datePipe.transform(rentalStartDate, 'MMMM yyyy');\r\n }\r\n else {\r\n rentalStartPeriod = this.datePipe.transform(el.RentalStartDate, 'MMMM yyyy');\r\n }\r\n }\r\n else {\r\n rentalStartPeriod = this.datePipe.transform(el.RentalStartDate, 'MMMM yyyy');\r\n }\r\n\r\n const ob = {\r\n MonthlyRentalId: el.MonthlyRentalId,\r\n BoothNumber: el.BoothNumber,\r\n BoothType: el.BoothType,\r\n BoothTypeId: el.BoothTypeId,\r\n RentalStartDate: this.datePipe.transform(el.RentalStartDate, 'MMM d, y'),\r\n RentalEndDate: this.datePipe.transform(el.RentalEndDate, 'MMM d, y'),\r\n RentalSavedEndDate: this.datePipe.transform(el.RentalEndDate, 'MMM d, y'),\r\n RentStartPeriod: rentalStartPeriod,\r\n RentEndPeriod: this.datePipe.transform(el.RentalEndDate, 'MMMM yyyy'),\r\n Product: el.ProductId,\r\n ProductName: this.vendorProducts.filter(e => e.ProductId == el.ProductId)[0]?.ProductName,\r\n StartDateList: StartDateList,\r\n MktDays: marketDays,\r\n PerDiemRent: this.customCurrency.transform('0.00'),\r\n Rent: this.customCurrency.transform('0.00'),\r\n SalesTax: this.customCurrency.transform('0.00'),\r\n CityTax: this.customCurrency.transform('0.00'),\r\n CurrentRentStartPeriod: this.datePipe.transform(el.RentalStartDate, 'MMMM yyyy'),\r\n CurrentRentEndPeriod: this.datePipe.transform(el.RentalEndDate, 'MMMM yyyy'), \r\n CurrentRent: this.customCurrency.transform(el.RentalCharge),\r\n CurrentSalesTax: this.customCurrency.transform(el.SalesTax),\r\n CurrentSecondTax: this.customCurrency.transform(el.SecLevelTax),\r\n Sunday: el.Sunday,\r\n Monday: el.Monday,\r\n Tuesday: el.Tuesday,\r\n Wednesday: el.Wednesday,\r\n Thursday: el.Thursday,\r\n Friday: el.Friday,\r\n Saturday: el.Saturday,\r\n Reservation: el.BoothReserved,\r\n Drop: el.DoNotRenew,\r\n Status: el.Status,\r\n BookingCanExtend: true,\r\n January: this.customCurrency.transform('0.00'),\r\n February: this.customCurrency.transform('0.00'),\r\n March: this.customCurrency.transform('0.00'),\r\n April: this.customCurrency.transform('0.00'),\r\n May: this.customCurrency.transform('0.00'),\r\n June: this.customCurrency.transform('0.00'),\r\n July: this.customCurrency.transform('0.00'),\r\n August: this.customCurrency.transform('0.00'),\r\n September: this.customCurrency.transform('0.00'),\r\n October: this.customCurrency.transform('0.00'),\r\n November: this.customCurrency.transform('0.00'),\r\n December: this.customCurrency.transform('0.00'),\r\n JanuaryMonthPresent: el.JanuaryMonthPresent,\r\n FebruaryMonthPresent: el.FebruaryMonthPresent,\r\n MarchMonthPresent: el.MarchMonthPresent,\r\n AprilMonthPresent: el.AprilMonthPresent,\r\n MayMonthPresent: el.MayMonthPresent,\r\n JuneMonthPresent: el.JuneMonthPresent,\r\n JulyMonthPresent: el.JulyMonthPresent,\r\n AugustMonthPresent: el.AugustMonthPresent,\r\n SeptemberMonthPresent: el.SeptemberMonthPresent,\r\n OctoberMonthPresent: el.OctoberMonthPresent,\r\n NovemberMonthPresent: el.NovemberMonthPresent,\r\n DecemberMonthPresent: el.DecemberMonthPresent,\r\n DisableJanMonth: true,\r\n DisableFebMonth: true,\r\n DisableMarMonth: true,\r\n DisableAprMonth: true,\r\n DisableMayMonth: true,\r\n DisableJunMonth: true,\r\n DisableJulMonth: true,\r\n DisableAugMonth: true,\r\n DisableSepMonth: true,\r\n DisableOctMonth: true,\r\n DisableNovMonth: true,\r\n DisableDecMonth: true,\r\n DiasbleStartDate: true,\r\n NewBooth: false,\r\n AllRentalDates: StartDateList.map(el => new Date(el.startDate)),\r\n RenewalStartMonth: renewalStartMonth,\r\n MonthlyRenewalMonth: this.monthlyMarketDays[rentEndPeriodIndex + 1].RentalMonths,\r\n RentEndPeriodIndex:rentEndPeriodIndex\r\n }\r\n this.selectedMonthlyBooths.push(ob);\r\n }\r\n };\r\n\r\n await this.handleMonthlyEndDateChange();\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n\r\n getDaysDifference(date1: Date, date2: Date): number {\r\n // Normalize both dates to start of the day (midnight)\r\n const start = new Date(date1.getFullYear(), date1.getMonth(), date1.getDate());\r\n const end = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());\r\n // Calculate the difference in time (milliseconds)\r\n const timeDiff = Math.abs(end.getTime() - start.getTime());\r\n // Convert time difference from milliseconds to days\r\n const dayDiff = Math.ceil(timeDiff / (1000 * 3600 * 24));\r\n return dayDiff;\r\n }\r\n\r\n async handleMonthlyEndDateChange() {\r\n this.renewAllBoothsFromGrid = false;\r\n if (this.selectedMonthlyBooths.length === 0) {\r\n await this.renewAllBooths();\r\n return;\r\n }\r\n \r\n this.renewAllBoothsFromGrid = true;\r\n let rentalDates: any[] = [];\r\n let noResale = true;\r\n this.vendorRentalDays = [];\r\n this.marketDayCountForResale = 0;\r\n \r\n if ((this.ResaleNumberRequired && !this.exemptResale) || this.BusinessLicenseNumberRequired) {\r\n await this.processSelectedBooths(rentalDates);\r\n \r\n for (const item of this.selectedMonthlyBooths) {\r\n if (this.shouldProcessBooth(item)) {\r\n await this.processBoothRentalDates(item, rentalDates);\r\n }\r\n }\r\n \r\n this.updateVendorRentalDays(rentalDates);\r\n \r\n const vendorRentalDaysObj = { VendorID: this.vendorId, VendorRentalDate: new Date() };\r\n const vendorRentalDaysRes = await this.rentalService.getVendorRentalDays(vendorRentalDaysObj).toPromise();\r\n \r\n if (this.marketDayCountForResale <= this.DaysSellWithoutResaleNumber ||\r\n this.marketDayCountForResale <= this.DaysSellWithoutBusiLicNumber) {\r\n this.addVendorRentalDays(vendorRentalDaysRes);\r\n }\r\n \r\n await this.checkResaleOrBusinessLicense(noResale);\r\n } else {\r\n await this.renewAllBooths();\r\n }\r\n }\r\n\r\n updateMonthlytherItemRecord(record){\r\n if (record.Recurring) {\r\n const rentEndPeriodIndex = this.monthlyMarketDays.findIndex(e => e.RentalMonths == record.RentalMonth);\r\n const renewalStartMonth = this.monthlyMarketDays[rentEndPeriodIndex + 1].RentalMonths;\r\n record.BookingCanExtend = true;\r\n record.Quantity = 1;\r\n record.RenewalStartMonth = renewalStartMonth;\r\n record.MonthlyRenewalMonth = renewalStartMonth;\r\n record.RentEndPeriodIndex = rentEndPeriodIndex\r\n this.extendMonthlyOtherRental(record);\r\n }\r\n else { \r\n record.BookingCanExtend = false;\r\n record.RenewalStartWeek = \"This booking cannot be extended further!\";\r\n record.MonthlyRenewalMonth = record.RentalMonth;\r\n this.totalOtherRentalCharge -= record.OtherItemtotal.toString().includes('(') && record.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(record.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= record.SalesTax.toString().includes('(') && record.SalesTax.toString().includes(')') ? -1 * parseFloat(record.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= record.CityTax.toString().includes('(') && record.CityTax.toString().includes(')') ? -1 * parseFloat(record.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n otherCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n record.OtherItemtotal = this.customCurrency.transform(\"0\");\r\n record.Quantity = 0;\r\n record.OtherItemCharge = this.customCurrency.transform(\"0\");\r\n }\r\n }\r\n\r\n extendMonthlyOtherRental(item) {\r\n const endMonth = new Date(item.MonthlyRenewalMonth);\r\n const currentMonth = new Date(item.RentalMonth);\r\n if (currentMonth < new Date(item.MonthlyRenewalMonth) && item.Recurring && this.allowOtherItemRenewal) {\r\n var nextDate = currentMonth.setMonth(currentMonth.getMonth() + 1);\r\n var rentalMonthDate = this.monthlyMarketDays.filter(date => this.datePipe.transform(new Date(date.RentalMonths), 'MM/dd/yyyy') <= this.datePipe.transform(new Date(nextDate), 'MM/dd/yyyy')\r\n && this.datePipe.transform(new Date(date.RentalMonths), 'MM/dd/yyyy') >= this.datePipe.transform(new Date(nextDate), 'MM/dd/yyyy'))\r\n if (rentalMonthDate.length > 0)\r\n var rentalStartMonth = rentalMonthDate[0].RentalMonths;\r\n\r\n var recordExist = this.selectedOtherItems.findIndex(e => e.RentalMonth == rentalStartMonth && e.Id == item.Id && e.Reference == item.Reference && e.BoothNumber == item.BoothNo)\r\n var otherItemCharge = this.otherItemList.filter(e => e.Id == item.Id)[0].OtherItemCharge;\r\n if (!this.masterRentChargeforResOtherItems && this.allrentedOtherItems.length > 0) {\r\n otherItemCharge = this.customCurrency.transform(this.allrentedOtherItems.filter(e => e.OtherItemId == item.Id)[0].OtherCharge);\r\n }\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: item.Id,\r\n VendorId: this.vendorId,\r\n Quantity: item.Quantity,\r\n OtherItemCharge: otherItemCharge.includes('(') && otherItemCharge.includes(')') ? (-1) * parseFloat(otherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(otherItemCharge.replace(/[^0-9.-]/g, ''))\r\n }\r\n\r\n this.rentalService.getOtherItemsRentalCharges(obj).subscribe((res: any) => {\r\n const isNegative = otherItemCharge.includes('(') && otherItemCharge.includes(')');\r\n const totalValue = parseFloat(otherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n item.OtherItemtotal =this.customCurrency.transform((parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')) + (finalCharge * item.Quantity)).toString());\r\n item.Quantity += item.Quantity;\r\n item.MonthlyRentalIds += ',' + item.Id\r\n item.MonthlyRenewalMonth = rentalStartMonth;\r\n\r\n this.totalOtherRentalCharge += item.OtherItemtotal.toString().includes('(') && item.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(item.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n otherCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n });\r\n }\r\n else {\r\n item.BookingCanExtend = false;\r\n item.RenewalStartMonth = \"This booking cannot be extended further!\";\r\n item.MonthlyRenewalMonth = item.RentalMonth;\r\n }\r\n }\r\n\r\n getDateFromDateTime(date){\r\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\r\n }\r\n\r\n renewMonthlyOtherCharges() {\r\n if (this.selectedOtherItems.length > 0) {\r\n this.proceedRenewingOtherCharges();\r\n }\r\n }\r\n\r\n async proceedRenewingOtherCharges(){\r\n for(const item of this.selectedOtherItems){\r\n const endMonth = new Date(item.MonthlyRenewalMonth);\r\n const currentMonth = new Date(item.RentalMonth);\r\n if (this.getDateFromDateTime(currentMonth) <= this.getDateFromDateTime(new Date(item.MonthlyRenewalMonth)) && item.Recurring && this.allowOtherItemRenewal) {\r\n var nextDate = currentMonth.setMonth(currentMonth.getMonth() + 1);\r\n var rentalMonthDate = this.monthlyMarketDays.filter(date => this.datePipe.transform(new Date(date.RentalMonths), 'MM/dd/yyyy') <= this.datePipe.transform(new Date(nextDate), 'MM/dd/yyyy')\r\n && this.datePipe.transform(new Date(date.RentalMonths), 'MM/dd/yyyy') >= this.datePipe.transform(new Date(nextDate), 'MM/dd/yyyy'))\r\n if (rentalMonthDate.length > 0)\r\n var rentalEndMonth = rentalMonthDate[0].RentalMonths;\r\n \r\n var otherItemCharge = this.otherItemList.filter(e => e.Id == item.Id)[0].OtherItemCharge;\r\n if (!this.masterRentChargeforResOtherItems && this.allrentedOtherItems.length > 0) {\r\n otherItemCharge = this.customCurrency.transform(this.allrentedOtherItems.filter(e => e.OtherItemId == item.Id)[0].OtherCharge);\r\n }\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: item.Id,\r\n VendorId: this.vendorId,\r\n Quantity: item.Quantity,\r\n OtherItemCharge: otherItemCharge.includes('(') && otherItemCharge.includes(')') ? (-1) * parseFloat(otherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(otherItemCharge.replace(/[^0-9.-]/g, ''))\r\n }\r\n \r\n var res = await this.rentalService.getOtherItemsRentalCharges(obj).toPromise();\r\n const isNegative = otherItemCharge.includes('(') && otherItemCharge.includes(')');\r\n const totalValue = parseFloat(otherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n const OtherItemtotal = this.customCurrency.transform((finalCharge * item.Quantity).toString());\r\n item.Quantity = item.Quantity;\r\n item.MonthlyRentalIds += ',' + item.Id\r\n item.OtherItemtotal = OtherItemtotal;\r\n item.MonthlyRenewalMonth = rentalEndMonth;\r\n \r\n this.totalOtherRentalCharge += item.OtherItemtotal.toString().includes('(') && item.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(item.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n otherCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n \r\n }\r\n else{\r\n item.BookingCanExtend = false;\r\n item.RenewalStartMonth = \"This booking cannot be extended further!\";\r\n item.MonthlyRenewalMonth = item.RentalMonth;\r\n }\r\n }\r\n } \r\n // Helper functions\r\n \r\n // Process selected booths for rental dates\r\n async processSelectedBooths(rentalDates: any[]) {\r\n const selectedBoothRecord = this.selectedMonthlyBooths.filter(e => e.NewBooth || e.ExtendRental);\r\n for (const record of selectedBoothRecord) {\r\n for (const el of this.selectedMarketDays) {\r\n this.addRentalDates(record, rentalDates, el - 1);\r\n }\r\n }\r\n }\r\n \r\n // Check if the booth should be processed\r\n shouldProcessBooth(item: any): boolean {\r\n return new Date(item.RentEndPeriod.split('-')[0]) < new Date(item.MonthlyRenewalMonth) &&\r\n !item.Drop && item.Reservation;\r\n }\r\n \r\n // Process rental dates for a booth\r\n async processBoothRentalDates(item: any, rentalDates: any[]) {\r\n const recordExist = this.selectedMonthlyBooths.findIndex(e =>\r\n e.RentStartPeriod === item.RentStartPeriod && e.RentEndPeriod === item.RentEndPeriod &&\r\n e.BoothNumber === item.BoothNumber && (item.MonthlyRentalId === 0 || e.MonthlyRentalId === item.MonthlyRentalId)\r\n );\r\n \r\n if (recordExist !== -1) {\r\n const startDate = new Date(this.selectedMonthlyBooths[recordExist].RentalStartDate);\r\n let endDate = await this.calculateEndDate(item);\r\n \r\n // Loop through selected market days and add dates\r\n this.selectedMarketDays.forEach((el) => {\r\n this.addRentalDates({ RentalStartDate: startDate, RentalEndDate: endDate }, rentalDates, el - 1);\r\n });\r\n }\r\n }\r\n \r\n // Add rental dates based on the day of the week\r\n addRentalDates(record: any, rentalDates: any[], dayOfWeek: number) {\r\n let currentDay = new Date(record.RentalStartDate);\r\n const endDate = new Date(record.RentalEndDate);\r\n \r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === dayOfWeek) {\r\n rentalDates.push({ startDate: this.datePipe.transform(currentDay, 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n \r\n // Calculate end date based on MonthlyRenewalMonth\r\n async calculateEndDate(item: any): Promise {\r\n const [endMonthDate, endMonthYear] = item.MonthlyRenewalMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n let endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n \r\n if (this.MonthlyBookingEndDate) {\r\n const rentalEndDateYearMonth = `${endDate.getFullYear()}${(endDate.getMonth() + 1).toString().padStart(2, '0')}`;\r\n endDate = await this.getMonthEndingDateFromSetting(rentalEndDateYearMonth);\r\n }\r\n \r\n return endDate;\r\n }\r\n \r\n // Update vendor rental days by comparing with existing rental dates\r\n updateVendorRentalDays(rentalDates: any[]) {\r\n rentalDates.forEach(date => {\r\n const targetDateString = this.datePipe.transform(date.startDate, \"MM/dd/yyyy\");\r\n const dateExist = this.vendorRentalDays.some(el => {\r\n const rentalDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n \r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(date.startDate, \"MM/dd/yyyy\");\r\n this.vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n }\r\n });\r\n }\r\n\r\n getActualAmountFromInp(value) {\r\n var amount = value.toString().includes('(') && value.toString().includes(')') ? -1 * parseFloat(value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(value.toString().replace(/[^0-9.-]/g, ''));\r\n return amount;\r\n }\r\n\r\n disableSavePayment() {\r\n var proceedPayment = false;\r\n this.paymentAdjustedWithPriorBal = false;\r\n const rentalCharge = this.getActualAmountFromInp(this.bookingDetailsForm.get('rentalCharge').value)\r\n const otherCharge = this.getActualAmountFromInp(this.bookingDetailsForm.get('otherCharge').value)\r\n const salesTax = this.getActualAmountFromInp(this.bookingDetailsForm.get('totalSalesTax').value)\r\n const secondTax = this.getActualAmountFromInp(this.bookingDetailsForm.get('totalSecondLeveltax').value)\r\n const additionalCharge = this.getActualAmountFromInp(this.bookingDetailsForm.get('additionalCharge').value)\r\n const priorBalance = this.getActualAmountFromInp(this.bookingDetailsForm.get('priorBalance').value)\r\n var totalCharges = rentalCharge + otherCharge + salesTax + secondTax + additionalCharge;\r\n if(totalCharges + priorBalance == 0){\r\n proceedPayment = true;\r\n this.paymentAdjustedWithPriorBal = true;\r\n }\r\n const paymentAmount = this.bookingDetailsForm.get('totalPayment').value.toString().includes('(') && this.bookingDetailsForm.get('totalPayment').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('totalPayment').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('totalPayment').value.toString().replace(/[^0-9.-]/g, ''));\r\n if (paymentAmount > 0 || proceedPayment) {\r\n return false\r\n }\r\n else\r\n return true\r\n }\r\n \r\n // Add vendor rental days from API response\r\n addVendorRentalDays(res: any[]) {\r\n res.forEach(el => {\r\n const targetDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n const dateExist = this.vendorRentalDays.some(data => {\r\n const rentalDateString = this.datePipe.transform(data.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n \r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n this.vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n this.marketDayCountForResale += 1;\r\n }\r\n });\r\n }\r\n \r\n // Check conditions for resale or business license\r\n async checkResaleOrBusinessLicense(noResale: boolean) {\r\n if (this.ResaleNumberRequired && !this.exemptResale && !this.resaleNo && \r\n this.marketDayCountForResale > this.DaysSellWithoutResaleNumber && !this.resaleOptionSelected) {\r\n const modal = this.modalResaleNo.nativeElement;\r\n modal.classList.add('show');\r\n modal.style.display = 'block';\r\n noResale = false;\r\n } else if (this.BusinessLicenseNumberRequired && \r\n this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n await this.handleBusinessLicenseNumber();\r\n } else {\r\n await this.renewAllBooths();\r\n }\r\n }\r\n \r\n // Handle business license number validation\r\n async handleBusinessLicenseNumber() {\r\n if (!this.businessLicenseNumber) {\r\n const result = await Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Business License Number is required! Do you want to continue without Business License Number?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n });\r\n \r\n if (result.value) {\r\n await this.renewAllBooths();\r\n }\r\n } else {\r\n await this.checkBusinessLicenseExpiry();\r\n }\r\n }\r\n \r\n // Check business license expiry date\r\n async checkBusinessLicenseExpiry() {\r\n if (!this.businessLicenseExpiryDate) {\r\n const result = await Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Business License expiry date is not provided! Do you want to continue without that?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n });\r\n \r\n if (result.value) {\r\n await this.renewAllBooths();\r\n }\r\n } else if (new Date(this.businessLicenseExpiryDate) < new Date()) {\r\n const result = await Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Business License is expired! Do you want to continue?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n });\r\n \r\n if (result.value) {\r\n await this.renewAllBooths();\r\n }\r\n } else {\r\n await this.renewAllBooths();\r\n }\r\n }\r\n \r\n\r\n async getMonthEndingDateFromSetting(rentalYearMonth: string): Promise {\r\n if (this.monthEndDateCache.has(rentalYearMonth)) {\r\n return this.monthEndDateCache.get(rentalYearMonth);\r\n }\r\n const response = await this.rentalService.GetSelectedMonthEndDate(rentalYearMonth,this.marketId).toPromise();\r\n if (response) {\r\n const monthEndDate = new Date(response.MonthEndDateSelected);\r\n this.monthEndDateCache.set(rentalYearMonth, monthEndDate);\r\n return monthEndDate;\r\n }\r\n else {\r\n return null\r\n }\r\n }\r\n\r\n async renewAllBooths() {\r\n const nonAvailableBooths = [];\r\n\r\n for (const item of this.selectedMonthlyBooths) {\r\n if (item.Status != \"R\") {\r\n const { RentEndPeriod, MonthlyRenewalMonth, Drop, Reservation, MonthlyRentalId, BoothNumber, RentStartPeriod } = item;\r\n const rentEndDate = new Date(RentEndPeriod.split('-')[0]);\r\n const renewalMonth = new Date(MonthlyRenewalMonth);\r\n\r\n if (rentEndDate < renewalMonth && !Drop && Reservation && this.allowMonthlyRentalRenewal) {\r\n const recordExist = this.selectedMonthlyBooths.findIndex(e =>\r\n e.RentStartPeriod === RentStartPeriod &&\r\n e.RentEndPeriod === RentEndPeriod &&\r\n e.BoothNumber === BoothNumber &&\r\n e.MonthlyRentalId === MonthlyRentalId &&\r\n e.Reservation && !e.Drop\r\n );\r\n\r\n if (recordExist != -1) {\r\n const rentalDates = [];\r\n var currentMonthRentalDates = [];\r\n var rentalstartDate = \"\";\r\n var marketDays = 0;\r\n this.selectedMarketDays = [];\r\n this.selectedMonthlyBooths[recordExist].Sunday == true ? this.selectedMarketDays.push(1) : 0;\r\n this.selectedMonthlyBooths[recordExist].Monday ? this.selectedMarketDays.push(2) : 0;\r\n this.selectedMonthlyBooths[recordExist].Tuesday == true ? this.selectedMarketDays.push(3) : 0;\r\n this.selectedMonthlyBooths[recordExist].Wednesday == true ? this.selectedMarketDays.push(4) : 0;\r\n this.selectedMonthlyBooths[recordExist].Thursday == true ? this.selectedMarketDays.push(5) : 0;\r\n this.selectedMonthlyBooths[recordExist].Friday == true ? this.selectedMarketDays.push(6) : 0;\r\n this.selectedMonthlyBooths[recordExist].Saturday == true ? this.selectedMarketDays.push(7) : 0;\r\n for (const el of this.selectedMarketDays) {\r\n const currentDate = new Date();\r\n const currentYear = currentDate.getFullYear();\r\n const currentMonth = currentDate.getMonth();\r\n var endDateYearMonth;\r\n const currentYearMonth = `${currentYear}${(currentMonth + 1) < 10 ? '0' : ''}${(currentMonth + 1)}`;\r\n var startDate = new Date(this.selectedMonthlyBooths[recordExist].RentalStartDate);\r\n const endMonth = item.MonthlyRenewalMonth;\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n var endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n var previousRentalYearMonth;\r\n if (this.MonthlyBookingEndDate) {\r\n const rentalEndDateYear = endDate.getFullYear();\r\n const rentalEndDateMonth = endDate.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n endDate = await this.getMonthEndingDateFromSetting(rentalEndDateYearMonth);\r\n endDateYearMonth = rentalEndDateYearMonth;\r\n\r\n const rentalStartDate = new Date(startDate);\r\n var previousMonth = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() - 1)).getMonth() + 1;\r\n var PreviousMonthYear = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() - 1)).getFullYear();\r\n const PreviousMonthYearAndMonth = `${PreviousMonthYear}${previousMonth < 10 ? '0' : ''}${previousMonth}`;\r\n // if (PreviousMonthYearAndMonth >= currentYearMonth) {\r\n const monthEndDate = await this.getMonthEndingDateFromSetting(PreviousMonthYearAndMonth);\r\n const dateDiff = this.getDaysDifference(monthEndDate, new Date(startDate)); //calculates the diff between current month start date and previous monthend date \r\n if (dateDiff <= 7 && new Date(monthEndDate) < startDate) {\r\n if (new Date() > new Date(monthEndDate)) {\r\n startDate = new Date();\r\n }\r\n else {\r\n startDate = new Date(monthEndDate.setDate(monthEndDate.getDate() + 1));\r\n }\r\n }\r\n // }\r\n }\r\n var previousRentalYearMonth;\r\n var currentMonthEnd = new Date(startDate.getFullYear(), startDate.getMonth() + 1, 0);\r\n if (this.MonthlyBookingEndDate) {\r\n const currentStartMonth = this.selectedMonthlyBooths[recordExist].RentStartPeriod;\r\n const [startMonthDate, startMonthYear] = currentStartMonth.split(' ');\r\n const startMonthIndex = this.getMonthIndex(startMonthDate);\r\n var currentMonthEnd = new Date(startMonthYear, startMonthIndex + 1, 0);\r\n const rentalEndDateYear = currentMonthEnd.getFullYear();\r\n const rentalEndDateMonth = currentMonthEnd.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n previousRentalYearMonth = rentalEndDateYearMonth;\r\n if (endDateYearMonth == rentalEndDateYearMonth)\r\n currentMonthEnd = await this.getMonthEndingDateFromSetting(rentalEndDateYearMonth);\r\n }\r\n const selectedDayOfWeek = el - 1\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n\r\n if (this.MonthlyBookingEndDate) {\r\n currentDay = new Date(startDate);\r\n while (currentDay <= currentMonthEnd) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n currentMonthRentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n };\r\n\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates);\r\n\r\n if (this.MonthlyBookingEndDate) {\r\n const compareCurrentMonthDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const currentMonthSortedDates = currentMonthRentalDates.sort(compareCurrentMonthDates);\r\n }\r\n else {\r\n currentMonthRentalDates = rentalDates;\r\n }\r\n\r\n var allRentalDates = rentalDates.map(el => new Date(el.startDate));\r\n var currentRentedEndDate = new Date(this.selectedMonthlyBooths[recordExist].RentalEndDate);\r\n const filteredRentalDates = allRentalDates.filter(rentalDate => rentalDate > currentRentedEndDate);\r\n var obj1 = {\r\n RentalDates: filteredRentalDates,\r\n BoothNumber: this.selectedMonthlyBooths[recordExist].BoothNumber\r\n }\r\n\r\n const rentalExist = await this.rentalService.checkRentalExits(this.marketId, obj1).toPromise();\r\n if (!rentalExist.Success) {\r\n await this.updateBoothRentDetails(recordExist, rentalDates, marketDays);\r\n } else {\r\n nonAvailableBooths.push(BoothNumber);\r\n }\r\n }\r\n }\r\n else {\r\n item.MonthlyRenewalMonth = item.RentEndPeriod;\r\n item.RenewalStartMonth = \"This booking cannot be extended further!\"\r\n item.BookingCanExtend = false;\r\n nonAvailableBooths.push(item.BoothNumber);\r\n }\r\n }\r\n }\r\n }\r\n \r\n private async getEndDate(MonthlyRenewalMonth, startDate: Date) {\r\n const [endMonthDate, endMonthYear] = MonthlyRenewalMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n return new Date(endMonthYear, endMonthIndex + 1, 0);\r\n }\r\n \r\n private async getPreviousMonthEndDate(startDate: Date) {\r\n const rentalStartDate = new Date(startDate);\r\n rentalStartDate.setMonth(rentalStartDate.getMonth() - 1);\r\n const previousMonth = rentalStartDate.getMonth() + 1;\r\n const previousYear = rentalStartDate.getFullYear();\r\n return await this.getMonthEndingDateFromSetting(`${previousYear}${previousMonth.toString().padStart(2, '0')}`);\r\n }\r\n \r\n private filterCurrentMonthDates(startDate: Date, selectedDayOfWeek: number, currentMonthRentalDates: any[]) {\r\n let currentDay = new Date(startDate);\r\n const currentMonthEnd = new Date(startDate.getFullYear(), startDate.getMonth() + 1, 0);\r\n while (currentDay <= currentMonthEnd) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n currentMonthRentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n return currentMonthRentalDates;\r\n }\r\n \r\n private sortDates(dates: any[]): any[] {\r\n return dates.sort((a, b) => new Date(a.startDate).getTime() - new Date(b.startDate).getTime());\r\n }\r\n \r\n private filterDatesAfterEndDate(allRentalDates: Date[], currentRentedEndDate: string): Date[] {\r\n const currentEndDate = new Date(currentRentedEndDate);\r\n return allRentalDates.filter(date => date > currentEndDate);\r\n }\r\n \r\n private async updateBoothRentDetails(recordExist: number, rentalDates: any[], marketDays: number) {\r\n const { BoothTypeId, RenewalStartMonth, Status, PerDiem, Rent, SalesTax, CityTax } = this.selectedMonthlyBooths[recordExist];\r\n var marketDay;\r\n if (this.selectedMonthlyBooths[recordExist].Sunday == true) {\r\n marketDay = 'Sun'\r\n }\r\n else if (this.selectedMonthlyBooths[recordExist].Monday == true) {\r\n marketDay = 'Mon'\r\n }\r\n else if (this.selectedMonthlyBooths[recordExist].Tuesday == true) {\r\n marketDay = 'Tue'\r\n }\r\n else if (this.selectedMonthlyBooths[recordExist].Wednesday == true) {\r\n marketDay = 'Wed'\r\n }\r\n else if (this.selectedMonthlyBooths[recordExist].Thursday == true) {\r\n marketDay = 'Thu'\r\n }\r\n else if (this.selectedMonthlyBooths[recordExist].Friday == true) {\r\n marketDay = 'Fri'\r\n }\r\n else if (this.selectedMonthlyBooths[recordExist].Saturday == true) {\r\n marketDay = 'Sat'\r\n }\r\n\r\n const res = await this.rentalService.getBoothRentalMontlyCharges(this.marketId, {\r\n BoothTypeId,\r\n VendorId: this.vendorId,\r\n RentalStartPeriod: new Date(RenewalStartMonth),\r\n RentalEndPeriod: new Date(rentalDates[rentalDates.length - 1].startDate),\r\n PerDiemApplicable: PerDiem,\r\n RentalMarketDay: marketDay,\r\n Rent: this.parseCurrency(Rent),\r\n SalesTax: this.parseCurrency(SalesTax),\r\n CityTax: this.parseCurrency(CityTax)\r\n }).toPromise();\r\n \r\n if (res) {\r\n RentalEndDate: this.datePipe.transform(new Date(rentalDates[rentalDates.length - 1].startDate), 'MMM d, y'),\r\n this.selectedMonthlyBooths[recordExist].RentalEndDate = this.datePipe.transform(new Date(rentalDates[rentalDates.length - 1].startDate), 'MMM d, y');\r\n this.selectedMonthlyBooths[recordExist].MktDays = marketDays;\r\n this.selectedMonthlyBooths[recordExist].Rent = this.customCurrency.transform(res.Rent);\r\n this.selectedMonthlyBooths[recordExist].SalesTax = this.customCurrency.transform(res.SalesTax);\r\n this.selectedMonthlyBooths[recordExist].CityTax = this.customCurrency.transform(res.CityTax);\r\n this.selectedMonthlyBooths[recordExist].January = this.customCurrency.transform(res.JanRent);\r\n this.selectedMonthlyBooths[recordExist].February = this.customCurrency.transform(res.FebRent);\r\n this.selectedMonthlyBooths[recordExist].March = this.customCurrency.transform(res.MarRent);\r\n this.selectedMonthlyBooths[recordExist].April = this.customCurrency.transform(res.AprRent);\r\n this.selectedMonthlyBooths[recordExist].May = this.customCurrency.transform(res.MayRent);\r\n this.selectedMonthlyBooths[recordExist].June = this.customCurrency.transform(res.JunRent);\r\n this.selectedMonthlyBooths[recordExist].July = this.customCurrency.transform(res.JulRent);\r\n this.selectedMonthlyBooths[recordExist].August = this.customCurrency.transform(res.AugRent);\r\n this.selectedMonthlyBooths[recordExist].September = this.customCurrency.transform(res.SepRent);\r\n this.selectedMonthlyBooths[recordExist].October = this.customCurrency.transform(res.OctRent);\r\n this.selectedMonthlyBooths[recordExist].November = this.customCurrency.transform(res.NovRent);\r\n this.selectedMonthlyBooths[recordExist].December = this.customCurrency.transform(res.DecRent);\r\n this.selectedMonthlyBooths[recordExist].JanuaryMonthPresent = res.JanuaryMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].FebruaryMonthPresent = res.FebruaryMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].MarchMonthPresent = res.MarchMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].AprilMonthPresent = res.AprilMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].MayMonthPresent = res.MayMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].JuneMonthPresent = res.JuneMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].JulyMonthPresent = res.JulyMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].AugustMonthPresent = res.AugustMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].SeptemberMonthPresent = res.SeptemberMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].OctoberMonthPresent = res.OctoberMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].NovemberMonthPresent = res.NovemberMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].DecemberMonthPresent = res.DecemberMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].DisableJanMonth = res.JanRent || res.JanRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableFebMonth = res.FebRent || res.FebRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableMarMonth = res.MarRent || res.MarRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableAprMonth = res.AprRent || res.AprRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableMayMonth = res.MayRent || res.MayRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableJunMonth = res.JunRent || res.JunRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableJulMonth = res.JulRent || res.JulRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableAugMonth = res.AugRent || res.AugRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableSepMonth = res.SepRent || res.SepRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableOctMonth = res.OctRent || res.OctRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableNovMonth = res.NovRent || res.NovRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableDecMonth = res.DecRent || res.DecRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].ExtendRental = true;\r\n this.selectedMonthlyBooths[recordExist].AllRentalDates = rentalDates.map(el => new Date(el.startDate)); \r\n this.updateTotalCharges(res.Rent, res.SalesTax, res.CityTax);\r\n }\r\n }\r\n \r\n private parseCurrency(value: string) {\r\n return value.includes('(') && value.includes(')') ? -parseFloat(value.replace(/[^0-9.-]/g, '')) : parseFloat(value.replace(/[^0-9.-]/g, ''));\r\n }\r\n \r\n private updateTotalCharges(Rent, SalesTax, CityTax) {\r\n this.totalRentalCharge += Rent;\r\n this.totalSalesTax += SalesTax;\r\n this.totalSecondLeveltax += CityTax;\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString()) \r\n });\r\n }\r\n \r\n getMonthlyOtherRentals() {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedOtherItems = [];\r\n const currentYear = new Date().getFullYear();\r\n const currentMonth = new Date().getMonth() + 1;\r\n const currentYearMonth = `${currentYear}${currentMonth < 10 ? '0' : ''}${currentMonth}`;\r\n const sub = this.rentalService.getMonthlyOtherRentals(this.marketId, this.vendorId).subscribe(async (res: any[]) => {\r\n if (res) {\r\n this.allrentedOtherItems = res;\r\n for(const el of res){\r\n if (el.YearMonth >= currentYearMonth) { \r\n const year = parseInt(el.YearMonth.substring(0, 4));\r\n const month = parseInt(el.YearMonth.substring(4, 6));\r\n const date = new Date(year, month - 1, 1);\r\n const formattedDate = this.datePipe.transform(date, 'MMMM yyyy');\r\n const rentEndPeriodIndex = this.monthlyMarketDays.findIndex(e => e.RentalMonths ==formattedDate);\r\n const renewalStartMonth = this.monthlyMarketDays.length > 1 ? this.monthlyMarketDays[rentEndPeriodIndex +1].RentalMonths : \"\";\r\n \r\n const index = this.selectedOtherItems.findIndex(item => item.Id === el.OtherItemId && item.RentalMonth == formattedDate && item.Reference == el.Reference && item.BoothNo == el.BoothNumber && item.Recurring == el.Recurring);\r\n if (index !== -1) {\r\n this.selectedOtherItems[index].Quantity += el.Quantity;\r\n this.selectedOtherItems[index].MonthlyRentalIds += ',' + el.OtherRentalId\r\n var otherItemTotal = (el.OtherCharge * this.selectedOtherItems[index].Quantity).toString(); \r\n this.selectedOtherItems[index].OtherItemtotal = otherItemTotal;\r\n }\r\n else { \r\n var otherItemTotal = (el.OtherCharge * el.Quantity).toString(); \r\n const ob = {\r\n Id: el.OtherItemId,\r\n MonthOtherRentalId: el.OtherRentalId,\r\n OtherItem: el.OtherItemName,\r\n OtherItemCharge: this.customCurrency.transform(\"0\"),\r\n Quantity: el.Quantity,\r\n OtherItemtotal: this.customCurrency.transform(\"0\"),\r\n RentalMonth: formattedDate,\r\n SalesTax: this.customCurrency.transform('0'),\r\n CityTax: this.customCurrency.transform('0'),\r\n CurrentRentalMonth: formattedDate,\r\n CurrentOtherItemtotal: this.customCurrency.transform(el.OtherCharge.toString()),\r\n CurrentSalesTax: this.customCurrency.transform(el.SalesTax.toString()),\r\n CurrentSecLevelTax: this.customCurrency.transform(el.SecLevelTax.toString()),\r\n BoothNo: el.BoothNumber ? el.BoothNumber : \"none\",\r\n Recurring: el.Recurring,\r\n Reference: el.Reference,\r\n NewItem: false,\r\n MonthlyRentalIds: el.OtherRentalId.toString(),\r\n RenewalStartMonth: renewalStartMonth,\r\n MonthlyRenewalMonth:renewalStartMonth,\r\n BookingCanExtend: true,\r\n RentEndPeriodIndex:rentEndPeriodIndex\r\n }\r\n this.selectedOtherItems.push(ob);\r\n }\r\n }\r\n else {\r\n const rentEndPeriodIndex = this.monthlyMarketDays.findIndex(e => e.RentalMonths ==formattedDate);\r\n const renewalStartMonth = this.monthlyMarketDays.length > 1 ? this.monthlyMarketDays[rentEndPeriodIndex +1].RentalMonths : \"\";\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: el.OtherItemId,\r\n VendorId: this.vendorId,\r\n Quantity: el.Quantity,\r\n OtherItemCharge: el.OtherCharge\r\n }\r\n const date = new Date(currentYear, currentMonth - 1, 1);\r\n const formattedDate = this.datePipe.transform(date, 'MMMM yyyy');\r\n const res = await this.rentalService.getOtherItemsRentalCharges(obj).toPromise();\r\n if(res)\r\n {\r\n const ob = {\r\n Id: el.OtherItemId,\r\n MonthOtherRentalId: el.OtherRentalId,\r\n OtherItem: el.OtherItemName,\r\n OtherItemCharge: this.customCurrency.transform(el.OtherCharge),\r\n Quantity: el.Quantity,\r\n OtherItemtotal: this.customCurrency.transform((el.OtherCharge * el.Quantity).toString()),\r\n RentalMonth: formattedDate,\r\n SalesTax: this.customCurrency.transform(res.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(res.CityTax.toString()),\r\n BoothNo: el.BoothNumber ? el.BoothNumber : \"none\",\r\n Recurring: el.Recurring,\r\n Reference: el.Reference,\r\n NewItem: false,\r\n MonthlyRentalIds: '',\r\n Status: \"R\",\r\n RentEndPeriodIndex:rentEndPeriodIndex,\r\n BookingCanExtend: true,\r\n RenewalStartMonth: formattedDate,\r\n MonthlyRenewalMonth:formattedDate,\r\n }\r\n this.selectedOtherItems.push(ob);\r\n const OtherItemtotal = el.OtherCharge * el.Quantity;\r\n if (this.allowOtherItemRenewal) {\r\n this.totalOtherRentalCharge = OtherItemtotal;\r\n this.totalSalesTax = res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax = res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n otherCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n }\r\n }\r\n }\r\n }\r\n this.renewMonthlyOtherCharges();\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n saveRentalWithPayment() { \r\n this.savePayment = false; \r\n var creditCardAmount = this.bookingDetailsForm.get('paymentAmount').value.toString().includes('(') && this.bookingDetailsForm.get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, ''));\r\n var convenienceFee = this.bookingDetailsForm.get('convenienceFee').value.toString().includes('(') && this.bookingDetailsForm.get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, ''));\r\n const totalAmountPaid = creditCardAmount + convenienceFee;\r\n if (totalAmountPaid != 0 || (totalAmountPaid == 0 && this.paymentAdjustedWithPriorBal)) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to proceed with the payment?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n if (this.paymentAdjustedWithPriorBal) {\r\n var obj = {\r\n PaymentSuccess: true,\r\n OrderId: \"\",\r\n VerifoneId: 0\r\n }\r\n this.savePayment = true;\r\n this.PaymentResponse(obj)\r\n } else {\r\n if (this.paymentGatewayCredentials && this.processCreditCardOnline)\r\n this.processPayment = true;\r\n else {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Credit card cannot be processed.`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n }\r\n }\r\n });\r\n }\r\n else {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Please enter the payment amount!`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n }\r\n\r\n PaymentResponse(response) {\r\n this.loaderIcon = Promise.resolve(true);\r\n if (response.PaymentSuccess) {\r\n this.verifoneId = response.VerifoneId;\r\n switch (this.rentalType) {\r\n case 2:\r\n var convenienceFee = this.bookingDetailsForm.get('convenienceFee').value.toString().includes('(') && this.bookingDetailsForm.get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, ''));\r\n if (convenienceFee > 0 && this.paymentOnly) {\r\n this.paymentOnly = false;\r\n }\r\n var objM = {\r\n VendorId: this.vendorId,\r\n PaymentOrderId: response.OrderId,\r\n RentalCharge: this.bookingDetailsForm.get('rentalCharge').value.toString().includes('(') && this.bookingDetailsForm.get('rentalCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, '')),\r\n SalesTax: 0,\r\n SecLevelTax: 0,\r\n OtherCharge: this.bookingDetailsForm.get('otherCharge').value.toString().includes('(') && this.bookingDetailsForm.get('otherCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, '')),\r\n PriorBalance: this.bookingDetailsForm.get('priorBalance').value.toString().includes('(') && this.bookingDetailsForm.get('priorBalance').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('priorBalance').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('priorBalance').value.toString().replace(/[^0-9.-]/g, '')),\r\n TotalBalanceDue: this.bookingDetailsForm.get('balanceDue').value.toString().includes('(') && this.bookingDetailsForm.get('balanceDue').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')),\r\n RentalNotes: \"\",\r\n CashAmount: 0,\r\n CheckAmount: 0,\r\n CheckNo: \"\",\r\n ChangeAmount: 0,\r\n CardAmount: this.bookingDetailsForm.get('paymentAmount').value.toString().includes('(') && this.bookingDetailsForm.get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')),\r\n DirectDebitAmount: 0,\r\n CardType: \"\",\r\n PaymentDone: true,\r\n WebRentalRequest: true,\r\n PaymentDueDate: null,\r\n VerifoneId: response.VerifoneId,\r\n DiscountAmount: this.bookingDetailsForm.get('discount').value.toString().includes('(') && this.bookingDetailsForm.get('discount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('discount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('discount').value.toString().replace(/[^0-9.-]/g, '')),\r\n ConvenienceFee: this.bookingDetailsForm.get('convenienceFee').value.toString().includes('(') && this.bookingDetailsForm.get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')),\r\n BookingFee: this.bookingDetailsForm.get('additionalCharge').value.toString().includes('(') && this.bookingDetailsForm.get('additionalCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('additionalCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('additionalCharge').value.toString().replace(/[^0-9.-]/g, '')),\r\n MonthlyRentalBooth: [],\r\n MonthlyOtherRentalCharges: [],\r\n AppliedDiscountModel: []\r\n }\r\n\r\n var objSelectedBooth = [];\r\n var objReturnData = [];\r\n if (this.selectedMonthlyBooths.length > 0) {\r\n this.selectedMonthlyBooths.forEach((item, i) => {\r\n const rentalStartDateYear = new Date(item.RentalEndDate).getFullYear();\r\n const rentalStartDateMonth = new Date(item.RentalEndDate).getMonth() + 1;\r\n const rentalStartDateYearMonth = `${rentalStartDateYear}${rentalStartDateMonth < 10 ? '0' : ''}${rentalStartDateMonth}`;\r\n if (item.Reservation) {\r\n objSelectedBooth.push({\r\n MonthlyRentalId: item.MonthlyRentalId,\r\n BoothNumber: item.BoothNumber,\r\n BoothTypeId: item.BoothTypeId,\r\n ProductId: item.Product,\r\n BoothType: item.BoothType,\r\n RentalStartDate: new Date(item.RentalStartDate),\r\n RentalEndDate: new Date(item.RentalEndDate),\r\n RentalYearMonth: rentalStartDateYearMonth,\r\n BoothReserved: item.Reservation,\r\n DoNotRenew: item.Drop,\r\n PerDiem: item.PerDiem,\r\n PerdiemRent: item.PerDiemRent.includes('(') && item.PerDiemRent.includes(')') ? -1 * parseFloat(item.PerDiemRent.replace(/[^0-9.-]/g, '')) : parseFloat(item.PerDiemRent.replace(/[^0-9.-]/g, '')),\r\n Monday: item.Monday,\r\n Tuesday: item.Tuesday,\r\n Wednesday: item.Wednesday,\r\n Thursday: item.Thursday,\r\n Friday: item.Friday,\r\n Saturday: item.Saturday,\r\n Sunday: item.Sunday,\r\n RentalCharge: item.Rent.includes('(') && item.Rent.includes(')') ? -1 * parseFloat(item.Rent.replace(/[^0-9.-]/g, '')) : parseFloat(item.Rent.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n JanRent: item.January ? (item.January.includes('(') && item.January.includes(')') ? -1 * parseFloat(item.January.replace(/[^0-9.-]/g, '')) : parseFloat(item.January.replace(/[^0-9.-]/g, ''))) : 0,\r\n FebRent: item.February ? (item.February.includes('(') && item.February.includes(')') ? -1 * parseFloat(item.February.replace(/[^0-9.-]/g, '')) : parseFloat(item.February.replace(/[^0-9.-]/g, ''))) : 0,\r\n MarRent: item.March ? (item.March.includes('(') && item.March.includes(')') ? -1 * parseFloat(item.March.replace(/[^0-9.-]/g, '')) : parseFloat(item.March.replace(/[^0-9.-]/g, ''))) : 0,\r\n AprRent: item.April ? (item.April.includes('(') && item.April.includes(')') ? -1 * parseFloat(item.April.replace(/[^0-9.-]/g, '')) : parseFloat(item.April.replace(/[^0-9.-]/g, ''))) : 0,\r\n MayRent: item.May ? (item.May.includes('(') && item.May.includes(')') ? -1 * parseFloat(item.May.replace(/[^0-9.-]/g, '')) : parseFloat(item.May.replace(/[^0-9.-]/g, ''))) : 0,\r\n JunRent: item.June ? (item.June.includes('(') && item.June.includes(')') ? -1 * parseFloat(item.June.replace(/[^0-9.-]/g, '')) : parseFloat(item.June.replace(/[^0-9.-]/g, ''))) : 0,\r\n JulRent: item.July ? (item.July.includes('(') && item.July.includes(')') ? -1 * parseFloat(item.July.replace(/[^0-9.-]/g, '')) : parseFloat(item.July.replace(/[^0-9.-]/g, ''))) : 0,\r\n AugRent: item.August ? (item.August.includes('(') && item.August.includes(')') ? -1 * parseFloat(item.August.replace(/[^0-9.-]/g, '')) : parseFloat(item.August.replace(/[^0-9.-]/g, ''))) : 0,\r\n SepRent: item.September ? (item.September.includes('(') && item.September.includes(')') ? -1 * parseFloat(item.September.replace(/[^0-9.-]/g, '')) : parseFloat(item.September.replace(/[^0-9.-]/g, ''))) : 0,\r\n OctRent: item.October ? (item.October.includes('(') && item.October.includes(')') ? -1 * parseFloat(item.October.replace(/[^0-9.-]/g, '')) : parseFloat(item.October.replace(/[^0-9.-]/g, ''))) : 0,\r\n NovRent: item.November ? (item.November.includes('(') && item.November.includes(')') ? -1 * parseFloat(item.November.replace(/[^0-9.-]/g, '')) : parseFloat(item.November.replace(/[^0-9.-]/g, ''))) : 0,\r\n DecRent: item.December ? (item.December.includes('(') && item.December.includes(')') ? -1 * parseFloat(item.December.replace(/[^0-9.-]/g, '')) : parseFloat(item.December.replace(/[^0-9.-]/g, ''))) : 0,\r\n BookingLog: i + 1,\r\n AllRentalDates: item.AllRentalDates\r\n });\r\n }\r\n\r\n if (item.NewBooth) {\r\n objReturnData.push({\r\n MonthlyRentalId: item.MonthlyRentalId,\r\n BoothNumber: item.BoothNumber,\r\n BoothType: item.BoothType,\r\n BoothTypeId: item.BoothTypeId,\r\n Product: item.Product,\r\n RentStartPeriod: item.RentStartPeriod,\r\n RentEndPeriod: item.RentEndPeriod,\r\n RentalSavedEndDate: item.RentalEndDate,\r\n RentalStartDate: item.RentalStartDate,\r\n RentalEndDate: item.RentalEndDate,\r\n MktDays: item.MktDays,\r\n Rent: item.Rent,\r\n SalesTax: item.SalesTax,\r\n CityTax: item.CityTax,\r\n PerDiem: item.PerDiem,\r\n PerdiemRent: item.PerDiemRent,\r\n Sunday: item.Sunday,\r\n Monday: item.Monday,\r\n Tuesday: item.Tuesday,\r\n Wednesday: item.Wednesday,\r\n Thursday: item.Thursday,\r\n Friday: item.Friday,\r\n Saturday: item.Saturday,\r\n Reservation: item.Reservation,\r\n Drop: item.Drop,\r\n January: item.January,\r\n February: item.February,\r\n March: item.March,\r\n April: item.April,\r\n May: item.May,\r\n June: item.June,\r\n July: item.July,\r\n August: item.August,\r\n September: item.September,\r\n October: item.October,\r\n November: item.November,\r\n December: item.December,\r\n JanuaryMonthPresent: item.January ? true : false,\r\n FebruaryMonthPresent: item.February ? true : false,\r\n MarchMonthPresent: item.March ? true : false,\r\n AprilMonthPresent: item.April ? true : false,\r\n MayMonthPresent: item.May ? true : false,\r\n JuneMonthPresent: item.June ? true : false,\r\n JulyMonthPresent: item.July ? true : false,\r\n AugustMonthPresent: item.August ? true : false,\r\n SeptemberMonthPresent: item.September ? true : false,\r\n OctoberMonthPresent: item.October ? true : false,\r\n NovemberMonthPresent: item.November ? true : false,\r\n DecemberMonthPresent: item.December ? true : false,\r\n NewBooth: true,\r\n Status: \"N\",\r\n StartDateList: item.StartDateList,\r\n DisableStartDate: false,\r\n AllRentalDates: item.AllRentalDates\r\n });\r\n }\r\n });\r\n }\r\n\r\n if (objSelectedBooth.length > 0)\r\n objM.MonthlyRentalBooth = objSelectedBooth;\r\n\r\n var objSelectedOtherCharge = [];\r\n if (this.selectedOtherItems.length > 0) {\r\n this.selectedOtherItems.forEach((item) => {\r\n const otherRentalYear = new Date(item.RentalMonth.split('-')[0]).getFullYear();\r\n const otherRentalMonth = new Date(item.RentalMonth.split('-')[0]).getMonth() + 1;\r\n const otherRentalYearMonth = `${otherRentalYear}${otherRentalMonth <\r\n 10 ? '0' : ''}${otherRentalMonth}`;\r\n\r\n if (item.Recurring) {\r\n objSelectedOtherCharge.push({\r\n OtherItemId: item.Id,\r\n MonthOtherRentalId: item.MonthOtherRentalId,\r\n OtherItemName: item.OtherItem,\r\n OtherItemCharge: item.OtherItemtotal.includes('(') && item.OtherItemtotal.includes(')') ? -1 * parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')),\r\n Quantity: item.Quantity,\r\n YearMonth: otherRentalYearMonth,\r\n BoothNumber: item.BoothNo,\r\n Recurring: item.Recurring,\r\n OtherCharge: item.OtherItemCharge.includes('(') && item.OtherItemCharge.includes(')') ? -1 * parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemCharge.replace(/[^0-9.-]/g, '')),\r\n SalesTax: item.SalesTax.includes('(') && item.SalesTax.includes(')') ? -1 * parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTax.replace(/[^0-9.-]/g, '')),\r\n SecLevelTax: item.CityTax.includes('(') && item.CityTax.includes(')') ? -1 * parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')) : parseFloat(item.CityTax.replace(/[^0-9.-]/g, '')),\r\n Reference: item.Reference,\r\n MonthlyRentalIds: item.MonthlyRentalIds\r\n })\r\n }\r\n });\r\n }\r\n if (objSelectedOtherCharge.length > 0)\r\n objM.MonthlyOtherRentalCharges = objSelectedOtherCharge;\r\n\r\n var objDiscountData = [];\r\n if (this.vendorDiscountPlans.length > 0 && this.totalDiscountCharge > 0) {\r\n this.vendorDiscountPlans.forEach((item) => {\r\n if (item.CheckAll) {\r\n objDiscountData.push({\r\n PlanId: item.PlanSeqId,\r\n DiscountAmount: item.AppliedDiscount.includes('(') && item.AppliedDiscount.includes(')') ? -1 * parseFloat(item.AppliedDiscount.replace(/[^0-9.-]/g, '')) : parseFloat(item.AppliedDiscount.replace(/[^0-9.-]/g, '')),\r\n OtherCharges: item.OtherItems,\r\n SalesTax: item.SalesTaxApplied,\r\n SecondLevelTax: item.SecondLevelTaxApplied,\r\n DiscountType: item.DiscountType == DiscountType.Percentage ? \"0\" : \"1\",\r\n DiscountValue: item.DiscountValue,\r\n SalesTaxAmount: item.SalesTaxAmount.includes('(') && item.SalesTaxAmount.includes(')') ? -1 * parseFloat(item.SalesTaxAmount.replace(/[^0-9.-]/g, '')) : parseFloat(item.SalesTaxAmount.replace(/[^0-9.-]/g, '')),\r\n SecondLevelTaxAmount: item.SecondLevelTaxAmount.includes('(') && item.SecondLevelTaxAmount.includes(')') ? -1 * parseFloat(item.SecondLevelTaxAmount.replace(/[^0-9.-]/g, '')) : parseFloat(item.SecondLevelTaxAmount.replace(/[^0-9.-]/g, ''))\r\n })\r\n }\r\n });\r\n }\r\n if (objDiscountData.length > 0)\r\n objM.AppliedDiscountModel = objDiscountData;\r\n\r\n const subCM = this.rentalService.saveMonthlyRental(this.marketId,objM).subscribe(async (res: any) => {\r\n if (res.Success) {\r\n this.accountReceipId = res.Id;\r\n this.toastr.success($localize`Transaction saved successfully`, $localize`Success`, this.toasterConfig);\r\n this.openConfirmationPage = true;\r\n } else {\r\n this.toastr.error($localize`Error occurred while saving the rental transaction`, $localize`Error`, this.toasterConfig);\r\n if (this.verifoneId) {\r\n this.voidPayment = true;\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, (err) => {\r\n this.toastr.error($localize`Error occurred while saving the rental transaction`, $localize`Error`, this.toasterConfig);\r\n // const url = 'ops/vendors/details/' + this.vendorId + '/3';\r\n // this.router.navigate([url]); \r\n\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n\r\n this.subscriptions.push(subCM);\r\n break;\r\n }\r\n }\r\n else {\r\n this.processPayment = false;\r\n this.voidPayment = false;\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }\r\n\r\n setMinimum(controls) {\r\n const value = controls.value;\r\n var enteredAmount = value.toString().includes('(') && value.toString().includes(')') ? -1 * parseFloat(value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(value.toString().replace(/[^0-9.-]/g, ''));\r\n if (!enteredAmount) {\r\n controls.setValue(this.customCurrency.transform(\"0.00\"));\r\n }\r\n var totalrentalCharge = this.bookingDetailsForm.get('rentalCharge').value.toString().includes('(') && this.bookingDetailsForm.get('rentalCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, ''));\r\n var otherRentalCharge = this.bookingDetailsForm.get('otherCharge').value.toString().includes('(') && this.bookingDetailsForm.get('otherCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, ''));\r\n var totalDue = this.actualTotalDue + totalrentalCharge + otherRentalCharge + this.renewalFeeAmount;\r\n if (enteredAmount > totalDue) {\r\n this.bookingDetailsForm.get(\"paymentAmount\").setValue(this.customCurrency.transform(totalDue.toString()));\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Payment amount cannot be greater than total due.`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n this.calculateBalance();\r\n }\r\n\r\n calculateBalance() {\r\n const creditCardAmount = this.bookingDetailsForm.get('paymentAmount').value.toString().includes('(') && this.bookingDetailsForm.get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, ''));\r\n this.creditCardAmount = this.bookingDetailsForm.get('paymentAmount').value.toString().includes('(') && this.bookingDetailsForm.get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, ''));\r\n var totalrentalCharge = this.bookingDetailsForm.get('rentalCharge').value.toString().includes('(') && this.bookingDetailsForm.get('rentalCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, ''));\r\n var otherRentalCharge = this.bookingDetailsForm.get('otherCharge').value.toString().includes('(') && this.bookingDetailsForm.get('otherCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, ''));\r\n var totalSalesTax = this.bookingDetailsForm.get('totalSalesTax').value.toString().includes('(') && this.bookingDetailsForm.get('totalSalesTax').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('totalSalesTax').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('totalSalesTax').value.toString().replace(/[^0-9.-]/g, ''));\r\n var totalSecondLeveltax = this.bookingDetailsForm.get('totalSecondLeveltax').value.toString().includes('(') && this.bookingDetailsForm.get('totalSecondLeveltax').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('totalSecondLeveltax').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('totalSecondLeveltax').value.toString().replace(/[^0-9.-]/g, ''));\r\n\r\n var renewalFee = this.renewalFeeAmount.toString().includes('(') && this.renewalFeeAmount.toString().includes(')') ? -1 * parseFloat(this.renewalFeeAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.renewalFeeAmount.toString().replace(/[^0-9.-]/g, ''));\r\n\r\n var totalDue = this.actualTotalDue + totalrentalCharge + otherRentalCharge + totalSalesTax + totalSecondLeveltax;\r\n if(totalDue > 0){\r\n totalDue = totalDue + renewalFee;\r\n }\r\n else{\r\n renewalFee = 0;\r\n }\r\n const convenienceFee = 0;\r\n\r\n var totalAmount;\r\n totalAmount = creditCardAmount + convenienceFee;\r\n const balanceAmount = totalDue != 0 ? totalDue - totalAmount : 0;\r\n\r\n this.bookingDetailsForm.patchValue({\r\n totalDue: this.customCurrency.transform(totalDue.toString()),\r\n balanceDue: this.customCurrency.transform(balanceAmount.toString()),\r\n convenienceFee: this.customCurrency.transform(convenienceFee.toString()),\r\n additionalCharge: this.customCurrency.transform(renewalFee.toString()),\r\n totalPayment: this.customCurrency.transform(totalAmount.toString())\r\n })\r\n\r\n this.paymentAmount = this.bookingDetailsForm.get('totalPayment').value.toString().includes('(') && this.bookingDetailsForm.get('totalPayment').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('totalPayment').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('totalPayment').value.toString().replace(/[^0-9.-]/g, ''));\r\n\r\n if (this.applyCCCharge && creditCardAmount > 0) {\r\n this.calculateConvenienceFee();\r\n }\r\n }\r\n\r\n handledblClick(event: any) {\r\n clearTimeout(this.clickTimeout);\r\n\r\n const inputElement = event.target as HTMLInputElement;\r\n inputElement.select(); // Select the entire text on double-click\r\n }\r\n\r\n handleClick(event: any) {\r\n // Get the current value of the input field\r\n let currentValue: string = event.target.value;\r\n const currentCursorPosition = event.target.selectionStart;\r\n const currentSelectionLength = event.target.selectionEnd - event.target.selectionStart;\r\n const inputElement = event.target as HTMLInputElement;\r\n const inputValue = inputElement.value;\r\n clearTimeout(this.clickTimeout);\r\n\r\n this.clickTimeout = setTimeout(() => {\r\n if (inputValue === '$0.00') {\r\n const selectionLength = inputElement.selectionEnd - inputElement.selectionStart;\r\n\r\n // If the entire text is not selected, set the cursor position after the \"$\" sign\r\n if (selectionLength !== inputValue.length) {\r\n inputElement.setSelectionRange(1, 1);\r\n }\r\n }\r\n }, 200); // Delay to check for double click\r\n \r\n if (currentSelectionLength === currentValue.length) {\r\n return true;\r\n }\r\n // Check if the input value is \"$0.00\"\r\n if (currentValue === '$0.00') {\r\n // Set the cursor position after the \"$\" sign\r\n event.target.setSelectionRange(1, 1);\r\n return;\r\n }\r\n\r\n // Check if the \"$\" sign is present in the current value\r\n const hasDollarSign = currentValue.includes('$');\r\n // Get the cursor position\r\n const caretPosition = event.target.selectionStart;\r\n // Check if the cursor position is after the \"$\" sign\r\n const hasDollarSignBeforeCaret = currentValue.slice(0, caretPosition).includes('$');\r\n // If the cursor is not after the \"$\" sign, adjust the cursor position\r\n if (!hasDollarSignBeforeCaret && hasDollarSign) {\r\n // Find the index of \"$\" sign\r\n const dollarSignIndex = currentValue.indexOf('$');\r\n // Set the cursor position after the \"$\" sign\r\n event.target.setSelectionRange(dollarSignIndex + 1, dollarSignIndex + 1);\r\n }\r\n }\r\n\r\n setCurrencyFormat(controls) {\r\n const value = controls.value;\r\n let inputValue = value;\r\n if(inputValue.toString().substring(1,2) == \"$\")\r\n inputValue = `${inputValue.slice(1)}`;\r\n controls.setValue(inputValue);\r\n }\r\n\r\n\r\n numberOnly(event): boolean {\r\n const inputValue = event.target.value;\r\n const charCode = (event.which) ? event.which : event.keyCode;\r\n const currentCursorPosition = event.target.selectionStart;\r\n const currentSelectionLength = event.target.selectionEnd - event.target.selectionStart;\r\n // Check if the input value is \"$0.00\"\r\n if (charCode == 45) {\r\n return false;\r\n }\r\n if (currentSelectionLength === inputValue.length) {\r\n return true;\r\n }\r\n if (inputValue === '$0.00') {\r\n // Set the cursor position after the \"$\" sign\r\n event.target.setSelectionRange(1, 1);\r\n return true; // Allow further input\r\n }\r\n // Check if the \"$\" sign is present in the current value\r\n const hasDollarSign = inputValue.includes('$');\r\n // Check if the cursor position is after the \"$\" sign\r\n const hasDollarSignBeforeCaret = inputValue.slice(0, currentCursorPosition).includes('$');\r\n // If the cursor is not after the \"$\" sign and \"$\" sign is present, prevent input\r\n if (!hasDollarSignBeforeCaret && hasDollarSign && charCode !== 46 && (charCode < 48 || charCode > 57)) {\r\n return false;\r\n }\r\n // If the entered character is a dot and there's already a dot in the input, prevent input\r\n if (charCode == 46 && inputValue.includes('.') && inputValue.indexOf('.') !== currentCursorPosition) {\r\n return false;\r\n }\r\n if (charCode > 31 && (charCode < 46 || charCode > 57 || charCode === 47)) {\r\n return false;\r\n }\r\n return true; // Allow input\r\n }\r\n\r\n getCCCredentials() {\r\n this.paymentService.getCCCredentials(this.marketId).subscribe((res) => {\r\n if (res !== null) {\r\n this.paymentGatewayCredentials = res.GatewayDetails ? JSON.parse(res.GatewayDetails) : null;\r\n this.processCreditCardOnline = res.ProcessCreditCardOnline;\r\n }\r\n })\r\n }\r\n\r\n getWebRentalSetting() {\r\n const sub = this.marketInfoService.getWebRentalSetting(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.applyCCCharge = res.ApplyCcporcessingFeePercentage;\r\n this.CcfeeinPercentage = res.CcfeeinPercentage;\r\n this.AllowPartialPay = res.AllowPartialPay; \r\n this.allowWeeklyRentalRenewal = res.AllowRenewalsMonthly;\r\n this.allowMonthlyRentalRenewal = res.AllowRenewalsMonthly;\r\n this.allowOtherItemRenewal = res.AllowRenewingOtherItems;\r\n this.applyRenewalFee = res.ApplyBookingFee;\r\n this.bookingRenewalFeeId = res.ApplyBookingFeeId;\r\n if (this.bookingRenewalFeeId) {\r\n this.subscriptions.push(this.rentalService.getBookingRenewalFeeById(this.marketId, this.bookingRenewalFeeId).subscribe((resFee: any) => {\r\n if (resFee) {\r\n this.renewalFeeAmount = (this.rentalType == 2 ? resFee.OtherItemMonthlyCharge :\r\n this.rentalType == 3 ? resFee.OtherItemWeeklyCharge : 0) ?? 0;\r\n }\r\n }));\r\n }\r\n this.bookingDetailsForm.get('paymentAmount').enable();\r\n if (!this.AllowPartialPay) {\r\n this.bookingDetailsForm.get('paymentAmount').disable();\r\n this.bookingDetailsForm.patchValue({\r\n paymentAmount: this.customCurrency.transform(this.actualTotalDue.toString()),\r\n totalPayment: this.customCurrency.transform(this.actualTotalDue.toString()),\r\n })\r\n }\r\n this.paymentAmount = this.bookingDetailsForm.get('totalPayment').value.toString().includes('(') && this.bookingDetailsForm.get('totalPayment').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('totalPayment').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('totalPayment').value.toString().replace(/[^0-9.-]/g, ''));\r\n const creditCardAmount = this.bookingDetailsForm.get('paymentAmount').value.toString().includes('(') && this.bookingDetailsForm.get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, ''));\r\n if (this.applyCCCharge && creditCardAmount > 0) {\r\n this.calculateConvenienceFee();\r\n }\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n calculateConvenienceFee() {\r\n var convenienceFee = 0;\r\n var creditCardAmount = this.bookingDetailsForm.get('paymentAmount').value.toString().includes('(') && this.bookingDetailsForm.get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('paymentAmount').value.toString().replace(/[^0-9.-]/g, ''));\r\n var totalrentalCharge = this.bookingDetailsForm.get('rentalCharge').value.toString().includes('(') && this.bookingDetailsForm.get('rentalCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('rentalCharge').value.toString().replace(/[^0-9.-]/g, ''));\r\n var otherRentalCharge = this.bookingDetailsForm.get('otherCharge').value.toString().includes('(') && this.bookingDetailsForm.get('otherCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('otherCharge').value.toString().replace(/[^0-9.-]/g, ''));\r\n var renewalFee = this.bookingDetailsForm.get('additionalCharge').value.toString().includes('(') && this.bookingDetailsForm.get('additionalCharge').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('additionalCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('additionalCharge').value.toString().replace(/[^0-9.-]/g, ''));\r\n var totalDue = this.actualTotalDue + totalrentalCharge + otherRentalCharge;\r\n if(totalDue > 0){\r\n totalDue = totalDue + renewalFee;\r\n }\r\n else{\r\n renewalFee = 0;\r\n }\r\n if (creditCardAmount > 0) {\r\n var convenienceFee = creditCardAmount * ((this.CcfeeinPercentage) / 100);\r\n totalDue += convenienceFee;\r\n this.creditCardAmount += convenienceFee;\r\n }\r\n var totalAmount = 0;\r\n totalAmount = creditCardAmount + convenienceFee;\r\n const balanceAmount = totalDue - totalAmount;\r\n\r\n this.bookingDetailsForm.patchValue({\r\n convenienceFee: this.customCurrency.transform(convenienceFee.toString()), \r\n balanceDue: this.customCurrency.transform(balanceAmount.toString()),\r\n totalPayment: this.customCurrency.transform(totalAmount.toString()),\r\n totalCharge: this.customCurrency.transform(totalDue.toString()),\r\n })\r\n this.paymentAmount = this.bookingDetailsForm.get('totalPayment').value.toString().includes('(') && this.bookingDetailsForm.get('totalPayment').value.toString().includes(')') ? -1 * parseFloat(this.bookingDetailsForm.get('totalPayment').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.bookingDetailsForm.get('totalPayment').value.toString().replace(/[^0-9.-]/g, ''));\r\n }\r\n\r\n getRentalPaymentSettings() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.rentalService.getRentalSettings(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.ResaleNumberRequired = res.ResaleNumberRequired;\r\n this.DaysSellWithoutResaleNumber = res.DaysSellWithoutResaleNumber;\r\n this.BusinessLicenseNumberRequired = res.BusinessLicenseNumberRequired;\r\n this.DaysSellWithoutBusiLicNumber = res.DaysSellWithoutBusiLicNumber;\r\n this.MonthlyBookingEndDate = res.MonthlyBookingEndDate;\r\n this.masterRentChargeforResOtherItems = res.MasterChargeForOtherChargeRenewal;\r\n this.secondTaxName = res.SecondTaxName ? res.SecondTaxName: \"Sec Level Tax\";\r\n }\r\n });\r\n }\r\n\r\n updateRentalRecord(record) {\r\n if (record.Reservation && this.allowMonthlyRentalRenewal) {\r\n const rentEndPeriodIndex = this.monthlyMarketDays.findIndex(e => e.RentalMonths == record.RentEndPeriod);\r\n const renewalStartMonth = this.monthlyMarketDays[rentEndPeriodIndex +1].RentalMonths\r\n record.BookingCanExtend = true;\r\n record.RenewalStartMonth =renewalStartMonth\r\n record.MonthlyRenewalMonth = renewalStartMonth;\r\n record.RentEndPeriodIndex =rentEndPeriodIndex\r\n this.extendMonthlyRental(record);\r\n }\r\n else{\r\n record.BookingCanExtend = false;\r\n record.RenewalStartMonth = \"This booking cannot be extended further!\";\r\n record.MonthlyRenewalMonth = record.RentalMonth;\r\n this.totalRentalCharge -= record.Rent.toString().includes('(') && record.Rent.toString().includes(')') ? -1 * parseFloat(record.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= record.SalesTax.toString().includes('(') && record.SalesTax.toString().includes(')') ? -1 * parseFloat(record.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= record.CityTax.toString().includes('(') && record.CityTax.toString().includes(')') ? -1 * parseFloat(record.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n record.Rent = this.customCurrency.transform(\"0\");\r\n }\r\n }\r\n\r\n extendMonthlyRental(extendRentalRecord) {\r\n const extendedRentalEndDates =extendRentalRecord.MonthlyRenewalMonth;\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you wish to extend the bookings till ` + extendedRentalEndDates + '? Please note that the extended period cannot be cancelled',\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then(async (result) => {\r\n if (result.value) {\r\n var rentalDates = [];\r\n let noResale = true;\r\n const vendorRentalDays = [];\r\n var marketDayCountForResale = 0 \r\n if ((this.ResaleNumberRequired && !this.exemptResale) || (this.BusinessLicenseNumberRequired)) {\r\n var rentalstartDate = \"\";\r\n var selectedBoothRecord = this.selectedMonthlyBooths.filter(e => e.NewBooth == true || e.ExtendRental == true);\r\n if (selectedBoothRecord.length > 0) {\r\n selectedBoothRecord.forEach(record => {\r\n this.selectedMarketDays.map(el => {\r\n const startDate = new Date(record.RentalStartDate);\r\n const endDate = new Date(record.RentalEndDate);\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) { \r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates);\r\n });\r\n }); \r\n }\r\n \r\n if (extendRentalRecord.MonthlyRentalId != 0)\r\n var recordExist = this.selectedMonthlyBooths.findIndex(e => e.RentStartPeriod == extendRentalRecord.RentStartPeriod && e.RentEndPeriod == extendRentalRecord.RentEndPeriod\r\n && e.BoothNumber == extendRentalRecord.BoothNumber && e.MonthlyRentalId == extendRentalRecord.MonthlyRentalId);\r\n else\r\n var recordExist = this.selectedMonthlyBooths.findIndex(e => e.RentStartPeriod == extendRentalRecord.RentStartPeriod && e.RentEndPeriod == extendRentalRecord.RentEndPeriod\r\n && e.BoothNumber == extendRentalRecord.BoothNumber);\r\n \r\n if (recordExist != -1) { \r\n var rentalstartDate = \"\";\r\n for(const el of this.selectedMarketDays){\r\n const selectedDayOfWeek = el - 1;\r\n const startDate = new Date(this.selectedMonthlyBooths[recordExist].RentalStartDate);\r\n const endMonth = extendRentalRecord.MonthlyRenewalMonth;\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n var endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n if (this.MonthlyBookingEndDate) {\r\n const rentalEndDateYear = endDate.getFullYear();\r\n const rentalEndDateMonth = endDate.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n endDate = await this.getMonthEndingDateFromSetting(rentalEndDateYearMonth);\r\n }\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) { \r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n }\r\n \r\n rentalDates.map(date => {\r\n const targetDateString = this.datePipe.transform(date.startDate, \"MM/dd/yyyy\");\r\n const dateExist = vendorRentalDays.find(el => {\r\n const rentalDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(date.startDate, \"MM/dd/yyyy\");\r\n vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n marketDayCountForResale += 1;\r\n if (marketDayCountForResale > this.DaysSellWithoutResaleNumber) {\r\n return; // exits the forEach loop when the condition is met\r\n }\r\n }\r\n });\r\n \r\n const obj = {\r\n VendorID: this.vendorId,\r\n VendorRentalDate: new Date()\r\n };\r\n \r\n this.subscriptions.push(this.rentalService.getVendorRentalDays(obj).subscribe((res: any[]) => {\r\n if (marketDayCountForResale <= this.DaysSellWithoutResaleNumber || marketDayCountForResale <= this.DaysSellWithoutBusiLicNumber) {\r\n if (res && res.length > 0) {\r\n res.forEach(el => {\r\n const targetDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n const dateExist = vendorRentalDays.find(data => {\r\n const rentalDateString = this.datePipe.transform(data.VendorRentalDate, \"MM/dd/yyyy\");\r\n return rentalDateString === targetDateString;\r\n });\r\n if (!dateExist) {\r\n const formattedDate = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n vendorRentalDays.push({ VendorRentalDate: formattedDate });\r\n marketDayCountForResale += 1;\r\n }\r\n });\r\n }\r\n }\r\n if (this.ResaleNumberRequired && !this.exemptResale && !this.resaleNo && marketDayCountForResale > this.DaysSellWithoutResaleNumber && !this.resaleOptionSelected) {\r\n const modal = this.modalResaleNo.nativeElement;\r\n modal.classList.add('show');\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'block';\r\n }\r\n noResale = false;\r\n }\r\n else if (this.BusinessLicenseNumberRequired && marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n if (!this.businessLicenseNumber) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Business License Number is required! Do you want to continue without Business License Number?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n this.proceedExtendingRental(extendRentalRecord);\r\n }\r\n else {\r\n //this.refreshAddBooth();\r\n }\r\n });\r\n }\r\n else {\r\n if (!this.businessLicenseExpiryDate) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Business License expiry date is not provided! Do you want to continue without that?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n this.proceedExtendingRental(extendRentalRecord);\r\n }\r\n else {\r\n // this.refreshAddBooth();\r\n }\r\n });\r\n }\r\n else {\r\n if (new Date(this.businessLicenseExpiryDate) < new Date()) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Business License is expired! Do you want to continue?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n this.proceedExtendingRental(extendRentalRecord);\r\n }\r\n else {\r\n // this.refreshAddBooth();\r\n }\r\n });\r\n }\r\n else {\r\n this.proceedExtendingRental(extendRentalRecord);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n noResale = true;\r\n this.proceedExtendingRental(extendRentalRecord);\r\n }\r\n }));\r\n } else {\r\n this.proceedExtendingRental(extendRentalRecord);\r\n }\r\n }\r\n });\r\n }\r\n\r\n async proceedExtendingRental(extendRentalRecord) {\r\n if (extendRentalRecord.MonthlyRentalId != 0)\r\n var recordExist = this.selectedMonthlyBooths.findIndex(e => e.RentStartPeriod == extendRentalRecord.RentStartPeriod && e.RentEndPeriod == extendRentalRecord.RentEndPeriod\r\n && e.BoothNumber == extendRentalRecord.BoothNumber && e.MonthlyRentalId == extendRentalRecord.MonthlyRentalId);\r\n else\r\n var recordExist = this.selectedMonthlyBooths.findIndex(e => e.RentStartPeriod == extendRentalRecord.RentStartPeriod && e.RentEndPeriod == extendRentalRecord.RentEndPeriod\r\n && e.BoothNumber == extendRentalRecord.BoothNumber && e.RentalMarketDay == extendRentalRecord.RentalMarketDay);\r\n\r\n if (recordExist != -1) {\r\n if (!this.selectedMonthlyBooths[recordExist].Drop && this.selectedMonthlyBooths[recordExist].Reservation && this.allowMonthlyRentalRenewal) {\r\n const rentalDates = [];\r\n var currentMonthRentalDates = [];\r\n var rentalstartDate;\r\n var marketDays = 0;\r\n var marketDay;\r\n \r\n if (this.selectedMonthlyBooths[recordExist].Sunday == true) {\r\n marketDay = 'Sun'\r\n }\r\n else if (this.selectedMonthlyBooths[recordExist].Monday == true) {\r\n marketDay = 'Mon'\r\n }\r\n else if (this.selectedMonthlyBooths[recordExist].Tuesday == true) {\r\n marketDay = 'Tue'\r\n }\r\n else if (this.selectedMonthlyBooths[recordExist].Wednesday == true) {\r\n marketDay = 'Wed'\r\n }\r\n else if (this.selectedMonthlyBooths[recordExist].Thursday == true) {\r\n marketDay = 'Thu'\r\n }\r\n else if (this.selectedMonthlyBooths[recordExist].Friday == true) {\r\n marketDay = 'Fri'\r\n }\r\n else if (this.selectedMonthlyBooths[recordExist].Saturday == true) {\r\n marketDay = 'Sat'\r\n }\r\n \r\n for (const el of this.selectedMarketDays) {\r\n const selectedDayOfWeek = el - 1;\r\n var endDateYearMonth;\r\n const currentDate = new Date();\r\n const currentYear = currentDate.getFullYear();\r\n const currentMonth = currentDate.getMonth();\r\n const currentYearMonth = `${currentYear}${(currentMonth + 1) < 10 ? '0' : ''}${(currentMonth + 1)}`;\r\n var startDate = new Date(this.selectedMonthlyBooths[recordExist].RentalStartDate);\r\n const endMonth = extendRentalRecord.MonthlyRenewalMonth;\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n var endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n if (this.MonthlyBookingEndDate) {\r\n const rentalEndDateYear = endDate.getFullYear();\r\n const rentalEndDateMonth = endDate.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n endDate = await this.getMonthEndingDateFromSetting(rentalEndDateYearMonth);\r\n endDateYearMonth = rentalEndDateYearMonth;\r\n\r\n const rentalStartDate = new Date(startDate);\r\n var previousMonth = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() - 1)).getMonth() + 1;\r\n var PreviousMonthYear = new Date(rentalStartDate.setMonth(rentalStartDate.getMonth() - 1)).getFullYear();\r\n const PreviousMonthYearAndMonth = `${PreviousMonthYear}${previousMonth < 10 ? '0' : ''}${previousMonth}`;\r\n // if (PreviousMonthYearAndMonth >= currentYearMonth) {\r\n const monthEndDate = await this.getMonthEndingDateFromSetting(PreviousMonthYearAndMonth);\r\n const dateDiff = this.getDaysDifference(monthEndDate, new Date(startDate)); //calculates the diff between current month start date and previous monthend date \r\n if (dateDiff <= 7 && new Date(monthEndDate) < startDate) {\r\n if (new Date() > new Date(monthEndDate)) {\r\n startDate = new Date();\r\n }\r\n else {\r\n startDate = new Date(monthEndDate.setDate(monthEndDate.getDate() + 1));\r\n }\r\n }\r\n // }\r\n }\r\n var previousRentalYearMonth;\r\n var currentMonthEnd = new Date(startDate.getFullYear(), startDate.getMonth() + 1, 0);\r\n if (this.MonthlyBookingEndDate) {\r\n const currentStartMonth = this.selectedMonthlyBooths[recordExist].RentStartPeriod;\r\n const [startMonthDate, startMonthYear] = currentStartMonth.split(' ');\r\n const startMonthIndex = this.getMonthIndex(startMonthDate);\r\n var currentMonthEnd = new Date(startMonthYear, startMonthIndex + 1, 0);\r\n const rentalEndDateYear = currentMonthEnd.getFullYear();\r\n const rentalEndDateMonth = currentMonthEnd.getMonth() + 1;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n previousRentalYearMonth = rentalEndDateYearMonth;\r\n if (endDateYearMonth == rentalEndDateYearMonth)\r\n currentMonthEnd = await this.getMonthEndingDateFromSetting(rentalEndDateYearMonth);\r\n }\r\n\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n marketDays += 1;\r\n rentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n\r\n if (this.MonthlyBookingEndDate) {\r\n currentDay = new Date(startDate);\r\n while (currentDay <= currentMonthEnd) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n if (!rentalstartDate) {\r\n rentalstartDate = this.datePipe.transform(new Date(currentDay), 'MMM d, y');\r\n }\r\n //marketDays += 1;\r\n currentMonthRentalDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n }\r\n\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = rentalDates.sort(compareDates);\r\n\r\n if (this.MonthlyBookingEndDate) {\r\n const compareCurrentMonthDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const currentMonthSortedDates = currentMonthRentalDates.sort(compareCurrentMonthDates);\r\n }\r\n else {\r\n currentMonthRentalDates = rentalDates;\r\n }\r\n\r\n var allRentalDates = rentalDates.map(el => new Date(el.startDate));\r\n var currentRentedEndDate = new Date(this.selectedMonthlyBooths[recordExist].RentalEndDate);\r\n const filteredRentalDates = allRentalDates.filter(rentalDate => rentalDate > currentRentedEndDate);\r\n var obj1 = {\r\n RentalDates: filteredRentalDates,\r\n BoothNumber: this.selectedMonthlyBooths[recordExist].BoothNumber\r\n }\r\n\r\n this.subscriptions.push(this.rentalService.checkRentalExits(this.marketId, obj1).subscribe((res) => {\r\n if (!res.Success) {\r\n var RentAmount = this.selectedMonthlyBooths[recordExist].Rent;\r\n var SalesTax = this.selectedMonthlyBooths[recordExist].SalesTax;\r\n var CityTax = this.selectedMonthlyBooths[recordExist].CityTax; \r\n var JanRentAmount = this.selectedMonthlyBooths[recordExist].January ?? 0;\r\n var FebRentAmount = this.selectedMonthlyBooths[recordExist].February ?? 0;\r\n var MarRentAmount = this.selectedMonthlyBooths[recordExist].March ?? 0;\r\n var AprRentAmount = this.selectedMonthlyBooths[recordExist].April ?? 0;\r\n var MayRentAmount = this.selectedMonthlyBooths[recordExist].May ?? 0;\r\n var JunRentAmount = this.selectedMonthlyBooths[recordExist].June ?? 0;\r\n var JulRentAmount = this.selectedMonthlyBooths[recordExist].July ?? 0;\r\n var AugRentAmount = this.selectedMonthlyBooths[recordExist].August ?? 0;\r\n var SepRentAmount = this.selectedMonthlyBooths[recordExist].September ?? 0;\r\n var OctRentAmount = this.selectedMonthlyBooths[recordExist].October ?? 0;\r\n var NovRentAmount = this.selectedMonthlyBooths[recordExist].November ?? 0;\r\n var DecRentAmount = this.selectedMonthlyBooths[recordExist].December ?? 0;\r\n\r\n this.totalRentalCharge -= RentAmount.toString().includes('(') && RentAmount.toString().includes(')') ? -1 * parseFloat(RentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(RentAmount.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= SalesTax.toString().includes('(') && SalesTax.toString().includes(')') ? -1 * parseFloat(SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= CityTax.toString().includes('(') && CityTax.toString().includes(')') ? -1 * parseFloat(CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n\r\n var extendRentalStartPeriod;\r\n if (!this.selectedMonthlyBooths[recordExist].NewBooth && this.selectedMonthlyBooths[recordExist].Status != \"R\") {\r\n extendRentalStartPeriod = new Date(this.selectedMonthlyBooths[recordExist].RentalSavedEndDate);\r\n if (extendRentalStartPeriod.getDate() == 31) {\r\n extendRentalStartPeriod.setDate(extendRentalStartPeriod.getDate() + 1);\r\n }\r\n else {\r\n extendRentalStartPeriod.setMonth(extendRentalStartPeriod.getMonth() + 1);\r\n }\r\n extendRentalStartPeriod.setDate(1);\r\n }\r\n else {\r\n extendRentalStartPeriod = this.selectedMonthlyBooths[recordExist].RentalStartDate;\r\n }\r\n var obj = {\r\n BoothTypeId: this.selectedMonthlyBooths[recordExist].BoothTypeId,\r\n VendorId: this.vendorId,\r\n RentalStartPeriod: new Date(extendRentalStartPeriod),\r\n RentalEndPeriod: new Date(rentalDates[rentalDates.length - 1].startDate),\r\n PerDiemApplicable: this.selectedMonthlyBooths[recordExist].PerDiem,\r\n RentalMarketDay : marketDay,\r\n JanRent: JanRentAmount.toString().includes('(') && JanRentAmount.toString().includes(')') ? -1 * parseFloat(JanRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(JanRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n FebRent: FebRentAmount.toString().includes('(') && FebRentAmount.toString().includes(')') ? -1 * parseFloat(FebRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(FebRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n MarRent: MarRentAmount.toString().includes('(') && MarRentAmount.toString().includes(')') ? -1 * parseFloat(MarRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(MarRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n AprRent: AprRentAmount.toString().includes('(') && AprRentAmount.toString().includes(')') ? -1 * parseFloat(AprRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(AprRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n MayRent: MayRentAmount.toString().includes('(') && MayRentAmount.toString().includes(')') ? -1 * parseFloat(MayRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(MayRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n JunRent: JunRentAmount.toString().includes('(') && JunRentAmount.toString().includes(')') ? -1 * parseFloat(JunRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(JunRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n JulRent: JulRentAmount.toString().includes('(') && JulRentAmount.toString().includes(')') ? -1 * parseFloat(JulRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(JulRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n AugRent: AugRentAmount.toString().includes('(') && AugRentAmount.toString().includes(')') ? -1 * parseFloat(AugRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(AugRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n SepRent: SepRentAmount.toString().includes('(') && SepRentAmount.toString().includes(')') ? -1 * parseFloat(SepRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(SepRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n OctRent: OctRentAmount.toString().includes('(') && OctRentAmount.toString().includes(')') ? -1 * parseFloat(OctRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(OctRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n NovRent: NovRentAmount.toString().includes('(') && NovRentAmount.toString().includes(')') ? -1 * parseFloat(NovRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(NovRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n DecRent: DecRentAmount.toString().includes('(') && DecRentAmount.toString().includes(')') ? -1 * parseFloat(DecRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(DecRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n }\r\n\r\n this.subscriptions.push(this.rentalService.getBoothRentalMontlyCharges(this.marketId, obj).subscribe((res: any) => {\r\n this.selectedMonthlyBooths[recordExist].RentEndPeriod = extendRentalRecord.MonthlyRenewalMonth;\r\n this.selectedMonthlyBooths[recordExist].RentalEndDate = this.datePipe.transform(new Date(rentalDates[rentalDates.length - 1].startDate), 'MMM d, y');\r\n this.selectedMonthlyBooths[recordExist].MktDays = marketDays;\r\n this.selectedMonthlyBooths[recordExist].Rent = this.customCurrency.transform(res.Rent);\r\n this.selectedMonthlyBooths[recordExist].SalesTax = this.customCurrency.transform(res.SalesTax);\r\n this.selectedMonthlyBooths[recordExist].CityTax = this.customCurrency.transform(res.CityTax);\r\n this.selectedMonthlyBooths[recordExist].January = this.customCurrency.transform(res.JanRent);\r\n this.selectedMonthlyBooths[recordExist].February = this.customCurrency.transform(res.FebRent);\r\n this.selectedMonthlyBooths[recordExist].March = this.customCurrency.transform(res.MarRent);\r\n this.selectedMonthlyBooths[recordExist].April = this.customCurrency.transform(res.AprRent);\r\n this.selectedMonthlyBooths[recordExist].May = this.customCurrency.transform(res.MayRent);\r\n this.selectedMonthlyBooths[recordExist].June = this.customCurrency.transform(res.JunRent);\r\n this.selectedMonthlyBooths[recordExist].July = this.customCurrency.transform(res.JulRent);\r\n this.selectedMonthlyBooths[recordExist].August = this.customCurrency.transform(res.AugRent);\r\n this.selectedMonthlyBooths[recordExist].September = this.customCurrency.transform(res.SepRent);\r\n this.selectedMonthlyBooths[recordExist].October = this.customCurrency.transform(res.OctRent);\r\n this.selectedMonthlyBooths[recordExist].November = this.customCurrency.transform(res.NovRent);\r\n this.selectedMonthlyBooths[recordExist].December = this.customCurrency.transform(res.DecRent);\r\n this.selectedMonthlyBooths[recordExist].JanuaryMonthPresent = res.JanuaryMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].FebruaryMonthPresent = res.FebruaryMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].MarchMonthPresent = res.MarchMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].AprilMonthPresent = res.AprilMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].MayMonthPresent = res.MayMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].JuneMonthPresent = res.JuneMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].JulyMonthPresent = res.JulyMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].AugustMonthPresent = res.AugustMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].SeptemberMonthPresent = res.SeptemberMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].OctoberMonthPresent = res.OctoberMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].NovemberMonthPresent = res.NovemberMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].DecemberMonthPresent = res.DecemberMonthPresent;\r\n this.selectedMonthlyBooths[recordExist].DisableJanMonth = res.JanRent || res.JanRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableFebMonth = res.FebRent || res.FebRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableMarMonth = res.MarRent || res.MarRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableAprMonth = res.AprRent || res.AprRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableMayMonth = res.MayRent || res.MayRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableJunMonth = res.JunRent || res.JunRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableJulMonth = res.JulRent || res.JulRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableAugMonth = res.AugRent || res.AugRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableSepMonth = res.SepRent || res.SepRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableOctMonth = res.OctRent || res.OctRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableNovMonth = res.NovRent || res.NovRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].DisableDecMonth = res.DecRent || res.DecRent == 0 ? false : true;\r\n this.selectedMonthlyBooths[recordExist].StartDateList = currentMonthRentalDates;\r\n this.selectedMonthlyBooths[recordExist].ExtendRental = true;\r\n this.selectedMonthlyBooths[recordExist].AllRentalDates = rentalDates.map(el => new Date(el.startDate));\r\n\r\n this.totalRentalCharge += res.Rent.toString().includes('(') && res.Rent.toString().includes(')') ? -1 * parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n // this.getDiscounts();\r\n }, err => {\r\n }));\r\n }\r\n else {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Rental End Period cannot be extended further`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n }));\r\n }\r\n else {\r\n this.selectedMonthlyBooths[recordExist].MonthlyRenewalMonth = this.selectedMonthlyBooths[recordExist].RentEndPeriod;\r\n this.selectedMonthlyBooths[recordExist].RenewalStartMonth = \"This booking cannot be extended further!\"\r\n this.selectedMonthlyBooths[recordExist].BookingCanExtend = false;\r\n }\r\n }\r\n }\r\n\r\n closeResaleModal(){\r\n // this.refreshAddBooth();\r\n const modal = this.modalResaleNo.nativeElement;\r\n if (modal.classList.contains('show')) {\r\n modal.style.display = 'none';\r\n modal.classList.remove('show');\r\n }\r\n }\r\n\r\n resaleOptionValidation() {\r\n this.exemptResaleReason = \"\";\r\n this.resaleNo = \"\";\r\n }\r\n\r\n getWeeklyRental() {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedWeeklyBooths = [];\r\n var existingBooths = [];\r\n const sub = this.rentalService.getWeeklyBookings(this.marketId,this.vendorId).subscribe((res: any[]) => {\r\n if (res) {\r\n existingBooths = res;\r\n existingBooths.forEach((el) => {\r\n var marketDay;\r\n if (el.Sunday) {\r\n marketDay = 'Sun'\r\n }\r\n else if (el.Monday) {\r\n marketDay = 'Mon'\r\n }\r\n else if (el.Tuesday) {\r\n marketDay = 'Tue'\r\n }\r\n else if (el.Wednesday) {\r\n marketDay = 'Wed'\r\n }\r\n else if (el.Thursday) {\r\n marketDay = 'Thu'\r\n }\r\n else if (el.Friday) {\r\n marketDay = 'Fri'\r\n }\r\n else if (el.Saturday) {\r\n marketDay = 'Sat'\r\n }\r\n \r\n if (el.Status == \"R\") {\r\n const rentEndPeriodIndex = this.weeklyMarketDays.findIndex(e=>e.RentalEndDays == rentalEndDate);\r\n const renewalStartWeek = this.weeklyMarketDays[rentEndPeriodIndex +1].RentalEndDays\r\n var obj = {\r\n BoothTypeId: el.BoothTypeId,\r\n VendorId: this.vendorId,\r\n RentalStartPeriod: new Date(this.weeklyMarketDays[0].RentalEndDays.split('-')[0]),\r\n RentalEndPeriod: new Date(this.weeklyMarketDays[0].RentalEndDays.split('-')[1]),\r\n RentalMarketDay: marketDay\r\n }\r\n this.rentalService.getBoothRentalWeeklyCharges(this.marketId,obj).subscribe((res: any) => {\r\n const ob = {\r\n WeeklyRentalId: el.WeeklyRentalId,\r\n BoothNumber: el.BoothNumber,\r\n BoothType: el.BoothType,\r\n BoothTypeId: el.BoothTypeId,\r\n RentStartPeriod: this.weeklyMarketDays[0].RentalEndDays,\r\n CurrentRentStartPeriod: this.weeklyMarketDays[0].RentalEndDays,\r\n RentEndPeriod: this.weeklyMarketDays[0].RentalEndDays,\r\n CurrentRentEndPeriod: this.weeklyMarketDays[0].RentalEndDays,\r\n RentalSavedEndDate: this.weeklyMarketDays[0].RentalEndDays.split('-')[1],\r\n Product: el.ProductId,\r\n ProductName: this.vendorProducts.filter(e=>e.ProductId == el.ProductId)[0]?.ProductName,\r\n Rent: this.customCurrency.transform(res.Rent),\r\n SalesTax: this.customCurrency.transform(res.SalesTax),\r\n CityTax: this.customCurrency.transform(res.CityTax),\r\n CurrentRent: this.customCurrency.transform(el.RentalCharge),\r\n CurrentSalesTax: this.customCurrency.transform(el.SalesTax),\r\n CurrentSecondTax: this.customCurrency.transform(el.SecLevelTax),\r\n Sunday: el.Sunday,\r\n Monday: el.Monday,\r\n Tuesday: el.Tuesday,\r\n Wednesday: el.Wednesday,\r\n Thursday: el.Thursday,\r\n Friday: el.Friday,\r\n Saturday: el.Saturday,\r\n Reservation: el.BoothReserved,\r\n WeekDay: marketDay,\r\n Drop: el.DoNotRenew,\r\n January: this.customCurrency.transform(res.JanRent),\r\n February: this.customCurrency.transform(res.FebRent),\r\n March: this.customCurrency.transform(res.MarRent),\r\n April: this.customCurrency.transform(res.AprRent),\r\n May: this.customCurrency.transform(res.MayRent),\r\n June: this.customCurrency.transform(res.JunRent),\r\n July: this.customCurrency.transform(res.JulRent),\r\n August: this.customCurrency.transform(res.AugRent),\r\n September: this.customCurrency.transform(res.SepRent),\r\n October: this.customCurrency.transform(res.OctRent),\r\n November: this.customCurrency.transform(res.NovRent),\r\n December: this.customCurrency.transform(res.DecRent),\r\n JanuaryMonthPresent: res.JanuaryMonthPresent,\r\n FebruaryMonthPresent: res.FebruaryMonthPresent,\r\n MarchMonthPresent: res.MarchMonthPresent,\r\n AprilMonthPresent: res.AprilMonthPresent,\r\n MayMonthPresent: res.MayMonthPresent,\r\n JuneMonthPresent: res.JuneMonthPresent,\r\n JulyMonthPresent: res.JulyMonthPresent,\r\n AugustMonthPresent: res.AugustMonthPresent,\r\n SeptemberMonthPresent: res.SeptemberMonthPresent,\r\n OctoberMonthPresent: res.OctoberMonthPresent,\r\n NovemberMonthPresent: res.NovemberMonthPresent,\r\n DecemberMonthPresent: res.DecemberMonthPresent,\r\n DisableJanMonth: res.JanRent ? false : true,\r\n DisableFebMonth: res.FebRent ? false : true,\r\n DisableMarMonth: res.MarRent ? false : true,\r\n DisableAprMonth: res.AprRent ? false : true,\r\n DisableMayMonth: res.MayRent ? false : true,\r\n DisableJunMonth: res.JunRent ? false : true,\r\n DisableJulMonth: res.JulRent ? false : true,\r\n DisableAugMonth: res.AugRent ? false : true,\r\n DisableSepMonth: res.SepRent ? false : true,\r\n DisableOctMonth: res.OctRent ? false : true,\r\n DisableNovMonth: res.NovRent ? false : true,\r\n DisableDecMonth: res.DecRent ? false : true,\r\n Status: el.Status,\r\n NewBooth: false,\r\n BookingCanExtend: true,\r\n RenewalStartWeek:renewalStartWeek,\r\n CWRenewalWeek:this.weeklyMarketDays[rentEndPeriodIndex +1].RentalEndDays,\r\n RentEndPeriodIndex:rentEndPeriodIndex\r\n }\r\n this.totalRentalCharge += res.Rent.toString().includes('(') && res.Rent.toString().includes(')') ? -1 * parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n this.selectedWeeklyBooths.push(ob);\r\n });\r\n }\r\n else {\r\n var JanuaryMonthPresent = false;\r\n var FebruaryMonthPresent = false;\r\n var MarchMonthPresent = false;\r\n var AprilMonthPresent = false;\r\n var MayMonthPresent = false;\r\n var JuneMonthPresent = false;\r\n var JulyMonthPresent = false;\r\n var AugustMonthPresent = false;\r\n var SeptemberMonthPresent = false;\r\n var OctoberMonthPresent = false;\r\n var NovemberMonthPresent = false;\r\n var DecemberMonthPresent = false;\r\n\r\n var rentalStartDateRecord = this.weeklyMarketDays.filter(date => this.datePipe.transform(new Date(date.RentalStartDays.split('-')[0]), 'MM/dd/yyyy') <= this.datePipe.transform(new Date(el.RentalStartDate), 'MM/dd/yyyy')\r\n && this.datePipe.transform(new Date(date.RentalStartDays.split('-')[1]), 'MM/dd/yyyy') >= this.datePipe.transform(new Date(el.RentalStartDate), 'MM/dd/yyyy'))\r\n if (rentalStartDateRecord.length > 0)\r\n var rentalStartDate = rentalStartDateRecord[0].RentalStartDays;\r\n\r\n var rentalEndDateRecord = this.weeklyMarketDays.filter(date => this.datePipe.transform(new Date(date.RentalEndDays.split('-')[0]), 'MM/dd/yyyy') <= this.datePipe.transform(new Date(el.RentalEndDate), 'MM/dd/yyyy')\r\n && this.datePipe.transform(new Date(date.RentalEndDays.split('-')[1]), 'MM/dd/yyyy') >= this.datePipe.transform(new Date(el.RentalEndDate), 'MM/dd/yyyy'))\r\n if (rentalEndDateRecord.length > 0)\r\n var rentalEndDate = rentalEndDateRecord[0].RentalEndDays;\r\n\r\n const rentEndPeriodIndex = this.weeklyMarketDays.findIndex(e=>e.RentalEndDays == rentalEndDate);\r\n const renewalStartWeek = this.weeklyMarketDays[rentEndPeriodIndex +1].RentalEndDays\r\n\r\n if (rentalStartDate && rentalEndDate) {\r\n var month = this.datePipe.transform(rentalEndDate.split('-')[1], 'MMM');\r\n switch (month.toLowerCase()) {\r\n case \"jan\":\r\n JanuaryMonthPresent = true;\r\n break;\r\n case \"feb\":\r\n FebruaryMonthPresent = true;\r\n break;\r\n case \"mar\":\r\n MarchMonthPresent = true;\r\n break;\r\n case \"apr\":\r\n AprilMonthPresent = true;\r\n break;\r\n case \"may\":\r\n MayMonthPresent = true;\r\n break;\r\n case \"jun\":\r\n JuneMonthPresent = true;\r\n break;\r\n case \"jul\":\r\n JulyMonthPresent = true;\r\n break;\r\n case \"aug\":\r\n AugustMonthPresent = true;\r\n break;\r\n case \"sep\":\r\n SeptemberMonthPresent = true;\r\n break;\r\n case \"oct\":\r\n OctoberMonthPresent = true;\r\n break;\r\n case \"nov\":\r\n NovemberMonthPresent = true;\r\n break;\r\n case \"dec\":\r\n DecemberMonthPresent = true;\r\n break;\r\n }\r\n\r\n const ob = {\r\n WeeklyRentalId: el.WeeklyRentalId,\r\n BoothNumber: el.BoothNumber,\r\n BoothType: el.BoothType,\r\n BoothTypeId: el.BoothTypeId,\r\n RentStartPeriod: rentalStartDate,\r\n RentEndPeriod: rentalEndDate,\r\n CurrentRentStartPeriod: this.weeklyMarketDays[0].RentalEndDays,\r\n CurrentRentEndPeriod: this.weeklyMarketDays[0].RentalEndDays,\r\n RentalSavedEndDate: rentalEndDate,\r\n Product: el.ProductId,\r\n ProductName: this.vendorProducts.filter(e=>e.ProductId == el.ProductId)[0]?.ProductName,\r\n Rent: this.customCurrency.transform('0.00'),\r\n SalesTax: this.customCurrency.transform('0.00'),\r\n CityTax: this.customCurrency.transform('0.00'),\r\n CurrentRent: this.customCurrency.transform(el.RentalCharge),\r\n CurrentSalesTax: this.customCurrency.transform(el.SalesTax),\r\n CurrentSecondTax: this.customCurrency.transform(el.SecLevelTax),\r\n Sunday: el.Sunday,\r\n Monday: el.Monday,\r\n Tuesday: el.Tuesday,\r\n Wednesday: el.Wednesday,\r\n Thursday: el.Thursday,\r\n Friday: el.Friday,\r\n Saturday: el.Saturday,\r\n WeekDay: marketDay,\r\n Reservation: el.BoothReserved,\r\n Drop: el.DoNotRenew,\r\n January: this.customCurrency.transform('0.00'),\r\n February: this.customCurrency.transform('0.00'),\r\n March: this.customCurrency.transform('0.00'),\r\n April: this.customCurrency.transform('0.00'),\r\n May: this.customCurrency.transform('0.00'),\r\n June: this.customCurrency.transform('0.00'),\r\n July: this.customCurrency.transform('0.00'),\r\n August: this.customCurrency.transform('0.00'),\r\n September: this.customCurrency.transform('0.00'),\r\n October: this.customCurrency.transform('0.00'),\r\n November: this.customCurrency.transform('0.00'),\r\n December: this.customCurrency.transform('0.00'),\r\n NewBooth: false,\r\n JanuaryMonthPresent: JanuaryMonthPresent,\r\n FebruaryMonthPresent: FebruaryMonthPresent,\r\n MarchMonthPresent: MarchMonthPresent,\r\n AprilMonthPresent: AprilMonthPresent,\r\n MayMonthPresent: MayMonthPresent,\r\n JuneMonthPresent: JuneMonthPresent,\r\n JulyMonthPresent: JulyMonthPresent,\r\n AugustMonthPresent: AugustMonthPresent,\r\n SeptemberMonthPresent: SeptemberMonthPresent,\r\n OctoberMonthPresent: OctoberMonthPresent,\r\n NovemberMonthPresent: NovemberMonthPresent,\r\n DecemberMonthPresent: DecemberMonthPresent,\r\n DisableJanMonth: true,\r\n DisableFebMonth: true,\r\n DisableMarMonth: true,\r\n DisableAprMonth: true,\r\n DisableMayMonth: true,\r\n DisableJunMonth: true,\r\n DisableJulMonth: true,\r\n DisableAugMonth: true,\r\n DisableSepMonth: true,\r\n DisableOctMonth: true,\r\n DisableNovMonth: true,\r\n DisableDecMonth: true,\r\n BookingCanExtend: true,\r\n RenewalStartWeek:renewalStartWeek,\r\n CWRenewalWeek:this.weeklyMarketDays[rentEndPeriodIndex +1].RentalEndDays,\r\n RentEndPeriodIndex:rentEndPeriodIndex\r\n }\r\n this.selectedWeeklyBooths.push(ob);\r\n }\r\n }\r\n });\r\n this.loaderIcon = Promise.resolve(false);\r\n this.handleWeeklyEndDateChange();\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n async handleWeeklyEndDateChange() {\r\n this.renewAllBoothsFromGrid = true;\r\n this.vendorRentalDays = [];\r\n this.marketDayCountForResale = 0;\r\n\r\n let rentalDates = this.calculateRentalDates();\r\n await this.processVendorRentalDays(rentalDates);\r\n }\r\n\r\n calculateRentalDates() {\r\n let rentalDates = [];\r\n const selectedBooths = this.selectedWeeklyBooths.filter(e => e.NewBooth || e.ExtendRental);\r\n \r\n selectedBooths.forEach(record => {\r\n const selectedDayOfWeek = this.getSelectedDayOfWeek(record);\r\n let currentDay = new Date(record.RentalStartDate);\r\n const endDate = new Date(record.RentalEndDate);\r\n \r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n rentalDates.push({ startDate: this.datePipe.transform(currentDay, 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n });\r\n \r\n return rentalDates;\r\n }\r\n\r\n getSelectedDayOfWeek(record) {\r\n return record.Sunday ? 0 :\r\n record.Monday ? 1 :\r\n record.Tuesday ? 2 :\r\n record.Wednesday ? 3 :\r\n record.Thursday ? 4 :\r\n record.Friday ? 5 :\r\n record.Saturday ? 6 : null;\r\n }\r\n\r\n async processVendorRentalDays(rentalDates) {\r\n rentalDates.forEach(date => {\r\n const targetDateString = this.datePipe.transform(date.startDate, \"MM/dd/yyyy\");\r\n if (!this.vendorRentalDays.some(el => this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\") === targetDateString)) {\r\n this.vendorRentalDays.push({ VendorRentalDate: targetDateString });\r\n this.marketDayCountForResale += 1;\r\n if (this.marketDayCountForResale > this.DaysSellWithoutResaleNumber && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n return;\r\n }\r\n }\r\n });\r\n \r\n const obj = { VendorID: this.vendorId, VendorRentalDate: new Date() };\r\n const res = await this.rentalService.getVendorRentalDays(obj).toPromise();\r\n \r\n if (res && res.length > 0) {\r\n res.forEach(el => {\r\n const targetDateString = this.datePipe.transform(el.VendorRentalDate, \"MM/dd/yyyy\");\r\n if (!this.vendorRentalDays.some(data => this.datePipe.transform(data.VendorRentalDate, \"MM/dd/yyyy\") === targetDateString)) {\r\n this.vendorRentalDays.push({ VendorRentalDate: targetDateString });\r\n this.marketDayCountForResale += 1;\r\n }\r\n });\r\n }\r\n \r\n await this.checkResaleAndBusinessLicense();\r\n }\r\n\r\n showModal(modal) {\r\n modal.classList.add('show');\r\n modal.style.display = 'block';\r\n }\r\n\r\n async checkResaleAndBusinessLicense() {\r\n if (this.ResaleNumberRequired && !this.exemptResale && !this.resaleNo && this.marketDayCountForResale > this.DaysSellWithoutResaleNumber && !this.resaleOptionSelected) {\r\n this.showModal(this.modalResaleNo.nativeElement);\r\n } else if (this.BusinessLicenseNumberRequired && this.marketDayCountForResale > this.DaysSellWithoutBusiLicNumber) {\r\n if (!this.businessLicenseNumber) {\r\n await this.promptBusinessLicense();\r\n } else if (!this.businessLicenseExpiryDate || new Date(this.businessLicenseExpiryDate) < new Date()) {\r\n await this.promptExpiredBusinessLicense();\r\n } else {\r\n this.renewWeeklyAllBooths();\r\n }\r\n } else {\r\n this.renewWeeklyAllBooths();\r\n }\r\n }\r\n\r\n async promptBusinessLicense() {\r\n const result = await Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Business License Number is required! Do you want to continue without Business License Number?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n });\r\n \r\n if (result.value) {\r\n this.renewWeeklyAllBooths();\r\n }\r\n } \r\n\r\n async promptExpiredBusinessLicense() {\r\n const result = await Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Business License is expired! Do you want to continue?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n });\r\n \r\n if (result.value) {\r\n this.renewWeeklyAllBooths();\r\n }\r\n }\r\n\r\n async renewWeeklyAllBooths(){\r\n var nonAvailableBooths = [];\r\n for (const item of this.selectedWeeklyBooths) {\r\n if (new Date(item.RentEndPeriod.split('-')[0]) < new Date(item.CWRenewalWeek.split('-')[0])\r\n && !item.Drop && item.Reservation) {\r\n if (item.WeeklyRentalId != 0)\r\n var recordExist = this.selectedWeeklyBooths.findIndex(e => e.RentStartPeriod == item.RentStartPeriod && e.RentEndPeriod == item.RentEndPeriod\r\n && e.BoothNumber == item.BoothNumber && e.WeeklyRentalId == item.WeeklyRentalId);\r\n else\r\n var recordExist = this.selectedWeeklyBooths.findIndex(e => e.RentStartPeriod == item.RentStartPeriod && e.RentEndPeriod == item.RentEndPeriod\r\n && e.BoothNumber == item.BoothNumber && e.RentalMarketDay == item.RentalMarketDay);\r\n\r\n if (recordExist != -1) {\r\n var marketDay;\r\n var selectedDayOfWeek;\r\n if (this.selectedWeeklyBooths[recordExist].Sunday == true) {\r\n marketDay = 'Sun'\r\n selectedDayOfWeek = 0;\r\n }\r\n else if (this.selectedWeeklyBooths[recordExist].Monday == true) {\r\n marketDay = 'Mon'\r\n selectedDayOfWeek = 1;\r\n }\r\n else if (this.selectedWeeklyBooths[recordExist].Tuesday == true) {\r\n marketDay = 'Tue'\r\n selectedDayOfWeek = 2;\r\n }\r\n else if (this.selectedWeeklyBooths[recordExist].Wednesday == true) {\r\n marketDay = 'Wed'\r\n selectedDayOfWeek = 3;\r\n }\r\n else if (this.selectedWeeklyBooths[recordExist].Thursday == true) {\r\n marketDay = 'Thu'\r\n selectedDayOfWeek = 4;\r\n }\r\n else if (this.selectedWeeklyBooths[recordExist].Friday == true) {\r\n marketDay = 'Fri'\r\n selectedDayOfWeek = 5;\r\n }\r\n else if (this.selectedWeeklyBooths[recordExist].Saturday == true) {\r\n marketDay = 'Sat'\r\n selectedDayOfWeek = 6;\r\n }\r\n\r\n var selectedRentalDates = [];\r\n const startDate = new Date(this.selectedWeeklyBooths[recordExist].RentStartPeriod.split('-')[0]);\r\n const endDate = new Date(item.CWRenewalWeek.split(\"-\")[1]);\r\n while (new Date(startDate) <= new Date(endDate)) {\r\n if (startDate.getDay() === selectedDayOfWeek) {\r\n selectedRentalDates.push(new Date(startDate));\r\n }\r\n startDate.setDate(startDate.getDate() + 1);\r\n }\r\n\r\n var currentRentedEndDate = new Date(this.selectedWeeklyBooths[recordExist].RentEndPeriod.split(\"-\")[1]);\r\n const filteredRentalDates = selectedRentalDates.filter(rentalDate => rentalDate > currentRentedEndDate);\r\n var obj1 = {\r\n RentalDates: filteredRentalDates,\r\n BoothNumber: this.selectedWeeklyBooths[recordExist].BoothNumber\r\n }\r\n\r\n const res = await this.rentalService.checkRentalExits(this.marketId,obj1).toPromise();\r\n if (!res.Success) {\r\n var RentAmount = this.selectedWeeklyBooths[recordExist].Rent;\r\n var SalesTax = this.selectedWeeklyBooths[recordExist].SalesTax;\r\n var CityTax = this.selectedWeeklyBooths[recordExist].CityTax;\r\n var JanRentAmount = this.selectedWeeklyBooths[recordExist].January ?? 0;\r\n var FebRentAmount = this.selectedWeeklyBooths[recordExist].February ?? 0;\r\n var MarRentAmount = this.selectedWeeklyBooths[recordExist].March ?? 0;\r\n var AprRentAmount = this.selectedWeeklyBooths[recordExist].April ?? 0;\r\n var MayRentAmount = this.selectedWeeklyBooths[recordExist].May ?? 0;\r\n var JunRentAmount = this.selectedWeeklyBooths[recordExist].June ?? 0;\r\n var JulRentAmount = this.selectedWeeklyBooths[recordExist].July ?? 0;\r\n var AugRentAmount = this.selectedWeeklyBooths[recordExist].August ?? 0;\r\n var SepRentAmount = this.selectedWeeklyBooths[recordExist].September ?? 0;\r\n var OctRentAmount = this.selectedWeeklyBooths[recordExist].October ?? 0;\r\n var NovRentAmount = this.selectedWeeklyBooths[recordExist].November ?? 0;\r\n var DecRentAmount = this.selectedWeeklyBooths[recordExist].December ?? 0;\r\n\r\n this.totalRentalCharge -= RentAmount.toString().includes('(') && RentAmount.toString().includes(')') ? -1 * parseFloat(RentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(RentAmount.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= SalesTax.toString().includes('(') && SalesTax.toString().includes(')') ? -1 * parseFloat(SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= CityTax.toString().includes('(') && CityTax.toString().includes(')') ? -1 * parseFloat(CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n\r\n var extendRentalStartPeriod;\r\n if (!this.selectedWeeklyBooths[recordExist].NewBooth && this.selectedWeeklyBooths[recordExist].Status != \"R\") {\r\n extendRentalStartPeriod = new Date(this.selectedWeeklyBooths[recordExist].RentalSavedEndDate.split(\"-\")[1])\r\n extendRentalStartPeriod.setDate(extendRentalStartPeriod.getDate() + 1);\r\n }\r\n else {\r\n extendRentalStartPeriod = new Date(this.selectedWeeklyBooths[recordExist].RentStartPeriod.split(\"-\")[0]);\r\n }\r\n\r\n var obj = {\r\n BoothTypeId: this.selectedWeeklyBooths[recordExist].BoothTypeId,\r\n VendorId: this.vendorId,\r\n RentalStartPeriod: new Date(extendRentalStartPeriod),\r\n RentalMarketDay: marketDay,\r\n RentalEndPeriod: new Date(item.CWRenewalWeek.split(\"-\")[1]),\r\n JanRent: JanRentAmount.toString().includes('(') && JanRentAmount.toString().includes(')') ? -1 * parseFloat(JanRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(JanRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n FebRent: FebRentAmount.toString().includes('(') && FebRentAmount.toString().includes(')') ? -1 * parseFloat(FebRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(FebRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n MarRent: MarRentAmount.toString().includes('(') && MarRentAmount.toString().includes(')') ? -1 * parseFloat(MarRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(MarRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n AprRent: AprRentAmount.toString().includes('(') && AprRentAmount.toString().includes(')') ? -1 * parseFloat(AprRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(AprRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n MayRent: MayRentAmount.toString().includes('(') && MayRentAmount.toString().includes(')') ? -1 * parseFloat(MayRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(MayRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n JunRent: JunRentAmount.toString().includes('(') && JunRentAmount.toString().includes(')') ? -1 * parseFloat(JunRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(JunRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n JulRent: JulRentAmount.toString().includes('(') && JulRentAmount.toString().includes(')') ? -1 * parseFloat(JulRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(JulRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n AugRent: AugRentAmount.toString().includes('(') && AugRentAmount.toString().includes(')') ? -1 * parseFloat(AugRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(AugRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n SepRent: SepRentAmount.toString().includes('(') && SepRentAmount.toString().includes(')') ? -1 * parseFloat(SepRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(SepRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n OctRent: OctRentAmount.toString().includes('(') && OctRentAmount.toString().includes(')') ? -1 * parseFloat(OctRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(OctRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n NovRent: NovRentAmount.toString().includes('(') && NovRentAmount.toString().includes(')') ? -1 * parseFloat(NovRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(NovRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n DecRent: DecRentAmount.toString().includes('(') && DecRentAmount.toString().includes(')') ? -1 * parseFloat(DecRentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(DecRentAmount.toString().replace(/[^0-9.-]/g, '')),\r\n }\r\n const res = await this.rentalService.getBoothRentalWeeklyCharges(this.marketId, obj).toPromise(); \r\n this.selectedWeeklyBooths[recordExist].RentEndPeriod = item.CWRenewalWeek;\r\n this.selectedWeeklyBooths[recordExist].January = this.customCurrency.transform(res.JanRent);\r\n this.selectedWeeklyBooths[recordExist].February = this.customCurrency.transform(res.FebRent);\r\n this.selectedWeeklyBooths[recordExist].March = this.customCurrency.transform(res.MarRent);\r\n this.selectedWeeklyBooths[recordExist].April = this.customCurrency.transform(res.AprRent);\r\n this.selectedWeeklyBooths[recordExist].May = this.customCurrency.transform(res.MayRent);\r\n this.selectedWeeklyBooths[recordExist].June = this.customCurrency.transform(res.JunRent);\r\n this.selectedWeeklyBooths[recordExist].July = this.customCurrency.transform(res.JulRent);\r\n this.selectedWeeklyBooths[recordExist].August = this.customCurrency.transform(res.AugRent);\r\n this.selectedWeeklyBooths[recordExist].September = this.customCurrency.transform(res.SepRent);\r\n this.selectedWeeklyBooths[recordExist].October = this.customCurrency.transform(res.OctRent);\r\n this.selectedWeeklyBooths[recordExist].November = this.customCurrency.transform(res.NovRent);\r\n this.selectedWeeklyBooths[recordExist].December = this.customCurrency.transform(res.DecRent);\r\n this.selectedWeeklyBooths[recordExist].Rent = this.customCurrency.transform(res.Rent);\r\n this.selectedWeeklyBooths[recordExist].SalesTax = this.customCurrency.transform(res.SalesTax);\r\n this.selectedWeeklyBooths[recordExist].CityTax = this.customCurrency.transform(res.CityTax);\r\n this.selectedWeeklyBooths[recordExist].JanuaryMonthPresent = res.JanuaryMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].FebruaryMonthPresent = res.FebruaryMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].MarchMonthPresent = res.MarchMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].AprilMonthPresent = res.AprilMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].MayMonthPresent = res.MayMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].JuneMonthPresent = res.JuneMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].JulyMonthPresent = res.JulyMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].AugustMonthPresent = res.AugustMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].SeptemberMonthPresent = res.SeptemberMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].OctoberMonthPresent = res.OctoberMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].NovemberMonthPresent = res.NovemberMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].DecemberMonthPresent = res.DecemberMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].DisableJanMonth = res.JanRent || res.JanRent == 0? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableFebMonth = res.FebRent || res.FebRent == 0? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableMarMonth = res.MarRent || res.MarRent == 0? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableAprMonth = res.AprRent || res.AprRent == 0? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableMayMonth = res.MayRent || res.MayRent == 0? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableJunMonth = res.JunRent || res.JunRent == 0? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableJulMonth = res.JulRent || res.JulRent == 0? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableAugMonth = res.AugRent || res.AugRent == 0? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableSepMonth = res.SepRent || res.SepRent == 0? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableOctMonth = res.OctRent || res.OctRent == 0? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableNovMonth = res.NovRent || res.NovRent == 0? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableDecMonth = res.DecRent || res.DecRent == 0? false : true;\r\n this.selectedWeeklyBooths[recordExist].ExtendRental = true;\r\n this.selectedWeeklyBooths[recordExist].TaxModel = res.TaxModel;\r\n\r\n this.totalRentalCharge += res.Rent.toString().includes('(') && res.Rent.toString().includes(')') ? -1 * parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n }\r\n else {\r\n nonAvailableBooths.push(this.selectedWeeklyBooths[recordExist].BoothNumber);\r\n } \r\n }\r\n }\r\n }\r\n\r\n if (nonAvailableBooths.length > 0) {\r\n const nonAvailableBoothsString = nonAvailableBooths.join(', ');\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Cannot be renewed further as the booth number ` + nonAvailableBoothsString + ` is not available`,\r\n icon: \"info\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n }\r\n\r\n getWeeklyOtherRentals(){\r\n this.loaderIcon = Promise.resolve(true);\r\n this.selectedOtherItems = [];\r\n const weekStartDate = this.weeklyMarketDays[0].RentalStartDays.split('-')[0];\r\n const weekEndDate = this.weeklyMarketDays[0].RentalStartDays.split('-')[1]; \r\n const sub = this.rentalService.getWeeklyOtherRentals(this.marketId,this.vendorId).subscribe((res: any[]) => {\r\n this.allrentedOtherItems = res;\r\n if (res) {\r\n res.forEach((el) => {\r\n var RentalWeekRecord = this.weeklyMarketDays.filter(date => this.datePipe.transform(new Date(date.RentalStartDays.split('-')[0]), 'MM/dd/yyyy') <= this.datePipe.transform(new Date(el.RentalWeekDay), 'MM/dd/yyyy')\r\n && this.datePipe.transform(new Date(date.RentalStartDays.split('-')[1]), 'MM/dd/yyyy') >= this.datePipe.transform(new Date(el.RentalWeekDay), 'MM/dd/yyyy'))\r\n if (RentalWeekRecord.length > 0)\r\n var RentalWeek = RentalWeekRecord[0].RentalStartDays;\r\n const rentEndPeriodIndex = this.weeklyMarketDays.findIndex(e=>e.RentalEndDays == RentalWeek);\r\n const renewalStartWeek = this.weeklyMarketDays[rentEndPeriodIndex +1].RentalEndDays;\r\n\r\n if (new Date(el.RentalWeekDay) >= new Date(weekStartDate)) {\r\n const index = this.selectedOtherItems.findIndex(item => item.Id === el.OtherItemId && item.RentalWeek == el.RentalWeek && item.Reference == el.Reference && item.BoothNo == el.BoothNumber && item.Recurring == el.Recurring);\r\n if (index !== -1) {\r\n this.selectedOtherItems[index].Quantity += el.Quantity;\r\n this.selectedOtherItems[index].WeeklyOtherRentalIds += ',' + el.OtherRentalId\r\n }\r\n const ob = {\r\n Id: el.OtherItemId,\r\n WeekOtherRentalId: el.OtherRentalId,\r\n OtherItem: el.OtherItemName,\r\n OtherItemCharge: this.customCurrency.transform('0'),\r\n Quantity: el.Quantity,\r\n OtherItemtotal: this.customCurrency.transform('0'),\r\n RentalWeek: RentalWeek,\r\n SalesTax: this.customCurrency.transform('0'),\r\n CityTax: this.customCurrency.transform('0'),\r\n CurrentRentalWeek: RentalWeek,\r\n CurrentOtherItemtotal: this.customCurrency.transform(el.OtherCharge.toString()),\r\n CurrentSalesTax: this.customCurrency.transform(el.SalesTax.toString()),\r\n CurrentSecLevelTax: this.customCurrency.transform(el.SecLevelTax.toString()),\r\n BoothNo: el.BoothNumber,\r\n Recurring: el.Recurring,\r\n NewItem: false,\r\n Reference: el.Reference,\r\n WeeklyOtherRentalIds: el.OtherRentalId.toString(),\r\n Status: \"B\",\r\n RentEndPeriodIndex: rentEndPeriodIndex,\r\n RenewalStartWeek: renewalStartWeek,\r\n CWRenewalWeek: renewalStartWeek,\r\n BookingCanExtend: true\r\n }\r\n this.selectedOtherItems.push(ob);\r\n }\r\n else {\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: el.OtherItemId,\r\n VendorId: this.vendorId,\r\n Quantity: el.Quantity,\r\n OtherItemCharge: el.OtherCharge\r\n }\r\n\r\n this.rentalService.getOtherItemsRentalCharges(obj).subscribe((res: any) => {\r\n const ob = {\r\n Id: el.OtherItemId,\r\n MonthOtherRentalId: el.OtherRentalId,\r\n OtherItem: el.OtherItemName,\r\n OtherItemCharge: this.customCurrency.transform(el.OtherCharge),\r\n Quantity: el.Quantity,\r\n OtherItemtotal: this.customCurrency.transform((el.OtherCharge * el.Quantity).toString()),\r\n RentalWeek: this.weeklyMarketDays[0].RentalStartDays,\r\n SalesTax: this.customCurrency.transform(res.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(res.CityTax.toString()),\r\n BoothNo: el.BoothNumber ? el.BoothNumber : \"none\",\r\n Recurring: el.Recurring,\r\n Reference: el.Reference,\r\n NewItem: false,\r\n MonthlyRentalIds: '',\r\n Status: \"R\",\r\n RentEndPeriodIndex:rentEndPeriodIndex\r\n }\r\n this.selectedOtherItems.push(ob);\r\n const OtherItemtotal = el.OtherCharge * el.Quantity;\r\n this.totalOtherRentalCharge += OtherItemtotal;\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n otherCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n });\r\n }\r\n });\r\n this.renewWeeklyOtherCharges();\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n renewWeeklyOtherCharges() {\r\n if (this.selectedOtherItems.length > 0) {\r\n this.proceedRenewingWeeklyOtherCharges();\r\n }\r\n }\r\n\r\n updateWeeklyRentalRecord(record) {\r\n if (record.Reservation && this.allowWeeklyRentalRenewal) {\r\n const rentEndPeriodIndex = this.weeklyMarketDays.findIndex(e => e.RentalEndDays == record.RentEndPeriod);\r\n const renewalStartWeek = this.weeklyMarketDays[rentEndPeriodIndex + 1].RentalEndDays;\r\n record.BookingCanExtend = true;\r\n record.RenewalStartWeek = renewalStartWeek\r\n record.CWRenewalWeek = renewalStartWeek;\r\n record.RentEndPeriodIndex = rentEndPeriodIndex\r\n this.extendWeeklyRental(record);\r\n }\r\n else {\r\n record.BookingCanExtend = false;\r\n record.RenewalStartWeek = \"This booking cannot be extended further!\";\r\n record.CWRenewalWeek = record.CurrentRentEndPeriod;\r\n record.RentEndPeriod = record.CurrentRentEndPeriod;\r\n this.totalRentalCharge -= record.Rent.toString().includes('(') && record.Rent.toString().includes(')') ? -1 * parseFloat(record.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= record.SalesTax.toString().includes('(') && record.SalesTax.toString().includes(')') ? -1 * parseFloat(record.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= record.CityTax.toString().includes('(') && record.CityTax.toString().includes(')') ? -1 * parseFloat(record.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n record.Rent = this.customCurrency.transform(\"0\");\r\n }\r\n }\r\n\r\n extendWeeklyRental(extendRentalRecord) {\r\n if (extendRentalRecord) {\r\n var recordExist = this.selectedWeeklyBooths.findIndex(e => e.RentStartPeriod == extendRentalRecord.RentStartPeriod && e.RentEndPeriod == extendRentalRecord.RentEndPeriod\r\n && e.BoothNumber == extendRentalRecord.BoothNumber)\r\n if (recordExist != -1) {\r\n const rentalDates = [];\r\n const currentMonthRentalDates = [];\r\n var rentalstartDate;\r\n var marketDays = 0;\r\n var marketDay;\r\n \r\n if (this.selectedWeeklyBooths[recordExist].Sunday == true) {\r\n marketDay = 'Sun'\r\n }\r\n else if (this.selectedWeeklyBooths[recordExist].Monday == true) {\r\n marketDay = 'Mon'\r\n }\r\n else if (this.selectedWeeklyBooths[recordExist].Tuesday == true) {\r\n marketDay = 'Tue'\r\n }\r\n else if (this.selectedWeeklyBooths[recordExist].Wednesday == true) {\r\n marketDay = 'Wed'\r\n }\r\n else if (this.selectedWeeklyBooths[recordExist].Thursday == true) {\r\n marketDay = 'Thu'\r\n }\r\n else if (this.selectedWeeklyBooths[recordExist].Friday == true) {\r\n marketDay = 'Fri'\r\n }\r\n else if (this.selectedWeeklyBooths[recordExist].Saturday == true) {\r\n marketDay = 'Sat'\r\n }\r\n\r\n var RentAmount = this.selectedWeeklyBooths[recordExist].Rent;\r\n var SalesTax = this.selectedWeeklyBooths[recordExist].SalesTax;\r\n var CityTax = this.selectedWeeklyBooths[recordExist].CityTax;\r\n\r\n this.totalRentalCharge -= RentAmount.toString().includes('(') && RentAmount.toString().includes(')') ? -1 * parseFloat(RentAmount.toString().replace(/[^0-9.-]/g, '')) : parseFloat(RentAmount.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= SalesTax.toString().includes('(') && SalesTax.toString().includes(')') ? -1 * parseFloat(SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= CityTax.toString().includes('(') && CityTax.toString().includes(')') ? -1 * parseFloat(CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n\r\n var extendRentalStartPeriod;\r\n if (!this.selectedWeeklyBooths[recordExist].NewBooth && this.selectedWeeklyBooths[recordExist].Status != \"R\") {\r\n extendRentalStartPeriod = new Date(this.selectedWeeklyBooths[recordExist].RentalSavedEndDate.split(\"-\")[1]);\r\n extendRentalStartPeriod.setDate(extendRentalStartPeriod.getDate() + 1);\r\n }\r\n else {\r\n extendRentalStartPeriod = new Date(this.selectedWeeklyBooths[recordExist].RentStartPeriod.split(\"-\")[0]);\r\n }\r\n\r\n var obj = {\r\n BoothTypeId: this.selectedWeeklyBooths[recordExist].BoothTypeId,\r\n VendorId: this.vendorId,\r\n RentalMarketDay: marketDay,\r\n RentalStartPeriod: new Date(extendRentalStartPeriod),\r\n RentalEndPeriod: new Date(extendRentalRecord.CWRenewalWeek.split(\"-\")[1]),\r\n PerDiemApplicable: false\r\n }\r\n this.rentalService.getBoothRentalWeeklyCharges(this.marketId,obj).subscribe((res: any) => {\r\n this.selectedWeeklyBooths[recordExist].RentEndPeriod =extendRentalRecord.CWRenewalWeek;\r\n this.selectedWeeklyBooths[recordExist].January = this.customCurrency.transform(res.JanRent);\r\n this.selectedWeeklyBooths[recordExist].February = this.customCurrency.transform(res.FebRent);\r\n this.selectedWeeklyBooths[recordExist].March = this.customCurrency.transform(res.MarRent);\r\n this.selectedWeeklyBooths[recordExist].April = this.customCurrency.transform(res.AprRent);\r\n this.selectedWeeklyBooths[recordExist].May = this.customCurrency.transform(res.MayRent);\r\n this.selectedWeeklyBooths[recordExist].June = this.customCurrency.transform(res.JunRent);\r\n this.selectedWeeklyBooths[recordExist].July = this.customCurrency.transform(res.JulRent);\r\n this.selectedWeeklyBooths[recordExist].August = this.customCurrency.transform(res.AugRent);\r\n this.selectedWeeklyBooths[recordExist].September = this.customCurrency.transform(res.SepRent);\r\n this.selectedWeeklyBooths[recordExist].October = this.customCurrency.transform(res.OctRent);\r\n this.selectedWeeklyBooths[recordExist].November = this.customCurrency.transform(res.NovRent);\r\n this.selectedWeeklyBooths[recordExist].December = this.customCurrency.transform(res.DecRent);\r\n this.selectedWeeklyBooths[recordExist].Rent = this.customCurrency.transform(res.Rent);\r\n this.selectedWeeklyBooths[recordExist].SalesTax = this.customCurrency.transform(res.SalesTax);\r\n this.selectedWeeklyBooths[recordExist].CityTax = this.customCurrency.transform(res.CityTax);\r\n this.selectedWeeklyBooths[recordExist].JanuaryMonthPresent = res.JanuaryMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].FebruaryMonthPresent = res.FebruaryMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].MarchMonthPresent = res.MarchMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].AprilMonthPresent = res.AprilMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].MayMonthPresent = res.MayMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].JuneMonthPresent = res.JuneMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].JulyMonthPresent = res.JulyMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].AugustMonthPresent = res.AugustMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].SeptemberMonthPresent = res.SeptemberMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].OctoberMonthPresent = res.OctoberMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].NovemberMonthPresent = res.NovemberMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].DecemberMonthPresent = res.DecemberMonthPresent;\r\n this.selectedWeeklyBooths[recordExist].DisableJanMonth = res.JanRent || res.JanRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableFebMonth = res.FebRent || res.FebRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableMarMonth = res.MarRent || res.MarRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableAprMonth = res.AprRent || res.AprRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableMayMonth = res.MayRent || res.MayRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableJunMonth = res.JunRent || res.JunRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableJulMonth = res.JulRent || res.JulRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableAugMonth = res.AugRent || res.AugRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableSepMonth = res.SepRent || res.SepRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableOctMonth = res.OctRent || res.OctRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableNovMonth = res.NovRent || res.NovRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].DisableDecMonth = res.DecRent || res.DecRent == 0 ? false : true;\r\n this.selectedWeeklyBooths[recordExist].ExtendRental = true;\r\n\r\n this.totalRentalCharge += res.Rent.toString().includes('(') && res.Rent.toString().includes(')') ? -1 * parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.Rent.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n rentalCharge: this.customCurrency.transform(this.totalRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n }); \r\n }\r\n }\r\n }\r\n\r\n extendWeeklyOtherRental(item) {\r\n const cuurentWeek = new Date(item.RentalWeek.split('-')[1]);\r\n if (cuurentWeek < new Date(item.CWRenewalWeek.split('-')[1]) && item.Recurring && this.allowWeeklyRentalRenewal) {\r\n var nextDate = this.addDays(new Date(item.RentalWeek.split('-')[0]), 7);\r\n var rentalWeekDate = this.weeklyMarketDays.filter(date => this.datePipe.transform(new Date(date.RentalEndDays.split('-')[0]), 'MM/dd/yyyy') <= this.datePipe.transform(new Date(nextDate), 'MM/dd/yyyy')\r\n && this.datePipe.transform(new Date(date.RentalEndDays.split('-')[1]), 'MM/dd/yyyy') >= this.datePipe.transform(new Date(nextDate), 'MM/dd/yyyy'))\r\n if (rentalWeekDate.length > 0)\r\n var rentalStartWeek = rentalWeekDate[0].RentalStartDays;\r\n\r\n var otherItemCharge = this.otherItemList.filter(e => e.Id == item.Id)[0].OtherItemCharge;\r\n if (!this.masterRentChargeforResOtherItems && this.allrentedOtherItems.length > 0) {\r\n otherItemCharge = this.customCurrency.transform(this.allrentedOtherItems.filter(e => e.OtherItemId == item.Id)[0].OtherCharge);\r\n }\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: item.Id,\r\n VendorId: this.vendorId,\r\n Quantity: item.Quantity,\r\n OtherItemCharge: otherItemCharge.includes('(') && otherItemCharge.includes(')') ? (-1) * parseFloat(otherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(otherItemCharge.replace(/[^0-9.-]/g, ''))\r\n }\r\n\r\n this.rentalService.getOtherItemsRentalCharges(obj).subscribe((res: any) => {\r\n const isNegative = otherItemCharge.includes('(') && otherItemCharge.includes(')');\r\n const totalValue = parseFloat(otherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n item.OtherItemtotal =this.customCurrency.transform((parseFloat(item.OtherItemtotal.replace(/[^0-9.-]/g, '')) + (finalCharge * item.Quantity)).toString());\r\n item.Quantity += item.Quantity;\r\n item.OtherItemCharge = otherItemCharge;\r\n item.MonthlyRentalIds += ',' + item.Id\r\n item.CWRenewalWeek = rentalStartWeek;\r\n\r\n this.totalOtherRentalCharge += item.OtherItemtotal.toString().includes('(') && item.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(item.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n otherCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n });\r\n }\r\n else {\r\n item.BookingCanExtend = false;\r\n item.RenewalStartMonth = \"This booking cannot be extended further!\";\r\n item.CMRenewalMonth = item.RentalMonth;\r\n }\r\n }\r\n\r\n updateWeeklyOtherItemRecord(record){\r\n if (record.Recurring && this.allowOtherItemRenewal) {\r\n const rentEndPeriodIndex = this.weeklyMarketDays.findIndex(e => e.RentalEndDays == record.RentalWeek);\r\n const renewalStartWeek = this.weeklyMarketDays[rentEndPeriodIndex + 1].RentalEndDays;\r\n record.BookingCanExtend = true;\r\n record.RenewalStartWeek = renewalStartWeek\r\n record.CWRenewalWeek = renewalStartWeek;\r\n record.RentEndPeriodIndex = rentEndPeriodIndex\r\n this.extendWeeklyOtherRental(record);\r\n }\r\n else {\r\n record.BookingCanExtend = false;\r\n record.RenewalStartWeek = \"This booking cannot be extended further!\";\r\n record.CWRenewalWeek = record.RentalWeek;\r\n this.totalOtherRentalCharge -= record.OtherItemtotal.toString().includes('(') && record.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(record.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax -= record.SalesTax.toString().includes('(') && record.SalesTax.toString().includes(')') ? -1 * parseFloat(record.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax -= record.CityTax.toString().includes('(') && record.CityTax.toString().includes(')') ? -1 * parseFloat(record.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(record.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n otherCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n record.Rent = this.customCurrency.transform(\"0\");\r\n }\r\n }\r\n\r\n addDays(date: Date, days: number): Date {\r\n const result = new Date(date);\r\n result.setDate(result.getDate() + days);\r\n return result;\r\n }\r\n \r\n proceedRenewingWeeklyOtherCharges(){\r\n for(const item of this.selectedOtherItems){\r\n if (new Date(item.RentalWeek.split('-')[0]) < new Date(item.CWRenewalWeek.split('-')[0])\r\n && item.Recurring && this.allowOtherItemRenewal) {\r\n var nextDate = this.addDays(new Date(item.RentalWeek.split('-')[0]), 7);\r\n var rentalWeekDate = this.weeklyMarketDays.filter(date => this.datePipe.transform(new Date(date.RentalEndDays.split('-')[0]), 'MM/dd/yyyy') <= this.datePipe.transform(new Date(nextDate), 'MM/dd/yyyy')\r\n && this.datePipe.transform(new Date(date.RentalEndDays.split('-')[1]), 'MM/dd/yyyy') >= this.datePipe.transform(new Date(nextDate), 'MM/dd/yyyy'))\r\n if (rentalWeekDate.length > 0)\r\n var rentalStartWeek = rentalWeekDate[0].RentalStartDays;\r\n\r\n var recordExist = this.selectedOtherItems.findIndex(e => e.RentalWeek == rentalStartWeek && e.Id == item.Id && e.Reference == item.Reference && e.BoothNumber == item.item.BoothNo)\r\n var otherItemCharge = this.otherItemList.filter(e => e.Id == item.Id)[0].OtherItemCharge;\r\n if (!this.masterRentChargeforResOtherItems && this.allrentedOtherItems.length > 0) {\r\n otherItemCharge = this.customCurrency.transform(this.allrentedOtherItems.filter(e => e.OtherItemId == item.Id)[0].OtherCharge);\r\n }\r\n var obj = {\r\n MarketId: this.marketId,\r\n OtherItemId: item.Id,\r\n VendorId: this.vendorId,\r\n Quantity: item.Quantity,\r\n OtherItemCharge: otherItemCharge.includes('(') && otherItemCharge.includes(')') ? (-1) * parseFloat(otherItemCharge.replace(/[^0-9.-]/g, '')) : parseFloat(otherItemCharge.replace(/[^0-9.-]/g, ''))\r\n }\r\n this.rentalService.getOtherItemsRentalCharges(obj).subscribe((res: any) => {\r\n if (recordExist == -1) {\r\n const isNegative = otherItemCharge.includes('(') && otherItemCharge.includes(')');\r\n const totalValue = parseFloat(otherItemCharge.replace(/[^0-9.-]/g, ''));\r\n const finalCharge = isNegative ? -totalValue : totalValue;\r\n item.OtherItemtotal = this.customCurrency.transform((finalCharge * item.Quantity).toString());\r\n const ob = {\r\n Id: item.Id,\r\n WeekOtherRentalId: 0,\r\n OtherItem: item.OtherItem,\r\n OtherItemCharge: otherItemCharge,\r\n Quantity: item.Quantity,\r\n OtherItemtotal: item.OtherItemtotal,\r\n RentalWeek: rentalStartWeek,\r\n SalesTax: this.customCurrency.transform(res.SalesTax.toString()),\r\n CityTax: this.customCurrency.transform(res.CityTax.toString()),\r\n BoothNo: item.othChgBooths ?? \"none\",\r\n Recurring: item.Recurring,\r\n NewItem: true,\r\n Reference: item.Reference,\r\n WeeklyOtherRentalIds: ''\r\n }\r\n this.selectedOtherItems.push(JSON.parse(JSON.stringify(ob)));\r\n }\r\n this.totalOtherRentalCharge += item.OtherItemtotal.toString().includes('(') && item.OtherItemtotal.toString().includes(')') ? -1 * parseFloat(item.OtherItemtotal.toString().replace(/[^0-9.-]/g, '')) : parseFloat(item.OtherItemtotal.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSalesTax += res.SalesTax.toString().includes('(') && res.SalesTax.toString().includes(')') ? -1 * parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.SalesTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalSecondLeveltax += res.CityTax.toString().includes('(') && res.CityTax.toString().includes(')') ? -1 * parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, '')) : parseFloat(res.CityTax.toString().replace(/[^0-9.-]/g, ''));\r\n this.totalCharge = this.priorBalance + this.totalRentalCharge + this.totalOtherRentalCharge + this.totalSalesTax + this.totalSecondLeveltax;\r\n this.bookingDetailsForm.patchValue({\r\n totalOtherRentalCharge: this.customCurrency.transform(this.totalOtherRentalCharge.toString()),\r\n totalSalesTax: this.customCurrency.transform(this.totalSalesTax.toString()),\r\n totalSecondLeveltax: this.customCurrency.transform(this.totalSecondLeveltax.toString()),\r\n totalCharge: this.customCurrency.transform(this.totalCharge.toString())\r\n });\r\n });\r\n }\r\n else{\r\n item.BookingCanExtend = false;\r\n item.RenewalStartWeek = \"This booking cannot be extended further!\";\r\n item.CWRenewalWeek = item.RentalWeek;\r\n }\r\n }\r\n }\r\n \r\n ngOnDestroy(): void {\r\n this.subscriptions.forEach((subscription) => {\r\n if (subscription) {\r\n subscription.unsubscribe();\r\n }\r\n });\r\n }\r\n}\r\n\r\n","\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n Booths can be rented\r\n for single or multiple market days on a one time\r\n basis.\r\n Booths can be rented for\r\n one market day per week on permanent monthly basis.\r\n Booths can be rented for\r\n one market day in the week on permanent weekly basis.\r\n Booth can be rented\r\n for all market days in the month on monthly basis.\r\n Booths can be rented\r\n for all market days in the week on weekly basis. \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n Enter valid work\r\n phone number\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n Enter valid cell\r\n phone number\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n Enter valid Email ID\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, ElementRef, Input, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core';\r\nimport { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';\r\nimport { ActivatedRoute, Params, Router } from '@angular/router';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { forkJoin, Subscription } from 'rxjs';\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\nimport { RentalService } from 'src/app/services/Rental.service';\r\nimport { VendorService } from 'src/app/services/Vendor.service';\r\nimport { SharedDataService } from 'src/app/Shared/SharedData.service';\r\nimport Swal from 'sweetalert2';\r\n\r\n@Component({\r\n selector: 'app-rent-online',\r\n templateUrl: './rent-online.component.html',\r\n styleUrls: ['./rent-online.component.scss']\r\n})\r\nexport class RentOnlineComponent implements OnInit, OnDestroy {\r\n showrentOnline: boolean = true;\r\n showContactInfo: boolean = false;\r\n showLoginInfo:boolean=false;\r\n showBookings:boolean=false;\r\n showReviewRegistration:boolean=false;\r\n IsVendorLogin:boolean=true;\r\n pageName:string=\"Rent Online\";\r\n currentPassword: string = null;\r\n @ViewChild('btnRentOnline') btnRentOnline!: ElementRef;\r\n @ViewChild('ContactInfo') ContactInfo!: ElementRef;\r\n @ViewChild('btnLoginInfo') btnLoginInfo!: ElementRef;\r\n @ViewChild('btnBookings') btnBookings!: ElementRef;\r\n @ViewChild('btnRegistration') btnRegistration!: ElementRef;\r\n marketId;\r\n rentalForm: FormGroup; \r\n public loaderIcon: Promise; \r\n AllowBookingsCw = false;\r\n AllowBookingsWeekly = false;\r\n AllowBookingsCm = false;\r\n AllowBookingsMonthly = false;\r\n AllowBookingsDaily = false;\r\n AllowRenewalsCw = false;\r\n AllowRenewalsWeekly = false;\r\n AllowRenewalsCm = false;\r\n AllowRenewalsMonthly = false;\r\n paymentOnly = false;\r\n private subscriptions: Subscription[] = [];\r\n defaultRentalTypeSelected;\r\n marketName = \"\";\r\n stateList = [];\r\n countryList = [];\r\n vendorId;\r\n vendorInfo;\r\n enabledRentalTypes = [];\r\n showStateDropDown;\r\n securityQuestion = [];\r\n showCellPhoneError = false;\r\n showWorkPhoneError = false;\r\n vendorMarketID = \"\";\r\n anyRentalTypeEnabledForBooking = true;\r\n selected='1';\r\n toasterConfig = {\r\n closeButton: true,\r\n timeOut: 4500,\r\n easing: 'ease-out',\r\n progressBar: true,\r\n positionClass: 'toast-top-right',\r\n tapToDismiss: true,\r\n showEasing: 'swing',\r\n hideEasing: 'linear',\r\n showMethod: 'fadeIn',\r\n hideMethod: 'slideUp'\r\n };\r\n vendorName;\r\n bookingPage=\"\";\r\n bookingPageRentalType = \"\";\r\n public PhoneNumberMask: String = '000-000-0000';\r\n public ZipCodeMask: String = '00000-0000';\r\n emailIdsPattern = '^(([\\\\w+-.%]+)@([\\\\w-.]+)\\\\.([A-Za-z]{2,}))([\\\\s]?[,;]{1}[\\\\s]?([\\\\w+-.%]+)@([\\\\w-.]+)\\\\.([A-Za-z]{2,})){0,4}$';\r\n constructor(private renderer: Renderer2,\r\n private formbuilder: FormBuilder,\r\n private vendorService:VendorService,\r\n private route: ActivatedRoute,\r\n private sharedDataService: SharedDataService,\r\n public router: Router,\r\n public rentalService: RentalService,\r\n private toastr: ToastrService,\r\n private marketInfoService: MarketInfoService\r\n ) {\r\n this.rentalForm = this.formbuilder.group({\r\n rentalTypes: [\"1\"],\r\n contactInfoForm: this.formbuilder.group({\r\n firstName: ['',[Validators.required]],\r\n lastName: ['',[Validators.required]],\r\n companyName: [''],\r\n address: ['',[Validators.required]],\r\n city: ['',[Validators.required]],\r\n state: ['',[Validators.required]],\r\n country: ['',[Validators.required]],\r\n postalCode: ['',[Validators.required]],\r\n workPhone: ['',[Validators.minLength(10),Validators.maxLength(12)]],\r\n cellPhone: ['',[Validators.required,Validators.minLength(10),Validators.maxLength(12)]],\r\n email: [['', this.noWhitespaceValidator, Validators.pattern(this.emailIdsPattern)],[Validators.required]],\r\n }),\r\n onlineLoginForm: this.formbuilder.group({\r\n onlineUserName: [''],\r\n onlinePassword: [''],\r\n confirmPassword: [''],\r\n securityQuestions: [''],\r\n securityAnswer: ['']\r\n }), \r\n bookingRentalTypes: [''] \r\n })\r\n }\r\n passwordFieldType: string = 'password';\r\n togglePasswordVisibility(): void {\r\n this.passwordFieldType = this.passwordFieldType === 'password' ? 'text' : 'password';\r\n }\r\n\r\n ngOnInit(): void {\r\n this.route.params.subscribe((params: Params) => {\r\n this.marketId = params['marketId'];\r\n this.vendorId= params['vendorId'];\r\n this.bookingPage = params['bookingpage'];\r\n this.marketInfoService.setMarketId(this.marketId);\r\n this.bookingPageRentalType = params['rentaltype'];\r\n if(this.bookingPage == \"br\"){\r\n this.MyBookings();\r\n }\r\n });\r\n this.getStatesAndCountries();\r\n this.getMarketDetails();\r\n this.getWebRentalSetting(); \r\n\r\n this.rentalForm.get('bookingRentalTypes')?.valueChanges.subscribe(value => {\r\n this.refreshBookingDetails();\r\n });\r\n }\r\n\r\n public noWhitespaceValidator(control: FormControl) {\r\n if ((control.value !== '') && (control.value !== null)) {\r\n if (control.value) {\r\n const isWhitespace = (control.value).trim().length === 0;\r\n const isValid = !isWhitespace;\r\n return isValid ? null : { 'whitespace': true };\r\n }\r\n }\r\n }\r\n\r\n restrictSpace(eve) {\r\n if (eve.which === 32) {\r\n eve.preventDefault();\r\n }\r\n }\r\n \r\n refreshBookingDetails() {\r\n if (this.showBookings) {\r\n this.showBookings = false;\r\n setTimeout(() => {\r\n this.showBookings = true;\r\n }, 0);\r\n }\r\n }\r\n\r\n onKeyUp(field: string) {\r\n const phoneControl = this.rentalForm.controls['contactInfoForm'].get(field);\r\n if (field === 'cellPhone') {\r\n this.showCellPhoneError = phoneControl && phoneControl.invalid && phoneControl.touched;\r\n } else if (field === 'workPhone') {\r\n this.showWorkPhoneError = phoneControl && phoneControl.invalid && phoneControl.touched;\r\n }\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.renderer.setStyle(this.btnRentOnline.nativeElement, 'background-color', '#DDEBFC');\r\n }\r\n\r\n getMarketDetails() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.marketInfoService.getMarketDetails(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.marketName = res.MarketName;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n } \r\n\r\n onCountryChange() { \r\n this.showStateDropDown = true;\r\n if (this.rentalForm.value['country'] == 2) {\r\n this.showStateDropDown = false;\r\n } \r\n }\r\n\r\n getStatesAndCountries() {\r\n forkJoin({\r\n resCountries: this.vendorService.getCountries(),\r\n resStates: this.vendorService.getUSStates(),\r\n resSecurityQuestion :this.vendorService.getVendorLoginSecurityQuestion()\r\n }).subscribe(({ resCountries, resStates,resSecurityQuestion }) => {\r\n if (resCountries) {\r\n this.countryList = resCountries;\r\n }\r\n if (resStates) {\r\n this.stateList = resStates;\r\n }\r\n if(resSecurityQuestion){\r\n this.securityQuestion = resSecurityQuestion;\r\n }\r\n this.getVendorInfobyId();\r\n this.getVendorLoginInfo();\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n }\r\n\r\n getVendorInfobyId() {\r\n this.vendorService.GetVendorById(this.vendorId, this.marketId).subscribe((response) => {\r\n if (response) {\r\n this.vendorInfo = response.body;\r\n this.vendorMarketID = this.vendorInfo.MarketVendorId;\r\n this.vendorName = this.vendorInfo.VendorName\r\n this.rentalForm.controls['contactInfoForm'].get('firstName').setValue(this.vendorInfo.FirstName); \r\n this.rentalForm.controls['contactInfoForm'].get('lastName').setValue(this.vendorInfo.LastName);\r\n this.rentalForm.controls['contactInfoForm'].get('companyName').setValue(this.vendorInfo.CompanyName);\r\n this.rentalForm.controls['contactInfoForm'].get('address').setValue(this.vendorInfo.Address);\r\n this.rentalForm.controls['contactInfoForm'].get('city').setValue(this.vendorInfo.City);\r\n this.rentalForm.controls['contactInfoForm'].get('state').setValue(this.vendorInfo.State);\r\n this.rentalForm.controls['contactInfoForm'].get('country').setValue(this.vendorInfo.CountryCode);\r\n this.rentalForm.controls['contactInfoForm'].get('postalCode').setValue(this.vendorInfo.ZipCode);\r\n this.rentalForm.controls['contactInfoForm'].get('workPhone').setValue(this.vendorInfo.WorkPhone);\r\n this.rentalForm.controls['contactInfoForm'].get('cellPhone').setValue(this.vendorInfo.CellPhone);\r\n this.rentalForm.controls['contactInfoForm'].get('email').setValue(this.vendorInfo.Email);\r\n this.onCountryChange();\r\n }\r\n }, (err) => {\r\n });\r\n }\r\n\r\n getVendorLoginInfo() {\r\n this.vendorService.getVendorLoginInfo(this.vendorId, this.marketId).subscribe((response:any) => {\r\n if (response) {\r\n this.currentPassword = response.OnlinePassword;\r\n this.rentalForm.controls['onlineLoginForm'].patchValue({\r\n onlineUserName: response.OnlineUserId,\r\n onlinePassword: response.OnlinePassword,\r\n confirmPassword: response.OnlinePassword,\r\n securityQuestions: response.SecurityQuestionId,\r\n securityAnswer: response.SecurityQuestionAnswer\r\n })\r\n }\r\n }, (err) => {\r\n console.log(err);\r\n });\r\n }\r\n\r\n saveVendorLoginDetail() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const check = this.checkValidations();\r\n if (!check) {\r\n this.loaderIcon = Promise.resolve(false);\r\n return\r\n }\r\n var obj ={\r\n VendorId: this.vendorId,\r\n VendorName: this.vendorName,\r\n OnlineUserId: this.rentalForm.controls['onlineLoginForm'].value['onlineUserName'],\r\n OnlinePassword: this.rentalForm.controls['onlineLoginForm'].value['onlinePassword'],\r\n SecurityQuestionId: this.rentalForm.controls['onlineLoginForm'].value['securityQuestions'],\r\n SecurityQuestionAnswer: this.rentalForm.controls['onlineLoginForm'].value['securityAnswer'],\r\n OnlineRegistrationDate: new Date(),\r\n OnlineAccess: true\r\n }\r\n this.vendorService.SaveVendorLoginDetail(obj).subscribe((res) => {\r\n if (res.Success) {\r\n this.currentPassword = null;\r\n this.toastr.success($localize`Online Login Info Saved Successfully`, $localize`Success`,this.toasterConfig);\r\n }\r\n else {\r\n this.toastr.error($localize`Error occured while saving Online Login Info`,$localize`Error`, this.toasterConfig)\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, (err) => {\r\n console.log(err);\r\n this.toastr.error($localize`Save was Unsuccessful`, $localize`Error`, this.toasterConfig)\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n }\r\n\r\n checkValidations() {\r\n let valid = true;\r\n if (this.rentalForm.controls['onlineLoginForm'].value['onlineUserName'] === \"\") {\r\n valid = false;\r\n this.toastr.error($localize`Online User Id is required`, $localize`Error`, this.toasterConfig)\r\n }\r\n if (this.rentalForm.controls['onlineLoginForm'].value['onlinePassword'] === \"\") {\r\n valid = false;\r\n this.toastr.error($localize`Online Password is required`, $localize`Error`, this.toasterConfig)\r\n }\r\n\r\n if (this.rentalForm.controls['onlineLoginForm'].value['onlinePassword'] != this.rentalForm.controls['onlineLoginForm'].value['confirmPassword']) {\r\n valid = false;\r\n this.toastr.error($localize`Online Password and Confirm Password should be same`, $localize`Error`, this.toasterConfig)\r\n }\r\n if (this.rentalForm.controls['onlineLoginForm'].value['securityQuestions'] === 0) {\r\n valid = false;\r\n this.toastr.error($localize`Security Question is required`, $localize`Error`, this.toasterConfig)\r\n }\r\n if (this.rentalForm.controls['onlineLoginForm'].value['securityAnswer'] === \"\") {\r\n valid = false;\r\n this.toastr.error($localize`Security Question Answer is required`, $localize`Error`, this.toasterConfig)\r\n }\r\n if (this.rentalForm.controls['onlineLoginForm'].value['onlinePassword'].length < 6 && this.rentalForm.controls['onlineLoginForm'].value['onlinePassword'] !== \"\") {\r\n valid = false;\r\n this.toastr.error($localize`Password must be atleast 6 character`, $localize`Error`, this.toasterConfig)\r\n }\r\n if (this.rentalForm.controls['onlineLoginForm'].value['securityAnswer'].length < 4) {\r\n valid = false;\r\n this.toastr.error($localize`Hint Answer must be atleast 4 character`, $localize`Error`, this.toasterConfig)\r\n }\r\n return valid;\r\n }\r\n\r\n validateContactForm() {\r\n if (this.rentalForm['controls'].contactInfoForm.invalid) {\r\n return true\r\n } else {\r\n return false\r\n }\r\n }\r\n\r\n UpdateVendor(): void {\r\n this.loaderIcon = Promise.resolve(true);\r\n const vendorinfo = {\r\n VendorId: this.vendorId,\r\n FirstName: this.rentalForm.controls['contactInfoForm'].get('firstName').value, \r\n LastName : this.rentalForm.controls['contactInfoForm'].get('lastName').value,\r\n CompanyName : this.rentalForm.controls['contactInfoForm'].get('companyName').value,\r\n Address : this.rentalForm.controls['contactInfoForm'].get('address').value , \r\n City : this.rentalForm.controls['contactInfoForm'].get('city').value, \r\n State : this.rentalForm.controls['contactInfoForm'].get('state').value,\r\n CountryCode : this.rentalForm.controls['contactInfoForm'].get('country').value,\r\n CellPhone : this.rentalForm.controls['contactInfoForm'].get('cellPhone').value,\r\n ZipCode : this.rentalForm.controls['contactInfoForm'].get('postalCode').value,\r\n WorkPhone : this.rentalForm.controls['contactInfoForm'].get('workPhone').value,\r\n Email: this.rentalForm.controls['contactInfoForm'].get('email').value ,\r\n MarketId: this.marketId \r\n }\r\n if(this.vendorId != 0){\r\n this.subscriptions.push(this.vendorService.UpdateVendor(vendorinfo).subscribe((res) => {\r\n if (res.Success) {\r\n this.toastr.success($localize`Contact Info saved successfully`, $localize`Success`, this.toasterConfig);\r\n }\r\n else {\r\n this.toastr.error($localize`Error occured while saving contact info`, $localize`Error`,this.toasterConfig)\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n this.rentalForm['controls'].contactInfoForm.markAsPristine();\r\n \r\n }, (err) => {\r\n this.toastr.error($localize`Something Went Wrong`,$localize`Error`, this.toasterConfig)\r\n this.loaderIcon = Promise.resolve(false);\r\n }));\r\n }\r\n }\r\n \r\n rentOnline(){\r\n this.showrentOnline=true;\r\n this.showContactInfo=false;\r\n this.showLoginInfo=false;\r\n this.showBookings=false;\r\n this.showReviewRegistration=false;\r\n this.pageName=\"Rent Online\";\r\n this.renderer.setStyle(this.btnRentOnline.nativeElement, 'background-color', '#DDEBFC');\r\n this.renderer.setStyle(this.ContactInfo.nativeElement, 'background-color', '#EEF2FF');\r\n this.renderer.setStyle(this.btnLoginInfo.nativeElement, 'background-color', '#EEF2FF');\r\n this.renderer.setStyle(this.btnBookings.nativeElement, 'background-color', '#EEF2FF');\r\n this.renderer.setStyle(this.btnRegistration.nativeElement, 'background-color', '#EEF2FF');\r\n }\r\n\r\n getWebRentalSetting() {\r\n var sub = forkJoin({\r\n res: this.marketInfoService.getWebRentalSetting(this.marketId),\r\n resRentalSettings: this.rentalService.getRentalSettings(this.marketId)\r\n }).subscribe(\r\n ({ res, resRentalSettings }: any) => {\r\n if (res) {\r\n this.AllowBookingsDaily = res.AllowBookingsDaily;\r\n this.AllowBookingsMonthly = res.AllowBookingsMonthly;\r\n this.AllowBookingsCm = res.AllowBookingsCm;\r\n this.AllowBookingsWeekly = res.AllowBookingsWeekly;\r\n this.AllowBookingsCw = res.AllowBookingsCw;\r\n\r\n this.anyRentalTypeEnabledForBooking = this.AllowBookingsDaily || this.AllowBookingsMonthly || this.AllowBookingsCm\r\n || this.AllowBookingsWeekly || this.AllowBookingsCw;\r\n if (!this.anyRentalTypeEnabledForBooking) {\r\n this.contactInfo();\r\n this.subscriptions.push(this.marketInfoService.GetEnabledRentalTypesForMarket(this.marketId)\r\n .subscribe((res: any) => {\r\n this.enabledRentalTypes = res;\r\n var defaultBookingType = 0;\r\n this.AllowBookingsDaily = this.enabledRentalTypes.some(rentalType => rentalType.Id === 1);\r\n this.AllowBookingsMonthly = this.enabledRentalTypes.some(rentalType => rentalType.Id === 2);\r\n this.AllowBookingsWeekly = this.enabledRentalTypes.some(rentalType => rentalType.Id === 3);\r\n this.AllowBookingsCm = this.enabledRentalTypes.some(rentalType => rentalType.Id === 4);\r\n this.AllowBookingsCw = this.enabledRentalTypes.some(rentalType => rentalType.Id === 5);\r\n defaultBookingType = resRentalSettings.DefaultRentalType.toString();\r\n this.rentalForm.get('bookingRentalTypes').setValue(defaultBookingType.toString());\r\n }));\r\n }\r\n\r\n this.AllowRenewalsMonthly = res.AllowRenewalsMonthly;\r\n this.AllowRenewalsCm = res.AllowRenewalsCm;\r\n this.AllowRenewalsWeekly = res.AllowRenewalsWeekly;\r\n this.AllowRenewalsCw = res.AllowRenewalsCw;\r\n this.paymentOnly = !(this.AllowRenewalsMonthly || this.AllowRenewalsWeekly || this.AllowRenewalsCm\r\n || this.AllowRenewalsCw);\r\n this.rentalForm.get('rentalTypes').setValue(res.DefaultRentalType.toString());\r\n if (this.anyRentalTypeEnabledForBooking)\r\n this.rentalForm.get('bookingRentalTypes').setValue(res.DefaultRentalType.toString());\r\n if (this.bookingPage == \"br\" && this.bookingPageRentalType) {\r\n this.rentalForm.get('bookingRentalTypes').setValue(this.bookingPageRentalType.toString());\r\n }\r\n\r\n if (this.sharedDataService.rentalType) {\r\n this.rentalForm.get('rentalTypes').setValue(this.sharedDataService.rentalType.toString());\r\n this.sharedDataService.rentalType = \"\";\r\n this.sharedDataService.paymentSharedData.RentalMethod = \"\";\r\n }\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n contactInfo(){\r\n this.showrentOnline=false;\r\n this.showContactInfo=true;\r\n this.showLoginInfo=false;\r\n this.showBookings=false;\r\n this.showReviewRegistration=false;\r\n this.pageName=\"Current Contact Information\";\r\n this.renderer.setStyle(this.ContactInfo.nativeElement, 'background-color', '#DDEBFC');\r\n this.renderer.setStyle(this.btnLoginInfo.nativeElement, 'background-color', '#EEF2FF');\r\n this.renderer.setStyle(this.btnBookings.nativeElement, 'background-color', '#EEF2FF');\r\n // this.renderer.setStyle(this.btnRegistration.nativeElement, 'background-color', '#EEF2FF');\r\n this.renderer.setStyle(this.btnRentOnline.nativeElement, 'background-color', '#EEF2FF');\r\n }\r\n\r\n LoginInfo(){\r\n this.showrentOnline=false;\r\n this.showContactInfo=false;\r\n this.showLoginInfo=true;\r\n this.showBookings=false;\r\n this.showReviewRegistration=false;\r\n this.pageName=\"Online Login Info\";\r\n this.renderer.setStyle(this.btnLoginInfo.nativeElement, 'background-color', '#DDEBFC');\r\n this.renderer.setStyle(this.btnBookings.nativeElement, 'background-color', '#EEF2FF');\r\n this.renderer.setStyle(this.btnRegistration.nativeElement, 'background-color', '#EEF2FF');\r\n this.renderer.setStyle(this.btnRentOnline.nativeElement, 'background-color', '#EEF2FF');\r\n this.renderer.setStyle(this.ContactInfo.nativeElement, 'background-color', '#EEF2FF');\r\n }\r\n\r\n MyBookings(){\r\n this.showrentOnline=false;\r\n this.showContactInfo=false;\r\n this.showLoginInfo=false;\r\n this.showBookings=true;\r\n this.showReviewRegistration=false;\r\n this.pageName=\"My Bookings\";\r\n this.renderer.setStyle(this.btnBookings.nativeElement, 'background-color', '#DDEBFC');\r\n this.renderer.setStyle(this.btnRegistration.nativeElement, 'background-color', '#EEF2FF');\r\n this.renderer.setStyle(this.btnRentOnline.nativeElement, 'background-color', '#EEF2FF');\r\n this.renderer.setStyle(this.ContactInfo.nativeElement, 'background-color', '#EEF2FF');\r\n this.renderer.setStyle(this.btnLoginInfo.nativeElement, 'background-color', '#EEF2FF');\r\n }\r\n\r\n ReviewRegistration(){\r\n this.showrentOnline=false;\r\n this.showContactInfo=false;\r\n this.showLoginInfo=false;\r\n this.showBookings=false;\r\n this.showReviewRegistration=true;\r\n this.pageName=\"Renew Registration\";\r\n this.renderer.setStyle(this.btnRegistration.nativeElement, 'background-color', '#DDEBFC');\r\n this.renderer.setStyle(this.btnRentOnline.nativeElement, 'background-color', '#EEF2FF');\r\n this.renderer.setStyle(this.ContactInfo.nativeElement, 'background-color', '#EEF2FF');\r\n this.renderer.setStyle(this.btnLoginInfo.nativeElement, 'background-color', '#EEF2FF');\r\n this.renderer.setStyle(this.btnBookings.nativeElement, 'background-color', '#EEF2FF');\r\n }\r\n\r\n setDirtyFlag(eve) {\r\n \r\n }\r\n\r\n isCancelClicked(eve) {\r\n this.rentalForm.get('rentalTypes').setValue('0'); \r\n setTimeout(() => {\r\n this.rentalForm.get('rentalTypes').setValue(eve);\r\n }, 0); \r\n }\r\n \r\n cancelContactModification() {\r\n if (this.rentalForm['controls'].contactInfoForm.dirty) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Unsaved changes will be lost. Are you sure you want to cancel?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.getVendorInfobyId();\r\n this.rentalForm['controls'].contactInfoForm.markAsPristine();\r\n } else {\r\n //do nothing\r\n }\r\n });\r\n } else {\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscriptions.forEach((subscription) => {\r\n if (subscription) {\r\n subscription.unsubscribe();\r\n }\r\n });\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Market Day(s):\r\n
\r\n
    \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
\r\n
\r\n
\r\n
\r\n Rental Day(s):\r\n
\r\n
    \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
\r\n
\r\n\r\n
\r\n
\r\n Weekly Market(s):\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n Monthly Market(s):\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Rental Day(s):\r\n
\r\n
    \r\n
  • \r\n
    \r\n \r\n \r\n
    \r\n
  • \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n

Available

\r\n
\r\n
\r\n \r\n

Booked

\r\n
\r\n
\r\n \r\n

Reserved

\r\n
\r\n
\r\n \r\n

Non Rentable

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { DatePipe } from '@angular/common';\r\nimport { Component, OnInit, ViewChild } from '@angular/core';\r\nimport { FormBuilder, FormGroup } from '@angular/forms';\r\nimport { ActivatedRoute, Params, Router } from '@angular/router';\r\nimport { forkJoin, Subscription } from 'rxjs';\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\nimport {\r\n DiagramComponent, NodeModel, NodeConstraints, MarginModel, ZoomOptions, ConnectorModel, SelectorConstraints,\r\n AnnotationConstraints, SelectorModel, PaletteModel,DiagramTooltipModel, ImageModel, DiagramTools, SnapConstraints , SnapSettingsModel, DiagramBeforeMenuOpenEventArgs, BasicShapeModel, PathAnnotationModel, TextModel,\r\n ScrollSettingsModel\r\n} from '@syncfusion/ej2-angular-diagrams';\r\nimport Swal from 'sweetalert2';\r\nimport { RentalService } from 'src/app/services/Rental.service';\r\n\r\ninterface DateString {\r\n startDate: string;\r\n}\r\n@Component({\r\n selector: 'app-market-map',\r\n templateUrl: './market-map.component.html',\r\n styleUrls: ['./market-map.component.scss']\r\n})\r\nexport class MarketMapComponent implements OnInit {\r\n public loaderIcon: Promise;\r\n marketMap: FormGroup;\r\n @ViewChild('diagram', { static: false })\r\n public diagram: DiagramComponent;\r\n private subscriptions: Subscription[] = [];\r\n selectedDays: Set = new Set();\r\n selectedWeekdays: string[] = [];\r\n additionalMarketDate=[];\r\n excludedMarketDate = [];\r\n excludedMarketDays=[];\r\n public snapSettings: SnapSettingsModel = {\r\n constraints: SnapConstraints.None, \r\n };\r\n parts=[];\r\n dailyMarketDays=[];\r\n exclusivedates = []; \r\n filteredMarketDays = [];\r\n selectedDates=[];\r\n sunday = false;\r\n monday = false;\r\n tuesday = false;\r\n wednesday = false;\r\n thursay = false;\r\n friday = false;\r\n saturday = false;\r\n AllowBookingsCw = false;\r\n AllowBookingsWeekly = false;\r\n AllowBookingsCm = false;\r\n AllowBookingsMonthly = false;\r\n anyRentalTypeEnabledForBooking = false;\r\n rentalStartDates = [];\r\n monthlyRentalStartDates = [];\r\n AllowBookingsDaily = false;\r\n selectedDailyRentalMarketDays=[];\r\n selectedItems: SelectorModel;\r\n defaultPart;\r\n selectedMarketDays=[];\r\n boothShapes;\r\n fontName;\r\n weeklyMarketDays=[];\r\n monthlyMarketDays=[];\r\n defaultZoomFactor=0.2;\r\n fontStyle = [];\r\n layoutImages = [];\r\n monthlyCMResvPeriod =0;\r\n defaultRentalTypeSelected;\r\n images = [];\r\n public palettes?: PaletteModel[];\r\n weeklyCWResvPeriod = 0;\r\n marketId;\r\n marketName = \"\";\r\n constructor(\r\n private formbuilder: FormBuilder,\r\n private route: ActivatedRoute,\r\n private rentalService: RentalService,\r\n private marketInfoService:MarketInfoService,\r\n private datePipe: DatePipe,\r\n public router: Router) {\r\n this.marketMap = this.formbuilder.group({\r\n rentalTypes: [\"1\"],\r\n marketWeekSunday:[0],\r\n marketWeekMonday:[0],\r\n marketWeekTuesday:[0],\r\n marketWeekWednesday:[0],\r\n marketWeekThursday:[0],\r\n marketWeekFriday:[0],\r\n marketWeekSaturday:[0],\r\n marketParts:[''],\r\n rentalStartDate:[],\r\n rentalEndDate:[],\r\n rentalStartMonth:[],\r\n rentalEndMonth:[],\r\n monthlyRentalStartDates:[],\r\n weeklyRentalStartDates:[]\r\n })\r\n this.selectedItems = {\r\n constraints: SelectorConstraints.All &\r\n ~(SelectorConstraints.ResizeAll | SelectorConstraints.Rotate)\r\n };\r\n }\r\n \r\n ngOnInit(): void {\r\n this.route.params.subscribe((params: Params) => {\r\n this.marketId = params['marketId'];\r\n });\r\n this.getMarketDetails();\r\n this.getMarketDays(); \r\n this.getParts();\r\n this.getListOfValuesData(); \r\n this.getImages(); \r\n }\r\n\r\n getMarketDetails() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.marketInfoService.getMarketDetails(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.marketName = res.MarketName;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getMarketDays() {\r\n const sub = this.marketInfoService.getMarketDays(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.sunday = res.Sunday;\r\n this.monday = res.Monday;\r\n this.tuesday = res.Tuesday;\r\n this.wednesday = res.Wednesday;\r\n this.thursay = res.Thursday;\r\n this.friday = res.Friday;\r\n this.saturday = res.Saturday;\r\n this.selectedDays[\"Sunday\"] = res.Sunday;\r\n this.selectedDays[\"Monday\"] = res.Monday;\r\n this.selectedDays[\"Tuesday\"] = res.Tuesday;\r\n this.selectedDays[\"Wednesday\"] = res.Wednesday;\r\n this.selectedDays[\"Thursday\"] = res.Thursday;\r\n this.selectedDays[\"Friday\"] = res.Friday;\r\n this.selectedDays[\"Saturday\"] = res.Saturday;\r\n\r\n this.marketMap.get('marketWeekSunday').setValue(this.sunday);\r\n this.marketMap.get('marketWeekMonday').setValue(this.monday);\r\n this.marketMap.get('marketWeekTuesday').setValue(this.tuesday);\r\n this.marketMap.get('marketWeekWednesday').setValue(this.wednesday);\r\n this.marketMap.get('marketWeekThursday').setValue(this.thursay);\r\n this.marketMap.get('marketWeekFriday').setValue(this.friday);\r\n this.marketMap.get('marketWeekSaturday').setValue(this.saturday); \r\n this.getDailyMarkets();\r\n this.getWeeklyMarkets();\r\n this.getMonthlyMarketDays();\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getDailyMarkets() {\r\n this.subscriptions.push(this.marketInfoService.getDailyMarketDays(this.marketId).subscribe((response) => {\r\n if (response) {\r\n this.dailyMarketDays = response;\r\n this.filteredMarketDays = this.dailyMarketDays;\r\n }\r\n }, (err) => {\r\n }));\r\n }\r\n\r\n checkboxChanged(args, item: any) {\r\n if (args.srcElement.checked) {\r\n this.selectedDailyRentalMarketDays.push(new Date(item.MarketDays)); \r\n } else {\r\n this.selectedDailyRentalMarketDays = this.selectedDailyRentalMarketDays.filter(day => day.getTime() !== new Date(item.MarketDays).getTime());\r\n }\r\n }\r\n\r\n changeMarketMap(){\r\n this.diagram.clear();\r\n }\r\n\r\n checkRentalWeeks() {\r\n const rentalStartDate = new Date(this.marketMap.value['rentalStartDate'].split('-')[0]);\r\n const rentalEndDate = new Date(this.marketMap.value['rentalEndDate'].split('-')[0]);\r\n if (rentalEndDate < rentalStartDate) {\r\n this.marketMap.get('rentalEndDate').setValue(this.marketMap.value['rentalStartDate']);\r\n }\r\n this.selectedWeeklyMarketDays();\r\n }\r\n\r\n checkRentalMonths() {\r\n if (this.marketMap.value['rentalStartMonth'] && this.marketMap.value['rentalEndMonth']) {\r\n const startMonth = this.marketMap.value['rentalStartMonth'];\r\n const endMonth = this.marketMap.value['rentalEndMonth'];\r\n const [startMonthDate, startYear] = startMonth.split(' ');\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const startMonthIndex = this.getMonthIndex(startMonthDate);\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n if (endMonthYear < startYear || (endMonthYear == startYear && endMonthIndex < startMonthIndex)) {\r\n this.marketMap.get('rentalEndMonth').setValue(startMonth);\r\n } \r\n this.selectedMonthlyMarketDays(); \r\n }\r\n } \r\n\r\n selectedWeeklyMarketDays(){\r\n this.selectedMarketDays = [];\r\n this.marketMap.value['marketWeekSunday'] == true ? this.selectedMarketDays.push(1) : 0;\r\n this.marketMap.value['marketWeekMonday'] == true ? this.selectedMarketDays.push(2) : 0;\r\n this.marketMap.value['marketWeekTuesday'] == true ? this.selectedMarketDays.push(3) : 0;\r\n this.marketMap.value['marketWeekWednesday'] == true ? this.selectedMarketDays.push(4) : 0;\r\n this.marketMap.value['marketWeekThursday'] == true ? this.selectedMarketDays.push(5) : 0;\r\n this.marketMap.value['marketWeekFriday'] == true ? this.selectedMarketDays.push(6) : 0;\r\n this.marketMap.value['marketWeekSaturday'] == true ? this.selectedMarketDays.push(7) : 0;\r\n\r\n const rentalStartDate = new Date(this.marketMap.value['rentalStartDate'].split('-')[0]);\r\n const rentalEndDate = new Date(this.marketMap.value['rentalEndDate'].split('-')[0]);\r\n if (rentalEndDate < rentalStartDate) {\r\n this.marketMap.get('rentalEndDate').setValue(this.marketMap.value['rentalStartDate']);\r\n }\r\n const today: Date = new Date(new Date().toDateString())\r\n this.rentalStartDates = [];\r\n this.selectedMarketDays.map((el, i) => {\r\n const startDate = new Date(this.marketMap.value['rentalStartDate'].split(\"-\")[0]);\r\n const endDate = new Date(this.marketMap.value['rentalEndDate'].split(\"-\")[1]);\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay >= today) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n this.rentalStartDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = this.rentalStartDates.sort(compareDates);\r\n\r\n if (this.rentalStartDates.length)\r\n this.marketMap.get('weeklyRentalStartDates').setValue(this.rentalStartDates[0].startDate); \r\n }); \r\n }\r\n\r\n selectedMonthlyMarketDays() {\r\n this.selectedMarketDays = [];\r\n this.marketMap.value['marketWeekSunday'] == true ? this.selectedMarketDays.push(1) : 0;\r\n this.marketMap.value['marketWeekMonday'] == true ? this.selectedMarketDays.push(2) : 0;\r\n this.marketMap.value['marketWeekTuesday'] == true ? this.selectedMarketDays.push(3) : 0;\r\n this.marketMap.value['marketWeekWednesday'] == true ? this.selectedMarketDays.push(4) : 0;\r\n this.marketMap.value['marketWeekThursday'] == true ? this.selectedMarketDays.push(5) : 0;\r\n this.marketMap.value['marketWeekFriday'] == true ? this.selectedMarketDays.push(6) : 0;\r\n this.marketMap.value['marketWeekSaturday'] == true ? this.selectedMarketDays.push(7) : 0;\r\n this.monthlyRentalStartDates = [];\r\n this.selectedMarketDays.map((el, i) => { \r\n const currentDate = new Date();\r\n const currentYear = currentDate.getFullYear();\r\n const currentMonth = currentDate.getMonth();\r\n const startMonth = this.marketMap.value['rentalStartMonth'];\r\n const endMonth = this.marketMap.value['rentalEndMonth'];\r\n const [startMonthDate, startYear] = startMonth.split(' ');\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const excludedDates = this.excludedMarketDays.map(dateString => new Date(dateString));\r\n const startMonthIndex = this.getMonthIndex(startMonthDate);\r\n const endMonthIndex = this.getMonthIndex(startMonthDate);\r\n var startDate;\r\n if (startYear === currentYear.toString() && startMonthIndex === currentMonth)\r\n startDate = currentDate\r\n else\r\n startDate = new Date(startYear, startMonthIndex, 1);\r\n const endDate = new Date(startYear, endMonthIndex + 1, 0);;\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (new Date(this.datePipe.transform(currentDay,'MM/dd/yyyy')) <= new Date(this.datePipe.transform(endDate,'MM/dd/yyyy'))) {\r\n var exludedDate = excludedDates.some(date => {\r\n return this.datePipe.transform(date, 'MM/dd/yyyy') === this.datePipe.transform(currentDay, 'MM/dd/yyyy');\r\n });\r\n if (currentDay.getDay() === selectedDayOfWeek && !exludedDate) {\r\n this.monthlyRentalStartDates.push({ startDate: this.datePipe.transform(new Date(currentDay), 'MMM d, y') });\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n const compareDates = (a: DateString, b: DateString): number => {\r\n const dateA = new Date(a.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.startDate.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = this.monthlyRentalStartDates.sort(compareDates);\r\n if (this.monthlyRentalStartDates && this.monthlyRentalStartDates.length > 0) {\r\n this.marketMap.get('monthlyRentalStartDates').setValue(this.monthlyRentalStartDates[0].startDate)\r\n }\r\n });\r\n }\r\n\r\n getMonthIndex(monthString: string): number {\r\n const months = [\r\n 'January', 'February', 'March', 'April', 'May', 'June',\r\n 'July', 'August', 'September', 'October', 'November', 'December'\r\n ];\r\n const monthIndex = months.findIndex(month => month.toLowerCase() === monthString.toLowerCase());\r\n return monthIndex !== -1 ? monthIndex : 0;\r\n }\r\n\r\n rentalTypeChange(){\r\n this.selectedMarketDays =[];\r\n this.diagram.clear();\r\n this.getMarketDays();\r\n }\r\n\r\n viewLayout() {\r\n this.diagram.clear(); \r\n this.selectedMarketDays=[];\r\n this.marketMap.value['marketWeekSunday'] == true ? this.selectedMarketDays.push(1) : 0;\r\n this.marketMap.value['marketWeekMonday'] == true ? this.selectedMarketDays.push(2) : 0;\r\n this.marketMap.value['marketWeekTuesday'] == true ? this.selectedMarketDays.push(3) : 0;\r\n this.marketMap.value['marketWeekWednesday'] == true ? this.selectedMarketDays.push(4) : 0;\r\n this.marketMap.value['marketWeekThursday'] == true ? this.selectedMarketDays.push(5) : 0;\r\n this.marketMap.value['marketWeekFriday'] == true ? this.selectedMarketDays.push(6) : 0;\r\n this.marketMap.value['marketWeekSaturday'] == true ? this.selectedMarketDays.push(7) : 0;\r\n\r\n var rentalType = this.marketMap.value['rentalTypes'];\r\n switch (rentalType) {\r\n case '1':\r\n if (this.selectedDailyRentalMarketDays.length == 0) {\r\n Swal.fire({\r\n // title: $localize`Warning`,\r\n text: `Please select a Rental Day`,\r\n icon: \"warning\",\r\n confirmButtonText: `Ok`,\r\n });\r\n // Swal.fire('Hey user!', 'You are the rockstar!', 'info');\r\n }\r\n else {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.subscriptions.push(this.marketInfoService.getAllBoothsForDailyRentalTypeLayout(this.marketId,this.marketMap.value['marketParts'], this.selectedDailyRentalMarketDays).subscribe((res: any) => {\r\n if (res) {\r\n const data = res;\r\n this.bindBoothsToLayout(data);\r\n this.getBuildingForLayout();\r\n this.getImagesForLayout();\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n }));\r\n }\r\n break;\r\n case '3':\r\n case '5':\r\n this.subscriptions.push(this.rentalService.getRentalSettings(this.marketId).subscribe((response: any) => {\r\n if (response) {\r\n const weeklyRentalStartDateYear = new Date(this.marketMap.value['rentalStartDate'].split(\"-\")[0]).getFullYear();\r\n const weeklyRentalStartDateMonth = new Date(this.marketMap.value['rentalStartDate'].split(\"-\")[0]).getMonth() + 1;\r\n const weeklyRentalEndDateYear = new Date(this.marketMap.value['rentalEndDate'].split(\"-\")[1]).getFullYear();\r\n const weeklRentalEndDateMonth = new Date(this.marketMap.value['rentalEndDate'].split(\"-\")[1]).getMonth() + 1;\r\n const weeklyRentalStartDateYearMonth = `${weeklyRentalStartDateYear}${weeklyRentalStartDateMonth < 10 ? '0' : ''}${weeklyRentalStartDateMonth}`;\r\n const weeklyRentalEndDateYearMonth = `${weeklyRentalEndDateYear}${weeklRentalEndDateMonth < 10 ? '0' : ''}${weeklRentalEndDateMonth}`;\r\n var marketDays = '';\r\n this.selectedMarketDays.forEach(element => {\r\n marketDays = marketDays.concat(element) + ',';\r\n });\r\n if (this.selectedMarketDays.length > 0) {\r\n this.selectedDates = [];\r\n this.selectedMarketDays.map((el, i) => {\r\n const startDate = new Date(this.marketMap.value['rentalStartDate'].split(\"-\")[0]);\r\n const endDate = new Date(this.marketMap.value['rentalEndDate'].split(\"-\")[1]);\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n this.selectedDates.push(this.datePipe.transform(new Date(currentDay), 'MM/dd/yyyy'));\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n });\r\n }\r\n var marketDays = '';\r\n this.selectedMarketDays.forEach(element => {\r\n marketDays = marketDays.concat(element) + ',';\r\n });\r\n\r\n var rentalStartDate = this.selectedDates[0];\r\n var rentalEndDate = this.selectedDates[this.selectedDates.length - 1];\r\n var obj = {\r\n PartId: this.marketMap.value['marketParts'],\r\n RentalStartDate: new Date(this.marketMap.value['weeklyRentalStartDates']),\r\n RentalEndDate: new Date(rentalEndDate),\r\n FirstDayOfRentalStartWeek: new Date(this.marketMap.value['weeklyRentalStartDates']),\r\n FirstDayOfRentalEndWeek: new Date(rentalEndDate),\r\n RentalStartDateYearMonth: weeklyRentalStartDateYearMonth,\r\n RentalEndDateYearMonth: weeklyRentalEndDateYearMonth,\r\n MarketDays: marketDays.substring(0, marketDays.length - 1),\r\n WeeklyCombWeeklyReservationPeriod: response.WeeklyCombWeeklyReservationPeriod,\r\n MonthlyCombMonthlyReservationPeriod: response.MonthlyCombMonthlyReservationPeriod,\r\n RentalStartDateWeekDayNumber: new Date(rentalStartDate).getDay(),\r\n AllowVendorVacation: false,\r\n Monday: this.marketMap.value['marketWeekMonday'] ? true : false,\r\n Tuesday: this.marketMap.value['marketWeekTuesday'] ? true : false,\r\n Wednesday: this.marketMap.value['marketWeekWednesday'] ? true : false,\r\n Thursday: this.marketMap.value['marketWeekThursday'] ? true : false,\r\n Friday: this.marketMap.value['marketWeekFriday'] ? true : false,\r\n Saturday: this.marketMap.value['marketWeekSaturday'] ? true : false,\r\n Sunday: this.marketMap.value['marketWeekSunday'] ? true : false,\r\n }\r\n this.subscriptions.push(this.marketInfoService.getALLBoothsForLayoutALLRentalTypes(this.marketId, obj).subscribe((response) => {\r\n let data = response;\r\n this.bindBoothsToLayout(data);\r\n this.getBuildingForLayout();\r\n this.getImagesForLayout();\r\n }, err => {\r\n }));\r\n }\r\n }));\r\n break;\r\n case '2':\r\n case '4':\r\n this.subscriptions.push(this.rentalService.getRentalSettings(this.marketId).subscribe((response: any) => {\r\n if (response) {\r\n const rentalStartDateYear = new Date(this.marketMap.get('rentalStartMonth').value.split('-')[0]).getFullYear();\r\n const rentalStartDateMonth = new Date(this.marketMap.get('rentalStartMonth').value.split('-')[0]).getMonth() + 1;\r\n const rentalEndDateYear = new Date(this.marketMap.get('rentalEndMonth').value.split('-')[0]).getFullYear();\r\n const rentalEndDateMonth = new Date(this.marketMap.get('rentalEndMonth').value.split('-')[0]).getMonth() + 1;\r\n const rentalStartDateYearMonth = `${rentalStartDateYear}${rentalStartDateMonth < 10 ? '0' : ''}${rentalStartDateMonth}`;\r\n const rentalEndDateYearMonth = `${rentalEndDateYear}${rentalEndDateMonth < 10 ? '0' : ''}${rentalEndDateMonth}`;\r\n if (this.selectedMarketDays.length > 0) {\r\n this.selectedDates = [];\r\n this.selectedMarketDays.map((el, i) => {\r\n const startDate = new Date(this.marketMap.get('rentalStartMonth').value.split('-')[0])\r\n const endMonth = this.marketMap.value['rentalEndMonth'];\r\n const [endMonthDate, endMonthYear] = endMonth.split(' ');\r\n const endMonthIndex = this.getMonthIndex(endMonthDate);\r\n const endDate = new Date(endMonthYear, endMonthIndex + 1, 0);\r\n\r\n const selectedDayOfWeek = el - 1;\r\n let currentDay = new Date(startDate);\r\n while (currentDay <= endDate) {\r\n if (currentDay.getDay() === selectedDayOfWeek) {\r\n this.selectedDates.push(this.datePipe.transform(new Date(currentDay), 'MM/dd/yyyy'));\r\n }\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n\r\n const compareDates = (a, b): number => {\r\n const dateA = new Date(a.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n const dateB = new Date(b.replace(/(\\d+)(st|nd|rd|th)/, '$1')).getTime();\r\n return dateA - dateB;\r\n };\r\n const sortedDates = this.selectedDates.sort(compareDates);\r\n });\r\n }\r\n var marketDays = '';\r\n this.selectedMarketDays.forEach(element => {\r\n marketDays = marketDays.concat(element) + ',';\r\n });\r\n\r\n var rentalStartDate = this.selectedDates[0];\r\n var rentalEndDate = this.selectedDates[this.selectedDates.length - 1];\r\n var obj = {\r\n PartId: this.marketMap.value['marketParts'],\r\n RentalStartDate: new Date(this.marketMap.value['monthlyRentalStartDates']),\r\n RentalEndDate: new Date(rentalEndDate),\r\n FirstDayOfRentalStartWeek: new Date(this.marketMap.value['monthlyRentalStartDates']),\r\n FirstDayOfRentalEndWeek: new Date(rentalEndDate),\r\n RentalStartDateYearMonth: rentalStartDateYearMonth,\r\n RentalEndDateYearMonth: rentalEndDateYearMonth,\r\n MarketDays: marketDays.substring(0, marketDays.length - 1),\r\n WeeklyCombWeeklyReservationPeriod: response.WeeklyCombWeeklyReservationPeriod,\r\n MonthlyCombMonthlyReservationPeriod: response.MonthlyCombMonthlyReservationPeriod,\r\n RentalStartDateWeekDayNumber: new Date(rentalStartDate).getDay(),\r\n AllowVendorVacation: false,\r\n Monday: this.marketMap.value['marketWeekMonday'] ? true : false,\r\n Tuesday: this.marketMap.value['marketWeekTuesday'] ? true : false,\r\n Wednesday: this.marketMap.value['marketWeekWednesday'] ? true : false,\r\n Thursday: this.marketMap.value['marketWeekThursday'] ? true : false,\r\n Friday: this.marketMap.value['marketWeekFriday'] ? true : false,\r\n Saturday: this.marketMap.value['marketWeekSaturday'] ? true : false,\r\n Sunday: this.marketMap.value['marketWeekSunday'] ? true : false,\r\n }\r\n this.subscriptions.push(this.marketInfoService.getALLBoothsForLayoutALLRentalTypes(this.marketId, obj).subscribe((response) => {\r\n let data = response;\r\n this.bindBoothsToLayout(data);\r\n this.getBuildingForLayout();\r\n this.getImagesForLayout();\r\n }, err => {\r\n }));\r\n }\r\n }));\r\n break;\r\n }\r\n }\r\n\r\n getWeeklyMarkets() {\r\n this.marketInfoService.getWeeklyMarketDays(this.marketId).subscribe((response) => {\r\n if (response) {\r\n this.weeklyMarketDays = response;\r\n this.marketMap.patchValue({\r\n rentalStartDate: response[0].RentalStartDays,\r\n rentalEndDate: response[0].RentalEndDays,\r\n });\r\n this.selectedWeeklyMarketDays();\r\n }\r\n }, (err) => {\r\n });\r\n }\r\n\r\n getMonthlyMarketDays() {\r\n this.subscriptions.push(this.marketInfoService.getMonthlyMarketDays(this.marketId).subscribe((response) => {\r\n if (response) {\r\n this.monthlyMarketDays = response;\r\n this.marketMap.patchValue({\r\n rentalStartMonth: response[0].RentalMonths,\r\n rentalEndMonth: response[0].RentalMonths,\r\n })\r\n this.selectedMonthlyMarketDays(); \r\n }\r\n }, (err) => {\r\n }));\r\n }\r\n\r\n\r\n toggleDaySelection(day: string, event: any) {\r\n this.selectedDailyRentalMarketDays = [];\r\n var selectedRentalTypes= this.marketMap.value['rentalTypes']\r\n if (selectedRentalTypes == \"4\" || selectedRentalTypes == \"5\") {\r\n this.selectedMarketDays.map((el, i) => {\r\n switch (el) {\r\n case 1: this.marketMap.get('marketWeekSunday').setValue(true);\r\n break;\r\n case 2: this.marketMap.get('marketWeekMonday').setValue(true);\r\n break;\r\n case 3: this.marketMap.get('marketWeekTuesday').setValue(true);\r\n break;\r\n case 4: this.marketMap.get('marketWeekWednesday').setValue(true);\r\n break;\r\n case 5: this.marketMap.get('marketWeekThursday').setValue(true);\r\n break;\r\n case 6: this.marketMap.get('marketWeekFriday').setValue(true);\r\n break;\r\n case 7: this.marketMap.get('marketWeekSaturday').setValue(true);\r\n break;\r\n }\r\n });\r\n }\r\n this.selectedDays[day] = event.target.checked;\r\n this.filterDates(selectedRentalTypes);\r\n }\r\n\r\n filterDates(selectedRentalTypes) {\r\n if (selectedRentalTypes == \"1\"){\r\n this.filteredMarketDays = this.dailyMarketDays.filter(item => {\r\n const dayName = this.getDayNameFromDate(item.MarketDays);\r\n return this.selectedDays[dayName];\r\n });\r\n }\r\n\r\n var selectedRentalTypes= this.marketMap.value['rentalTypes']\r\n if (selectedRentalTypes == \"3\" || selectedRentalTypes == \"5\") {\r\n this.selectedWeeklyMarketDays();\r\n\r\n } else if (selectedRentalTypes == \"2\" || selectedRentalTypes == \"4\") {\r\n this.selectedMonthlyMarketDays();\r\n }\r\n }\r\n\r\n getDayNameFromDate(dateString: string): string {\r\n const date = new Date(dateString);\r\n return date.toLocaleDateString('en-US', { weekday: 'long' });\r\n }\r\n\r\n getParts() {\r\n const sub = this.marketInfoService.getParts(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.parts = res;\r\n this.getWebRentalSetting();\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getWebRentalSetting(){\r\n const sub = this.marketInfoService.getWebRentalSetting(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.defaultPart = res.DefaultLayoutPart;\r\n this.AllowBookingsDaily =res.AllowBookingsDaily;\r\n this.AllowBookingsMonthly = res.AllowBookingsMonthly;\r\n this.AllowBookingsCm =res.AllowBookingsCm;\r\n this.AllowBookingsWeekly = res.AllowBookingsWeekly;\r\n this.AllowBookingsCw = res.AllowBookingsCw;\r\n this.weeklyCWResvPeriod = res.MaxBookingWeeks;\r\n this.monthlyCMResvPeriod = res.MaxBookingMonths;\r\n this.defaultRentalTypeSelected = res.DefaultRentalType;\r\n this.marketMap.get('marketParts').setValue(this.defaultPart);\r\n this.marketMap.get('rentalTypes').setValue(this.defaultRentalTypeSelected.toString());\r\n this.anyRentalTypeEnabledForBooking = this.AllowBookingsDaily || this.AllowBookingsMonthly || this.AllowBookingsCm\r\n || this.AllowBookingsWeekly || this.AllowBookingsCw;\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getListOfValuesData() {\r\n forkJoin({\r\n res: this.marketInfoService.getListOfValuesData(),\r\n layoutFonts: this.marketInfoService.getLayoutFonts(this.marketId)\r\n }).subscribe(({ res, layoutFonts }) => {\r\n if (res) {\r\n this.boothShapes = res.BoothShapes;\r\n this.fontName = res.FontName;\r\n this.fontStyle = res.FontStyle;\r\n }\r\n if (layoutFonts) {\r\n this.defaultZoomFactor = layoutFonts.DefaultZoomFactor ?? 0;\r\n }\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n }\r\n\r\n bindBoothsToLayout(data){\r\n if (data.length > 0) {\r\n this.loaderIcon = Promise.resolve(true);\r\n data.map((item) => {\r\n var fontColor = item.Status.toLowerCase() == \"r\" ? \"#fff\" : \"#000\";\r\n var backColor = \"#fff\"\r\n var boothStatus = \"Booked\";\r\n switch (item.Status.toLowerCase()) {\r\n case \"r\": boothStatus = \"Reserved\"\r\n backColor = '#0032CC';\r\n break;\r\n case \"ro\": boothStatus = \"Reserved Only\"\r\n backColor = '#483D8B';\r\n break;\r\n case \"a\": boothStatus = \"Available\"\r\n backColor = '#fff';\r\n break;\r\n case \"ab\": boothStatus = \"Absentee Booking\"\r\n backColor = '#4F9F60';\r\n break;\r\n default: boothStatus = \"Booked\"\r\n backColor = '#4F9F60';\r\n break;\r\n }\r\n\r\n if(item.ExcludeForWeb){\r\n backColor = '#ff007f';\r\n }\r\n\r\n const nodeId = 'node_' + item.BoothNumber;\r\n const diagramNode: NodeModel = {\r\n id: nodeId,\r\n shape: {\r\n type: 'Basic',\r\n shape: this.boothShapes.filter(e => e.Id == item.ShapeId)[0].Name\r\n },\r\n style: {\r\n fill: backColor,\r\n strokeColor: this.convertColor(item.BorderColor),\r\n color: fontColor,\r\n strokeWidth: 1,\r\n fontSize: item.FontSize,\r\n textWrapping: 'Wrap',\r\n fontFamily: this.fontName.filter(e => e.Id == item.FontName)[0].Name\r\n },\r\n annotations:\r\n [{\r\n content: item.BoothNumber,\r\n style: {\r\n fontSize: item.FontSize,\r\n color: fontColor,\r\n fontFamily: this.fontName.filter(e => e.Id == item.FontName)[0].Name,\r\n textWrapping: 'Wrap',\r\n bold: this.fontStyle.filter(e => e.Id == item.FontStyle)[0].Name.toLowerCase().includes('bold'),\r\n italic: this.fontStyle.filter(e => e.Id == item.FontStyle)[0].Name.toLowerCase().includes('italic')\r\n },\r\n constraints: AnnotationConstraints.ReadOnly\r\n }],\r\n width: item.Width * 3,\r\n height: item.Length * 3,\r\n addInfo: {\r\n allowDrag: true,\r\n name: 'booth',\r\n status: item.Status\r\n },\r\n constraints: NodeConstraints.Default & ~(NodeConstraints.Drag) | NodeConstraints.Tooltip,\r\n offsetX: item.LeftCoordinate,\r\n offsetY: item.TopCoordinate,\r\n rotateAngle: item.RotateAngle\r\n };\r\n this.diagram.add(diagramNode);\r\n });\r\n this.loaderIcon = Promise.resolve(false);\r\n this.diagram.fitToPage();\r\n if (this.defaultZoomFactor) {\r\n let zoomOptions: ZoomOptions = {\r\n type: 'ZoomIn',\r\n zoomFactor: this.defaultZoomFactor\r\n };\r\n this.diagram.zoomTo(zoomOptions);\r\n }\r\n } \r\n }\r\n\r\n layoutZoomInClick(event) {\r\n let zoomOptions: ZoomOptions = {\r\n type: \"ZoomIn\",\r\n zoomFactor: 0.2\r\n }\r\n this.diagram.zoomTo(zoomOptions);\r\n }\r\n\r\n layoutZoomOutClick(flag = false) {\r\n let zoomOptions: ZoomOptions = {\r\n type: \"ZoomOut\",\r\n zoomFactor: 0.2\r\n }\r\n this.diagram.zoomTo(zoomOptions);\r\n }\r\n\r\n getBuildingForLayout() {\r\n const sub = this.marketInfoService.getBuildingAreasInLayOut(this.marketMap.value['marketParts'], this.marketId).subscribe((res: any) => {\r\n let data = res;\r\n if (data.length > 0) {\r\n data.map((item) => {\r\n const nodeId = 'node_building' + item.BuildingId;\r\n const diagramNode: NodeModel = {\r\n id: nodeId,\r\n shape: {\r\n type: 'Basic',\r\n shape: this.boothShapes.filter(e => e.Id == item.ShapeId)[0].Name\r\n },\r\n style: {\r\n fill: item.BuildingBackColor != 0 ? this.convertColor(item.BuildingBackColor) : \"#000\",\r\n strokeColor: item.BuildingBackColor != 0 ? this.convertColor(item.BuildingBorderColor) : \"#000\",\r\n strokeWidth: 1,\r\n fontSize: item.BuildingFontSize,\r\n textWrapping: 'Wrap',\r\n fontFamily: this.fontName.filter(e => e.Id == item.BuildingFontNameId)[0].Name\r\n },\r\n annotations:\r\n [{\r\n content: item.Caption,\r\n style: {\r\n fontSize: item.BuildingFontSize,\r\n fontFamily: this.fontName.filter(e => e.Id == item.BuildingFontNameId)[0].Name,\r\n textWrapping: 'Wrap',\r\n bold: this.fontStyle.filter(e => e.Id == item.BuildingFontStyleId)[0].Name.toLowerCase().includes('bold'),\r\n italic: this.fontStyle.filter(e => e.Id == item.BuildingFontStyleId)[0].Name.toLowerCase().includes('italic')\r\n },\r\n constraints: AnnotationConstraints.ReadOnly\r\n }],\r\n width: item.BuildingWidth * 3,\r\n height: item.BuildingLength * 3,\r\n addInfo: {\r\n allowDrag: false, // Enable drag-and-drop for this shape\r\n id: item.BuildingId,\r\n name: 'building'\r\n },\r\n constraints: NodeConstraints.Default & ~(NodeConstraints.Drag),\r\n offsetX: item.LeftCoordinate,\r\n offsetY: item.TopCoordinate,\r\n rotateAngle: item.BuildingVerticalDisplay == true ? 90 : 0\r\n };\r\n this.diagram.add(diagramNode);\r\n });\r\n this.diagram.fitToPage();\r\n if (this.defaultZoomFactor) {\r\n let zoomOptions: ZoomOptions = {\r\n type: 'ZoomIn',\r\n zoomFactor: this.defaultZoomFactor\r\n };\r\n this.diagram.zoomTo(zoomOptions);\r\n }\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n } \r\n\r\n getImagesForLayout() {\r\n this.marketInfoService.getLayoutImages(this.marketMap.value['marketParts'], this.marketId).subscribe((response: any) => {\r\n if (response) {\r\n let data = response;\r\n if (data.length > 0) {\r\n\r\n for (let i = 0; i < data.length; i++) {\r\n let node = {\r\n id: 'node_images' + data[i].ImagesForLayoutId,\r\n addInfo: {\r\n status: this.layoutImages.filter(e => e.ImageId == data[i].LayoutImagesId)[0].ImagePath,\r\n id: data[i].ImagesForLayoutId,\r\n name: \"image\",\r\n ImageId: data[i].LayoutImagesId,\r\n },\r\n style: {\r\n strokeWidth: 0\r\n },\r\n annotations: [\r\n {\r\n // content: this.layoutImages.filter(e => e.ImageId == data[i].LayoutImagesId)[0].ImageName,\r\n constraints: AnnotationConstraints.ReadOnly,\r\n offset: { x: 0.05, y: -0.07 }\r\n }\r\n ],\r\n constraints: NodeConstraints.Default & ~(NodeConstraints.Drag),\r\n shape: { type: 'Image', shape: 'Image' } as ImageModel, // Type assertion to ImageModel\r\n width: data[i].ImageWidth * 3,\r\n height: data[i].ImageLength * 3,\r\n offsetX: data[i].ImageLeftCoordinate,\r\n offsetY: data[i].ImageTopCoordinate,\r\n };\r\n\r\n if ((node.shape as { type: string }).type === 'Image') {\r\n (node.shape as ImageModel).source = node.addInfo.status;\r\n }\r\n\r\n this.diagram.add(node);\r\n }\r\n this.diagram.fitToPage();\r\n if (this.defaultZoomFactor) {\r\n let zoomOptions: ZoomOptions = {\r\n type: 'ZoomIn',\r\n zoomFactor: this.defaultZoomFactor\r\n };\r\n this.diagram.zoomTo(zoomOptions);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n\r\n getImages() {\r\n const sub = this.marketInfoService.getImages().subscribe((res: any) => {\r\n if (res) {\r\n this.layoutImages = res;\r\n let data = this.layoutImages;\r\n if (this.layoutImages.length > 0) {\r\n for (let i = 0; i < this.layoutImages.length; i++) {\r\n const nodeId = 'node_' + data[i].ImageId;\r\n let node = {\r\n id: nodeId, addInfo: {\r\n status: data[i].ImagePath, id: 'z' + data[i].ImageId, name: \"image\", ImageId: data[i].ImageId,\r\n },\r\n annotations: [{ content: data[i].ImageName, constraints: AnnotationConstraints.ReadOnly, offset: { x: 0.5, y: -0.07 } }],\r\n shape: { type: 'Image', shape: 'Image' },\r\n width: 50, height: 50, offsetX: 50, offsetY: 50,\r\n };\r\n if (node.shape.type === 'Image') {\r\n (node.shape as ImageModel).source = node.addInfo.status;\r\n }\r\n this.images.push(node);\r\n }\r\n\r\n this.palettes = [\r\n {\r\n id: 'Images',\r\n expanded: true,\r\n symbols: this.images,\r\n title: 'Images'\r\n },\r\n ]\r\n }\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n convertColor(colorValue: number): string {\r\n if (colorValue == 255 || colorValue == 65280 || colorValue == 0)\r\n return '#' + colorValue.toString(16).padStart(6, '0');\r\n else\r\n return '#' + colorValue.toString(16);\r\n }\r\n\r\n public created(args: Object): void {\r\n //fit the diagram to the page with respect to mode and region\r\n this.diagram.fitToPage({\r\n mode: 'Page',\r\n region: 'Content',\r\n // margin: {\r\n // bottom: 50\r\n // },\r\n canZoomIn: true,\r\n });\r\n this.diagram.scrollSettings.horizontalOffset = 0;\r\n this.diagram.scrollSettings.verticalOffset = 0;\r\n}\r\n\r\n ngOnDestroy(): void {\r\n this.subscriptions.forEach((subscription) => {\r\n if (subscription) {\r\n subscription.unsubscribe();\r\n }\r\n });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpErrorResponse, HttpParams } from '@angular/common/http';\r\nimport { Observable, of, throwError } from 'rxjs';\r\nimport { map, catchError } from 'rxjs/operators';\r\nimport { environment } from 'src/environments/environment';\r\nimport { AuthService } from './auth.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\n\r\nexport class NewsService {\r\n private baseURL: string;\r\n constructor(private http: HttpClient,\r\n ) {\r\n this.baseURL = environment.apiBaseUrl;\r\n }\r\n\r\n public options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n\r\n\r\n getActiveNews(MarketId: any): Observable {\r\n console.log(\"MarketId: \", MarketId);\r\n return this.http.get(\r\n `${this.baseURL}/News/GetAllActiveNews?MarketId=` + MarketId,\r\n { observe: 'response' })\r\n .pipe(\r\n map(res => {\r\n const result = res.body as any[];\r\n return result;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n\r\n private handleError(error: HttpErrorResponse) {\r\n console.error('server error:', error);\r\n if (error.error instanceof Error) {\r\n const errMessage = error.error.message;\r\n return throwError(errMessage);\r\n }\r\n return throwError(error || 'Node.js server error');\r\n }\r\n}","
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{selectedNews?.NewsTitle}}\r\n
\r\n \r\n
\r\n
\r\n

{{selectedNews?.Description}}

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
","import { Component } from '@angular/core';\r\nimport { ActivatedRoute, Params } from '@angular/router';\r\nimport { Subscription } from 'rxjs';\r\nimport { NewsService } from 'src/app/services/News.service';\r\nimport { DatePipe } from \"@angular/common\";\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\n@Component({\r\n selector: 'app-news',\r\n templateUrl: './news.component.html',\r\n styleUrls: ['./news.component.scss']\r\n})\r\nexport class NewsComponent {\r\n MarketId: any;\r\n private subscriptions: Subscription[] = [];\r\n news: any[];\r\n selectedNews: any;\r\n error: any;\r\n filteredNews: any[];\r\n isMoreNews: boolean;\r\n label: string;\r\n marketName = \"\";\r\n public loaderIcon: Promise;\r\n constructor(public newsService: NewsService, private route: ActivatedRoute, public datePipe: DatePipe,\r\n private marketInfoService: MarketInfoService\r\n ) { }\r\n\r\n public NewsData: any;\r\n\r\n ngOnInit(): void {\r\n this.route.params.subscribe((params: Params) => {\r\n this.MarketId = params.marketId;\r\n this.getMarketDetails();\r\n this.getNewsData();\r\n this.isMoreNews = true;\r\n this.label = '< {\r\n if (res) {\r\n this.marketName = res.MarketName;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getNewsData() {\r\n this.newsService.getActiveNews(this.MarketId).subscribe({\r\n next: (data) => {\r\n this.NewsData = data;\r\n this.filteredNews = this.NewsData.slice(0, 4);\r\n },\r\n error: (err) => {\r\n this.error = err;\r\n console.error('Error fetching news data:', err);\r\n }\r\n });\r\n }\r\n\r\n openModal(newsData: any) {\r\n this.selectedNews = newsData;\r\n }\r\n\r\n loadMoreNews() {\r\n if (this.isMoreNews) {\r\n this.filteredNews = this.NewsData;\r\n this.label = 'Less News>>';\r\n this.isMoreNews = false;\r\n } else {\r\n this.filteredNews = this.NewsData.slice(0,4);\r\n this.label = '< {\r\n var marketId = null;\r\n this.marketInfoService.getMarketId().subscribe(mrktId => {\r\n marketId = mrktId;\r\n });\r\n const options = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };\r\n const url = `${this.baseURL}/ContactUs/PostContactUsMail/${marketId}`\r\n return this.http.post(url, ContactUs, options)\r\n .pipe(\r\n map(res => {\r\n const response = res as any[];\r\n return response;\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n\r\n private handleError(error: HttpErrorResponse) {\r\n console.error('server error:', error);\r\n if (error.error instanceof Error) {\r\n const errMessage = error.error.message;\r\n return throwError(errMessage);\r\n }\r\n return throwError(error || 'Node.js server error');\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * required \r\n
\r\n
\r\n \r\n \r\n * invalid\r\n * required \r\n
\r\n
\r\n \r\n \r\n * required \r\n * invalid \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * required \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * required \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
","import { Component, OnInit } from '@angular/core';\r\nimport { ContactUsService } from 'src/app/services/ContactUs.service';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { ActivatedRoute, Params } from '@angular/router';\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\nimport { Subscription } from 'rxjs';\r\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms'; // Import FormGroup and FormBuilder\r\n\r\n@Component({\r\n selector: 'app-contact-us',\r\n templateUrl: './contact-us.component.html',\r\n styleUrls: ['./contact-us.component.scss']\r\n})\r\nexport class ContactUsComponent implements OnInit {\r\n contactUsForm: FormGroup; // Declare form group\r\n public PhoneNumberMask: String = '000-000-0000';\r\n marketId: any;\r\n firstNum: number;\r\n secondNum: number;\r\n public loaderIcon: Promise;\r\n marketName = \"\";\r\n private subscriptions: Subscription[] = [];\r\n\r\n constructor(\r\n private contactUsService: ContactUsService,\r\n private toastr: ToastrService,\r\n private route: ActivatedRoute,\r\n private marketInfoService: MarketInfoService,\r\n private fb: FormBuilder // Inject FormBuilder\r\n ) { }\r\n\r\n toasterConfig = {\r\n closeButton: true,\r\n timeOut: 4500,\r\n easing: 'ease-out',\r\n progressBar: true,\r\n positionClass: 'toast-top-right',\r\n tapToDismiss: true,\r\n showEasing: 'swing',\r\n hideEasing: 'linear',\r\n showMethod: 'fadeIn',\r\n hideMethod: 'slideUp'\r\n };\r\n\r\n ngOnInit(): void {\r\n this.route.params.subscribe((params: Params) => {\r\n this.marketId = params['marketId'];\r\n this.marketInfoService.setMarketId(this.marketId);\r\n });\r\n this.getMarketDetails();\r\n this.generateCaptcha();\r\n\r\n this.contactUsForm = this.fb.group({\r\n name: ['', Validators.required],\r\n phone: ['', [Validators.required,Validators.minLength(10), Validators.maxLength(12)]],\r\n email: ['', [Validators.required, Validators.email]],\r\n subject: ['', Validators.required],\r\n comments: ['', Validators.required],\r\n captchaResult: ['']\r\n });\r\n }\r\n\r\n getMarketDetails() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.marketInfoService.getMarketDetails(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.marketName = res.MarketName;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n onSubmit(): void {\r\n if (this.contactUsForm.invalid) {\r\n this.toastr.error('Please check the form.', 'Error', this.toasterConfig);\r\n return;\r\n }\r\n\r\n if (!this.validateCaptcha()) {\r\n this.toastr.error('Captcha verification failed.', 'Error', this.toasterConfig);\r\n this.generateCaptcha();\r\n return;\r\n }\r\n\r\n const contactUsFormValue = this.contactUsForm.value;\r\n const contactUsForm = {\r\n MarketId: this.marketId,\r\n Name: contactUsFormValue.name,\r\n Phone: contactUsFormValue.phone,\r\n Email: contactUsFormValue.email,\r\n Subject: contactUsFormValue.subject,\r\n comments: contactUsFormValue.comments\r\n };\r\n\r\n this.submitContactUsForm(contactUsForm);\r\n }\r\n\r\n submitContactUsForm(contactUsForm) {\r\n this.contactUsService.SubmitContactUs(contactUsForm)\r\n .subscribe(\r\n res => {\r\n if (res.Success) {\r\n this.toastr.success('Submitted Successfully', 'Success', this.toasterConfig);\r\n this.resetForm();\r\n } else {\r\n this.toastr.error('Submit Unsuccessful', 'Error', this.toasterConfig);\r\n }\r\n },\r\n err => {\r\n this.toastr.error(err.Message, 'Error', this.toasterConfig);\r\n }\r\n );\r\n }\r\n\r\n generateCaptcha(): void {\r\n this.firstNum = Math.floor(Math.random() * 25) + 1;\r\n this.secondNum = Math.floor(Math.random() * 25) + 1;\r\n\r\n const firstNumElement = document.getElementById(\"firstNum\");\r\n const secondNumElement = document.getElementById(\"secondNum\");\r\n\r\n if (firstNumElement && secondNumElement) {\r\n firstNumElement.textContent = this.firstNum.toString();\r\n secondNumElement.textContent = this.secondNum.toString();\r\n }\r\n }\r\n\r\n validateCaptchaResult(event) {\r\n const key = event.key || event.keyCode;\r\n\r\n if (((event.keyCode >= 65 && event.keyCode <= 95) || event.keyCode >= 106 || (event.keyCode >= 48 && event.keyCode <= 57 && isNaN(event.key))) && event.keyCode != 32) {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n validateCaptcha(): boolean {\r\n //const enteredResult = Number((document.getElementById(\"captchaResult\")).value);\r\n const enteredResult = Number(this.contactUsForm.value.captchaResult);\r\n\r\n const expectedResult = this.firstNum + this.secondNum;\r\n\r\n return enteredResult === expectedResult;\r\n }\r\n\r\n resetForm(): void {\r\n this.contactUsForm.reset();\r\n this.generateCaptcha();\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n","import { Component, ElementRef, EventEmitter, HostListener, Input, OnInit, Output, Renderer2, ViewChild } from '@angular/core';\r\nimport { FormGroup, FormBuilder, FormArray, AbstractControl } from '@angular/forms';\r\nimport { ActivatedRoute, Params, Router } from '@angular/router';\r\nimport { RentalService } from 'src/app/services/Rental.service';\r\nimport { VendorService} from 'src/app/services/Vendor.service';\r\nimport Swal from 'sweetalert2';\r\nimport { forkJoin, Subscription } from 'rxjs';\r\nimport { SharedDataService } from '../SharedData.service';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { customCurrencyPipe } from '../customCurrency.pipe';\r\nimport { Location } from '@angular/common';\r\nimport { PaymentService } from 'src/app/services/paymentService.service';\r\nimport { ModalDirective } from 'ngx-bootstrap/modal';\r\nimport printJS from 'print-js';\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\nimport { UserService } from 'src/app/services/User.service';\r\nimport { GeneralService } from 'src/app/services/General.service';\r\n\r\n@Component({\r\n selector: 'app-vendor-payments',\r\n templateUrl: './vendor-payments.component.html',\r\n styleUrls: ['./vendor-payments.component.scss']\r\n})\r\nexport class VendorPaymentsComponent implements OnInit {\r\n vendorId;\r\n vendorInfo;\r\n vendorMarketID;\r\n displayContract=true;\r\n rules: any[] = [];\r\n totalRentalCharges = 0;\r\n vendorName;\r\n paymentData;\r\n public loaderIcon: Promise;\r\n promoCodeAppliedDiscount;\r\n private subscriptions: Subscription[] = [];\r\n marketId\r\n paymentForm: FormGroup;\r\n warnExcessPayment;\r\n warnZeroPayment;\r\n displayOtherChargeByBooth;\r\n calculateChangeAmount;\r\n keyedInTransaction = true;\r\n processPayment = false;\r\n voidPayment = false;\r\n verifoneId = \"\";\r\n transactionType=\"CREDITSALE\"\r\n creditCardAmount;\r\n DisablePayment = false;\r\n displayAmountPaid=false;\r\n paymentGatewayCredentials;\r\n processCreditCardOnline;\r\n applyCCCharge = false;\r\n thermalPrinting = false;\r\n actualTotalDue = 0;\r\n disablePayBtnAfterSubmit=false;\r\n CcfeeinPercentage;\r\n promoCodeDiscountAmount = 0;\r\n AllowPartialPay;\r\n paymentAmount=0;\r\n wifiOtherItemModel = [];\r\n bookingFeeOtherItemModel = [];\r\n accountReceipId;\r\n secondTaxName = \"Sec Level Tax\";\r\n private clickTimeout: any;\r\n @Input() newVendor;\r\n @Input() businessLicenseInfo;\r\n @Output() cancelClick = new EventEmitter();\r\n toasterConfig = {\r\n closeButton: true,\r\n timeOut: 4500,\r\n easing: 'ease-out',\r\n progressBar: true,\r\n positionClass: 'toast-top-right',\r\n tapToDismiss: true,\r\n showEasing: 'swing',\r\n hideEasing: 'linear',\r\n showMethod: 'fadeIn',\r\n hideMethod: 'slideUp'\r\n };\r\n paymentOnly = false; \r\n openConfirmationPage = false; \r\n enablePromoCode = false;\r\n enableWifiCodeChangesUfm = false;\r\n printWIFIAccessCodeInReceipts = false;\r\n WIFIOtherItemRentalChargeId;\r\n facilityOtherItemRentalChargeId;\r\n otherChargesAutomaticApplicablePeriod;\r\n applyOtherChargesAutomatically;\r\n constructor(private operationRentalService: RentalService,\r\n private vendorService: VendorService,\r\n private marketInfoService: MarketInfoService,\r\n private route: ActivatedRoute,\r\n public router: Router,\r\n private formBuilder: FormBuilder,\r\n private userService:UserService,\r\n private toastr: ToastrService,\r\n private sharedDataService: SharedDataService,\r\n private customCurrency:customCurrencyPipe,\r\n private paymentService: PaymentService,\r\n private generalService:GeneralService,\r\n private location: Location,\r\n private renderer: Renderer2) {\r\n this.paymentForm = this.formBuilder.group({\r\n paymentDetails: this.formBuilder.group({\r\n priorBalance: this.customCurrency.transform('0.00'),\r\n rentalCharge: this.customCurrency.transform('0.00'),\r\n otherCharge: this.customCurrency.transform('0.00'),\r\n facilityCharge: this.customCurrency.transform('0.00'),\r\n discounts: this.customCurrency.transform('0.00'),\r\n additionalCharges: this.customCurrency.transform('0.00'),\r\n paymentAmount: [{ value: this.customCurrency.transform('0.00'), disabled: true }], \r\n convenienceFee: this.customCurrency.transform('0.00'),\r\n changeAmount: this.customCurrency.transform('0.00'),\r\n balanceDue: this.customCurrency.transform('0.00'),\r\n totalPayment: this.customCurrency.transform('0.00'),\r\n totalDue:this.customCurrency.transform('0.00'),\r\n salesTax:this.customCurrency.transform('0.00'),\r\n secondTax:this.customCurrency.transform('0.00'),\r\n rules: this.formBuilder.array(this.initializeRulesArray()),\r\n enableWifiCodeChanges: [{value:true, disabled: true }],\r\n promoCode:''\r\n })\r\n });\r\n }\r\n\r\n initializeRulesArray(): FormGroup[] {\r\n return this.rules.map(rule => this.formBuilder.group({\r\n isChecked: [false], // Initialize checkbox with false\r\n rulesAndRegualtions: [rule.rulesAndRegualtions],\r\n AgreementLinkRequired: [rule.AgreementLinkRequired],\r\n AgreementBlobURL: [rule.AgreementBlobURL],\r\n AgreementLinkTextContent: [rule.AgreementLinkTextContent]\r\n }));\r\n }\r\n\r\n updateArrayDirectly(index: number, updatedValue: any) {\r\n const isChecked = (event.target as HTMLInputElement).checked;\r\n const control = this.rulesFormArray.at(index);\r\n if (control) {\r\n this.paymentForm.controls['paymentDetails'].value['rules'][index].isChecked = isChecked;\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this.route.params.subscribe((params: Params) => {\r\n this.marketId = params['marketId'];\r\n this.vendorId = params['vendorId'];\r\n this.marketInfoService.setMarketId(this.marketId);\r\n }); \r\n\r\n if (!this.sharedDataService.paymentSharedData) {\r\n const url = 'rent-online/' + this.marketId + '/' + this.vendorId +'/';\r\n this.router.navigate([url]);\r\n }\r\n\r\n this.paymentData = this.sharedDataService.paymentSharedData;\r\n this.vendorId = this.paymentData.VendorId;\r\n this.totalRentalCharges = (this.paymentData.PriorBalance + this.paymentData.RentalCharge + this.paymentData.SalesTax\r\n + this.paymentData.SecLevelTax + this.paymentData.OtherCharge + (this.paymentData.BookingFee ?? 0)) -this.paymentData.DiscountAmount;\r\n this.paymentOnly = this.paymentData.PaymentOnly;\r\n this.sharedDataService.rentalType = this.paymentData.RentalType;\r\n\r\n this.actualTotalDue = this.totalRentalCharges;\r\n this.paymentForm.controls['paymentDetails'].patchValue({\r\n priorBalance: this.customCurrency.transform(this.paymentData.PriorBalance),\r\n rentalCharge: this.customCurrency.transform(this.paymentData.RentalCharge),\r\n otherCharge: this.customCurrency.transform(this.paymentData.OtherCharge),\r\n discounts: this.customCurrency.transform(this.paymentData.DiscountAmount),\r\n additionalCharges: this.customCurrency.transform(this.paymentData.BookingFee ?? 0),\r\n totalDue: this.customCurrency.transform(this.totalRentalCharges.toString()),\r\n salesTax:this.customCurrency.transform(this.paymentData.SalesTax),\r\n secondTax: this.customCurrency.transform(this.paymentData.SecLevelTax),\r\n });\r\n this.getRentalAndCustomSettings();\r\n this.getVendorInfobyId();\r\n this.getCCCredentials(); \r\n this.getWebRentalSetting(); \r\n this.getMarketRulesAndRegulations();\r\n }\r\n \r\n getRentalAndCustomSettings() {\r\n forkJoin({\r\n resRentalSettings: this.operationRentalService.getRentalSettings(this.marketId),\r\n resCustomSettings: this.operationRentalService.getCustomSettings(this.marketId)\r\n }).subscribe(\r\n ({ resRentalSettings, resCustomSettings }: any) => {\r\n if (resRentalSettings) {\r\n this.secondTaxName = resRentalSettings.SecondTaxName ? resRentalSettings.SecondTaxName : \"Sec Level Tax\";\r\n this.printWIFIAccessCodeInReceipts = resRentalSettings.PrintWIFIAccessCodeInReceipts;\r\n this.WIFIOtherItemRentalChargeId = resRentalSettings.WIFIOtherItemRentalChargeId;\r\n }\r\n if (resCustomSettings) {\r\n this.enablePromoCode = resCustomSettings.EnableWrpromocode;\r\n this.enableWifiCodeChangesUfm = resCustomSettings.EnableWifiCodeChangesUfm;\r\n }\r\n\r\n if(this.enableWifiCodeChangesUfm){\r\n this.getWIFIOtherChargeItem();\r\n }\r\n }\r\n );\r\n }\r\n\r\n getFacilityOtherChargeItem() {\r\n this.subscriptions.push(this.operationRentalService.getWIFIOtherItem(this.marketId, this.facilityOtherItemRentalChargeId).subscribe((res: any) => {\r\n if (res) {\r\n this.calculateFacilityCharges(res,true);\r\n }\r\n }));\r\n }\r\n\r\n getWIFIOtherChargeItem() {\r\n this.subscriptions.push(this.operationRentalService.getWIFIOtherItem(this.marketId, this.WIFIOtherItemRentalChargeId).subscribe((res: any) => {\r\n if (res) {\r\n this.calculateFacilityCharges(res,false);\r\n }\r\n }));\r\n }\r\n\r\n calculateTotalBookingFeeAmount(res){\r\n var bookingFee = 0;\r\n if (this.paymentData.RentalType == 1) {\r\n this.bookingFeeOtherItemModel = [];\r\n if (this.paymentData.DailyRentalBooth.length > 0) {\r\n for (const item of this.paymentData.DailyRentalBooth) {\r\n this.bookingFeeOtherItemModel.push({\r\n OtherItemId: res.OtherItemId,\r\n OtherItemName: res.OtherItem,\r\n OtherItemCharge: res.OtherItemCharge,\r\n Quantity: 1,\r\n RentalDay: item.RentalDay,\r\n BoothNumber: \"\",\r\n OtherCharge: res.OtherItemCharge,\r\n SalesTax: 0,\r\n SecLevelTax: 0,\r\n Reference: \"\"\r\n })\r\n bookingFee += res.OtherItemCharge;\r\n }\r\n }\r\n this.paymentForm.controls['paymentDetails'].patchValue({\r\n additionalCharges: this.customCurrency.transform(bookingFee.toString())\r\n });\r\n this.actualTotalDue += bookingFee\r\n this.totalRentalCharges += bookingFee;\r\n this.calculateBalance();\r\n }\r\n\r\n }\r\n\r\n calculateFacilityCharges(res, automaticOtherCharge) {\r\n var facilityCharge = 0;\r\n if (this.paymentData.RentalType == 1) {\r\n //this.wifiOtherItemModel = [];\r\n if (this.paymentData.DailyRentalBooth.length > 0) {\r\n var distinctRentDates = Array.from(\r\n new Set(this.paymentData.DailyRentalBooth.map((item: any) => \r\n new Date(item.RentalDay).toISOString().split('T')[0] // Extract YYYY-MM-DD\r\n ))\r\n );\r\n\r\n if (automaticOtherCharge && this.otherChargesAutomaticApplicablePeriod == 1) {\r\n distinctRentDates.length = 1;\r\n }\r\n\r\n if (distinctRentDates.length > 0) {\r\n for (const item of distinctRentDates) {\r\n this.wifiOtherItemModel.push({\r\n OtherItemId: res.OtherItemId,\r\n OtherItemName: res.OtherItem,\r\n OtherItemCharge: res.OtherItemCharge,\r\n Quantity: 1,\r\n RentalDay: item,\r\n BoothNumber: \"\",\r\n OtherCharge: res.OtherItemCharge,\r\n SalesTax: 0,\r\n SecLevelTax: 0,\r\n Reference: \"\"\r\n })\r\n facilityCharge += res.OtherItemCharge;\r\n }\r\n }\r\n }\r\n }\r\n\r\n else if (this.paymentData.RentalType == 5) {\r\n this.wifiOtherItemModel = [];\r\n const distinctRentDates: string[] = [];\r\n if (this.paymentData.CombinedWeeklyRentalBooth.length > 0) {\r\n const distinctStartDates = Array.from(\r\n new Set(\r\n this.paymentData.CombinedWeeklyRentalBooth.map((item: any) => item.RentalWeeekStartDate)\r\n )\r\n );\r\n\r\n const distinctRentDates = new Set();\r\n\r\n distinctStartDates.forEach((startDate: string) => {\r\n const relatedItem = this.paymentData.CombinedWeeklyRentalBooth.find(\r\n (item: any) => item.RentalWeeekStartDate === startDate\r\n );\r\n\r\n if (relatedItem) {\r\n const rentalWeekStart = new Date(startDate);\r\n const rentalEndDate = new Date(relatedItem.RentalEndDate);\r\n let currentWeekStart = new Date(rentalWeekStart);\r\n\r\n while (currentWeekStart <= rentalEndDate) {\r\n const formattedDate = currentWeekStart.toISOString().split('T')[0];\r\n distinctRentDates.add(formattedDate);\r\n currentWeekStart.setDate(currentWeekStart.getDate() + 7);\r\n }\r\n }\r\n });\r\n\r\n var uniqueRentDatesArray = Array.from(distinctRentDates);\r\n\r\n if (uniqueRentDatesArray.length > 0) {\r\n for (const item of uniqueRentDatesArray) {\r\n this.wifiOtherItemModel.push({\r\n OtherItemId: res.OtherItemId,\r\n OtherItemName: res.OtherItem,\r\n OtherItemCharge: res.OtherItemCombinedWeeklyCharge,\r\n Quantity: 1,\r\n RentalWeek: new Date(item),\r\n Recurring: false,\r\n BoothNumber: \"\",\r\n OtherCharge: res.OtherItemCombinedWeeklyCharge,\r\n SalesTax: 0,\r\n SecLevelTax: 0,\r\n Reference: \"\"\r\n })\r\n facilityCharge += res.OtherItemCombinedWeeklyCharge;\r\n if (this.otherChargesAutomaticApplicablePeriod == 1) // apply for one period\r\n {\r\n uniqueRentDatesArray = [];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n else if (this.paymentData.RentalType == 4 || this.paymentData.RentalType == 2) {\r\n var otherCharge = this.paymentData.RentalType == 4 ? res.OtherItemCombinedMonthlyCharge : res.OtherItemMonthlyCharge;\r\n this.wifiOtherItemModel = [];\r\n if (this.paymentData.MonthlyRentalBooth.length > 0) {\r\n var distinctRentalYearMonth = Array.from(\r\n new Set(this.paymentData.MonthlyRentalBooth.map((item: any) => item.RentalYearMonth))\r\n );\r\n\r\n if (distinctRentalYearMonth.length > 0) {\r\n for (const item of distinctRentalYearMonth) {\r\n this.wifiOtherItemModel.push({\r\n OtherItemId: res.OtherItemId,\r\n OtherItemName: res.OtherItem,\r\n OtherItemCharge: otherCharge,\r\n Quantity: 1,\r\n YearMonth: item,\r\n BoothNumber: \"\",\r\n OtherCharge: otherCharge,\r\n SalesTax: 0,\r\n SecLevelTax: 0,\r\n Reference: \"\"\r\n })\r\n facilityCharge += otherCharge;\r\n if (this.otherChargesAutomaticApplicablePeriod == 1) // apply for one period\r\n {\r\n distinctRentalYearMonth = [];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n var totalFacilityCharge = this.paymentForm.controls['paymentDetails'].get('facilityCharge').value;\r\n this.actualTotalDue += facilityCharge;\r\n this.totalRentalCharges += facilityCharge;\r\n totalFacilityCharge = totalFacilityCharge.toString().includes('(') && totalFacilityCharge.toString().includes(')') ? -1 * parseFloat(totalFacilityCharge.toString().replace(/[^0-9.-]/g, '')) : parseFloat(totalFacilityCharge.toString().replace(/[^0-9.-]/g, ''));\r\n if (totalFacilityCharge != 0)\r\n facilityCharge = totalFacilityCharge + facilityCharge;\r\n this.paymentForm.controls['paymentDetails'].patchValue({\r\n facilityCharge: this.customCurrency.transform(facilityCharge.toString())\r\n });\r\n this.calculateBalance();\r\n }\r\n\r\n getMarketRulesAndRegulations() {\r\n this.subscriptions.push(this.generalService.getWebrentalMarketRules(this.marketId).subscribe((rules: any) => {\r\n if (rules) {\r\n const rulesArray = this.paymentForm.controls['paymentDetails'].get('rules') as FormArray;\r\n rules.forEach(rule => {\r\n rulesArray.push(this.formBuilder.group({\r\n id: rule.ID,\r\n isChecked: false,\r\n rulesAndRegualtions: rule.Rules,\r\n AgreementLinkRequired : rule.AgreementLinkRequired ?? false,\r\n AgreementLinkTextContent: rule.AgreementLinkTextContent ?? \"\",\r\n AgreementBlobURL : rule.AgreementBlobURL ?? \"\"\r\n }));\r\n });\r\n }\r\n }));\r\n }\r\n\r\n allCheckboxesCheckedValidator(control: AbstractControl) {\r\n var allChecked = this.paymentForm.controls['paymentDetails'].value['rules'].filter(e=>!e.isChecked).length > 0 ? false : true;\r\n return allChecked;\r\n }\r\n\r\n get rulesFormArray() {\r\n return this.paymentForm.controls['paymentDetails'].value['rules'] as FormArray;\r\n }\r\n\r\n getWebRentalSetting() {\r\n this.subscriptions.push(this.marketInfoService.getWebRentalSetting(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.applyCCCharge = res.ApplyCcporcessingFeePercentage;\r\n this.CcfeeinPercentage = res.CcfeeinPercentage;\r\n this.AllowPartialPay = res.AllowPartialPay; \r\n this.paymentForm.controls['paymentDetails'].get('paymentAmount').enable();\r\n if (!this.AllowPartialPay) {\r\n this.paymentForm.controls['paymentDetails'].get('paymentAmount').disable();\r\n this.paymentForm.controls['paymentDetails'].patchValue({\r\n paymentAmount: this.customCurrency.transform(this.actualTotalDue.toString()),\r\n totalPayment: this.customCurrency.transform(this.actualTotalDue.toString()),\r\n })\r\n }\r\n this.paymentAmount = this.paymentForm.controls['paymentDetails'].get('totalPayment').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('totalPayment').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('totalPayment').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('totalPayment').value.toString().replace(/[^0-9.-]/g, ''));\r\n const creditCardAmount = this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, ''));\r\n if (this.applyCCCharge && creditCardAmount > 0) {\r\n this.calculateConvenienceFee();\r\n }\r\n\r\n this.applyOtherChargesAutomatically = res.ApplyOtherChargesAutomatically;\r\n this.facilityOtherItemRentalChargeId = res.AutomaticApplicableOtherChargeId;\r\n this.otherChargesAutomaticApplicablePeriod = res.OtherChargesAutomaticApplicablePeriod;\r\n if (this.applyOtherChargesAutomatically) {\r\n this.getFacilityOtherChargeItem();\r\n }\r\n const applyBookingFee = res.ApplyBookingFee;\r\n const applyBookingFeeId = res.ApplyBookingFeeId;\r\n if (applyBookingFee) {\r\n this.subscriptions.push(this.operationRentalService.getBookingFeeById(this.marketId, applyBookingFeeId).subscribe((resFee: any) => {\r\n if (resFee) {\r\n this.calculateTotalBookingFeeAmount(resFee);\r\n }\r\n }));\r\n }\r\n }\r\n }, err => {\r\n }));\r\n }\r\n\r\n setCurrencyFormat(controls) {\r\n const value = controls.value;\r\n let inputValue = value;\r\n if(inputValue.toString().substring(1,2) == \"$\")\r\n inputValue = `${inputValue.slice(1)}`;\r\n controls.setValue(inputValue);\r\n }\r\n\r\n onCheckNumKeyPress(event: KeyboardEvent) {\r\n const allowedChars = /[a-zA-Z0-9]/;\r\n const key = event.key;\r\n if (event.key === 'Backspace' || event.key === 'Delete' || event.key === 'ArrowLeft' || event.key === 'ArrowRight' || event.key === '#') {\r\n return;\r\n }\r\n if (!key.match(allowedChars)) {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n applyPromoCodeDiscount() {\r\n var obj = {\r\n VendorId: this.vendorId,\r\n MarketId: this.marketId,\r\n PromoCode: this.paymentForm.controls['paymentDetails'].value[\"promoCode\"]\r\n }\r\n const days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thur', 'Fri', 'Sat'];\r\n const bookingDay = days[new Date().getDay()];\r\n var discountedAmount = this.paymentForm.controls['paymentDetails'].get('discounts').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('discounts').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('discounts').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('discounts').value.toString().replace(/[^0-9.-]/g, ''));\r\n this.subscriptions.push(this.vendorService.validatePromoCode(obj).subscribe(async (disc) => {\r\n var promocodeDiscount = 0; \r\n const promoCodeUsedCount = await this.operationRentalService.getPromoCodeAppliedCountForVendor(this.marketId, this.vendorId, disc.PlanSeqId).toPromise(); \r\n if(promoCodeUsedCount && promoCodeUsedCount.AppliedCount >= disc.UsageLimit)\r\n {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Promo code is not applicable.`,\r\n icon: \"info\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n return false;\r\n }\r\n if (!disc || !disc.PlanId || !disc.WebRentalApplicable) {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Promo code is not valid.`,\r\n icon: \"info\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n } else {\r\n if (this.promoCodeDiscountAmount > 0) {\r\n this.paymentData.DiscountAmount -= this.promoCodeDiscountAmount;\r\n discountedAmount -= this.promoCodeDiscountAmount;\r\n this.totalRentalCharges += this.promoCodeDiscountAmount;\r\n this.actualTotalDue = this.totalRentalCharges;\r\n if (!this.AllowPartialPay) {\r\n this.paymentForm.controls['paymentDetails'].patchValue({\r\n paymentAmount: this.customCurrency.transform(this.actualTotalDue.toString()),\r\n totalPayment: this.customCurrency.transform(this.actualTotalDue.toString()),\r\n })\r\n }\r\n this.paymentForm.controls['paymentDetails'].patchValue({\r\n discounts: this.customCurrency.transform(this.paymentData.DiscountAmount),\r\n totalDue: this.customCurrency.transform(this.totalRentalCharges.toString())\r\n });\r\n this.promoCodeDiscountAmount = 0;\r\n }\r\n var promoCodeAppliedForCurrentDay = disc[bookingDay]\r\n if (promoCodeAppliedForCurrentDay) { \r\n var promocodeAppliedForRentalType = this.paymentData.RentalType == 1 ? disc.Daily : \r\n this.paymentData.RentalType == 2 ? disc.Monthly:\r\n this.paymentData.RentalType == 3 ? disc.Weekly:\r\n this.paymentData.RentalType == 4 ? disc.CombinedMonthly:\r\n this.paymentData.RentalType == 5 ? disc.CombinedWeekly:false;\r\n\r\n if (promocodeAppliedForRentalType && disc.Selected) {\r\n var priorBalance = this.paymentData.PriorBalance;\r\n if (!disc.BalanceDue || (disc.BalanceDue && priorBalance <= 0)) {\r\n if (!disc.IsExceedAmount || (disc.IsExceedAmount && this.totalRentalCharges > disc.ExceedAmount)) {\r\n const discountValue = disc.DiscountValue;\r\n if (disc.DiscountType == '0') {\r\n promocodeDiscount = this.totalRentalCharges * (discountValue / 100);\r\n }\r\n else {\r\n promocodeDiscount = discountValue;\r\n }\r\n discountedAmount += promocodeDiscount;\r\n this.sharedDataService.rentalType = this.paymentData.RentalType;\r\n this.totalRentalCharges -= promocodeDiscount;\r\n this.actualTotalDue = this.totalRentalCharges;\r\n this.paymentData.DiscountAmount = parseFloat(this.paymentData.DiscountAmount) + promocodeDiscount;\r\n if (!this.AllowPartialPay) {\r\n this.paymentAmount = this.actualTotalDue;\r\n this.paymentForm.controls['paymentDetails'].patchValue({\r\n paymentAmount: this.customCurrency.transform(this.actualTotalDue.toString()),\r\n totalPayment: this.customCurrency.transform(this.actualTotalDue.toString()),\r\n })\r\n }\r\n this.paymentForm.controls['paymentDetails'].patchValue({\r\n discounts: this.customCurrency.transform(this.paymentData.DiscountAmount),\r\n totalDue: this.customCurrency.transform(this.totalRentalCharges.toString())\r\n }); \r\n this.promoCodeDiscountAmount = promocodeDiscount;\r\n this.promoCodeAppliedDiscount = \"\";\r\n this.promoCodeAppliedDiscount = {\r\n PlanId: disc.PlanSeqId,\r\n DiscountAmount: promocodeDiscount,\r\n OtherCharges: disc.OtherItems,\r\n SalesTax: disc.SalesTax,\r\n SecondLevelTax: disc.SecondLevelTax,\r\n DiscountType: disc.DiscountType,\r\n DiscountValue: disc.DiscountValue,\r\n SalesTaxAmount: 0,\r\n SecondLevelTaxAmount: 0\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else{\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Promo code is not applicable.`,\r\n icon: \"info\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n }\r\n }));\r\n }\r\n\r\n setMinimum(controls) {\r\n const value = controls.value;\r\n var enteredAmount = value.toString().includes('(') && value.toString().includes(')') ? -1 * parseFloat(value.toString().replace(/[^0-9.-]/g, '')): parseFloat(value.toString().replace(/[^0-9.-]/g, ''));\r\n if (!enteredAmount) {\r\n controls.setValue(this.customCurrency.transform(\"0.00\"));\r\n }\r\n var totalDue = this.paymentForm.controls['paymentDetails'].value[\"totalDue\"];\r\n totalDue = totalDue.toString().includes('(') && totalDue.toString().includes(')') ? -1 * parseFloat(totalDue.toString().replace(/[^0-9.-]/g, '')): parseFloat(totalDue.toString().replace(/[^0-9.-]/g, ''));\r\n if (enteredAmount > this.actualTotalDue) {\r\n this.paymentForm.controls['paymentDetails'].get(\"paymentAmount\").setValue(this.actualTotalDue);\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Payment amount cannot be greater than total due.`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n this.calculateBalance();\r\n }\r\n\r\n calculateBalance() { \r\n const facilityCharge = this.getActualAmountFromInp(this.paymentForm.controls['paymentDetails'].get('facilityCharge').value);\r\n const additionalCharges = this.getActualAmountFromInp(this.paymentForm.controls['paymentDetails'].get('additionalCharges').value); \r\n const rentalCharge = this.getActualAmountFromInp(this.paymentForm.controls['paymentDetails'].get('rentalCharge').value);\r\n const otherCharge = this.getActualAmountFromInp(this.paymentForm.controls['paymentDetails'].get('otherCharge').value);\r\n const salesTax = this.getActualAmountFromInp(this.paymentForm.controls['paymentDetails'].get('salesTax').value);\r\n const secondTax = this.getActualAmountFromInp(this.paymentForm.controls['paymentDetails'].get('secondTax').value);\r\n const priorBalance = this.getActualAmountFromInp(this.paymentForm.controls['paymentDetails'].get('priorBalance').value);\r\n var totalRentalCharge = rentalCharge + otherCharge + salesTax + secondTax + facilityCharge + additionalCharges;\r\n if (priorBalance < 0 && (totalRentalCharge + priorBalance <= 0)) {\r\n this.actualTotalDue = 0\r\n }\r\n if ((facilityCharge ?? 0) > 0 || (additionalCharges ?? 0) > 0) { \r\n if (!this.AllowPartialPay) {\r\n this.paymentForm.controls['paymentDetails'].patchValue({\r\n paymentAmount: this.customCurrency.transform(this.actualTotalDue.toString())\r\n });\r\n }\r\n }\r\n var creditCardAmount = this.getActualAmountFromInp(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value);\r\n this.creditCardAmount = this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, ''));\r\n var totalDue = this.actualTotalDue; \r\n const convenienceFee = 0;\r\n\r\n var totalAmount;\r\n totalAmount = creditCardAmount + convenienceFee;\r\n var balanceAmount = totalDue - totalAmount;\r\n if (priorBalance < 0 && (totalRentalCharge + priorBalance <= 0)) {\r\n balanceAmount = priorBalance + totalRentalCharge;\r\n }\r\n \r\n this.paymentForm.controls['paymentDetails'].patchValue({\r\n totalDue: this.customCurrency.transform(totalDue.toString()),\r\n balanceDue: this.customCurrency.transform(balanceAmount.toString()),\r\n convenienceFee: this.customCurrency.transform(convenienceFee.toString()),\r\n totalPayment: this.customCurrency.transform(totalAmount.toString())\r\n })\r\n\r\n this.paymentAmount = this.paymentForm.controls['paymentDetails'].get('totalPayment').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('totalPayment').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('totalPayment').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('totalPayment').value.toString().replace(/[^0-9.-]/g, ''));\r\n\r\n if(this.applyCCCharge && creditCardAmount > 0){\r\n this.calculateConvenienceFee();\r\n }\r\n\r\n this.paymentForm.controls['paymentDetails'].get('paymentAmount').setValue(this.customCurrency.transform(creditCardAmount.toString()));\r\n }\r\n\r\n getVendorInfobyId() {\r\n this.subscriptions.push(this.vendorService.GetVendorById(this.vendorId, this.marketId).subscribe((response) => {\r\n if (response) {\r\n this.vendorInfo = response.body;\r\n this.vendorMarketID = this.vendorInfo.MarketVendorId;\r\n this.vendorName = this.vendorInfo.IsPublicVendor ? (this.paymentData.VendorName != undefined ? this.paymentData.VendorName.toString() : this.vendorInfo.VendorName) : this.vendorInfo.VendorName;\r\n this.marketId = this.vendorInfo.MarketId\r\n }\r\n }, (err) => {\r\n }));\r\n }\r\n\r\n calculateConvenienceFee() {\r\n var convenienceFee = 0;\r\n var creditCardAmount = this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, ''));\r\n var totalDue = this.actualTotalDue;\r\n if (creditCardAmount > 0) {\r\n var convenienceFee = creditCardAmount * ((this.CcfeeinPercentage) / 100);\r\n totalDue += convenienceFee;\r\n this.creditCardAmount += convenienceFee;\r\n }\r\n var totalAmount = 0;\r\n totalAmount = creditCardAmount + convenienceFee;\r\n const balanceAmount = totalDue - totalAmount;\r\n\r\n this.paymentForm.controls['paymentDetails'].patchValue({\r\n convenienceFee: this.customCurrency.transform(convenienceFee.toString()),\r\n totalDue: this.customCurrency.transform(totalDue.toString()),\r\n balanceDue: this.customCurrency.transform(balanceAmount.toString()),\r\n totalPayment: this.customCurrency.transform(totalAmount.toString())\r\n })\r\n this.paymentAmount = this.paymentForm.controls['paymentDetails'].get('totalPayment').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('totalPayment').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('totalPayment').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('totalPayment').value.toString().replace(/[^0-9.-]/g, ''));\r\n }\r\n\r\n numberOnly(event): boolean {\r\n const inputValue = event.target.value;\r\n const charCode = (event.which) ? event.which : event.keyCode;\r\n const currentCursorPosition = event.target.selectionStart;\r\n const currentSelectionLength = event.target.selectionEnd - event.target.selectionStart;\r\n // Check if the input value is \"$0.00\"\r\n if (charCode == 45) {\r\n return false;\r\n }\r\n if (currentSelectionLength === inputValue.length) {\r\n return true;\r\n }\r\n if (inputValue === '$0.00') {\r\n // Set the cursor position after the \"$\" sign\r\n event.target.setSelectionRange(1, 1);\r\n return true; // Allow further input\r\n }\r\n // Check if the \"$\" sign is present in the current value\r\n const hasDollarSign = inputValue.includes('$');\r\n // Check if the cursor position is after the \"$\" sign\r\n const hasDollarSignBeforeCaret = inputValue.slice(0, currentCursorPosition).includes('$');\r\n // If the cursor is not after the \"$\" sign and \"$\" sign is present, prevent input\r\n if (!hasDollarSignBeforeCaret && hasDollarSign && charCode !== 46 && (charCode < 48 || charCode > 57)) {\r\n return false;\r\n }\r\n // If the entered character is a dot and there's already a dot in the input, prevent input\r\n if (charCode == 46 && inputValue.includes('.') && inputValue.indexOf('.') !== currentCursorPosition) {\r\n return false;\r\n }\r\n if (charCode > 31 && (charCode < 46 || charCode > 57 || charCode === 47)) {\r\n return false;\r\n }\r\n return true; // Allow input\r\n }\r\n\r\n numberOnlyForCash(event: any) {\r\n // Get the current value of the input field\r\n const currentValue: string = event.target.value;\r\n const currentCursorPosition = event.target.selectionStart;\r\n const currentSelectionLength = event.target.selectionEnd - event.target.selectionStart;\r\n if (currentSelectionLength === currentValue.length) {\r\n return true;\r\n }\r\n // Check if the input value is \"0\" and if it contains a \"$\" sign\r\n if (currentValue === '0' && !currentValue.includes('$')) {\r\n // Set the new value with \"$\" sign\r\n event.target.value = '$0';\r\n // Set the cursor position after the \"$\" sign\r\n event.target.setSelectionRange(1, 1);\r\n return;\r\n }\r\n // Check if the \"$\" sign is present in the current value\r\n const hasDollarSign = currentValue.includes('$');\r\n // Allow input if the \"$\" sign is not present\r\n if (!hasDollarSign) {\r\n return;\r\n }\r\n // Get the cursor position\r\n const caretPosition = event.target.selectionStart;\r\n // Check if the cursor position is after the \"$\" sign\r\n const hasDollarSignBeforeCaret = currentValue.slice(0, caretPosition).includes('$');\r\n // If the cursor is not after the \"$\" sign, prevent input\r\n if (!hasDollarSignBeforeCaret) {\r\n event.preventDefault();\r\n return;\r\n }\r\n\r\n // Allow digits, a dot, and an optional '-' at the beginning\r\n const pattern = /^-?\\d*\\.?\\d*$/;\r\n // Get the character entered by the user\r\n const inputChar = String.fromCharCode(event.charCode);\r\n // Check if the input matches the pattern\r\n if (!pattern.test(inputChar) || // If the entered character is not allowed\r\n (inputChar === '.' && currentValue.includes('.')) || // Or if the dot is already present\r\n (inputChar === '-' && currentValue.indexOf('-') !== -1)) { // Or if '-' is entered more than once\r\n event.preventDefault(); // Prevent the character from being entered\r\n }\r\n }\r\n\r\n handledblClick(event: any) {\r\n clearTimeout(this.clickTimeout);\r\n\r\n const inputElement = event.target as HTMLInputElement;\r\n inputElement.select(); // Select the entire text on double-click\r\n }\r\n\r\n handleClick(event: any) {\r\n // Get the current value of the input field\r\n let currentValue: string = event.target.value;\r\n const currentCursorPosition = event.target.selectionStart;\r\n const currentSelectionLength = event.target.selectionEnd - event.target.selectionStart;\r\n const inputElement = event.target as HTMLInputElement;\r\n const inputValue = inputElement.value;\r\n clearTimeout(this.clickTimeout);\r\n\r\n this.clickTimeout = setTimeout(() => {\r\n if (inputValue === '$0.00') {\r\n const selectionLength = inputElement.selectionEnd - inputElement.selectionStart;\r\n\r\n // If the entire text is not selected, set the cursor position after the \"$\" sign\r\n if (selectionLength !== inputValue.length) {\r\n inputElement.setSelectionRange(1, 1);\r\n }\r\n }\r\n }, 200); // Delay to check for double click\r\n \r\n if (currentSelectionLength === currentValue.length) {\r\n return true;\r\n }\r\n // Check if the input value is \"$0.00\"\r\n if (currentValue === '$0.00') {\r\n // Set the cursor position after the \"$\" sign\r\n event.target.setSelectionRange(1, 1);\r\n return;\r\n }\r\n\r\n // Check if the \"$\" sign is present in the current value\r\n const hasDollarSign = currentValue.includes('$');\r\n // Get the cursor position\r\n const caretPosition = event.target.selectionStart;\r\n // Check if the cursor position is after the \"$\" sign\r\n const hasDollarSignBeforeCaret = currentValue.slice(0, caretPosition).includes('$');\r\n // If the cursor is not after the \"$\" sign, adjust the cursor position\r\n if (!hasDollarSignBeforeCaret && hasDollarSign) {\r\n // Find the index of \"$\" sign\r\n const dollarSignIndex = currentValue.indexOf('$');\r\n // Set the cursor position after the \"$\" sign\r\n event.target.setSelectionRange(dollarSignIndex + 1, dollarSignIndex + 1);\r\n }\r\n }\r\n\r\n getActualAmountFromInp(value) {\r\n var amount = value.toString().includes('(') && value.toString().includes(')') ? -1 * parseFloat(value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(value.toString().replace(/[^0-9.-]/g, ''));\r\n return amount;\r\n }\r\n\r\n saveRentalWithPayment() { \r\n var paymentAdjustedWithPriorBal = false;\r\n var creditCardAmount = this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, ''));\r\n var convenienceFee = this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, ''));\r\n const rentalCharge = this.getActualAmountFromInp(this.paymentForm.controls['paymentDetails'].get('rentalCharge').value)\r\n const otherCharge = this.getActualAmountFromInp(this.paymentForm.controls['paymentDetails'].get('otherCharge').value)\r\n const salesTax = this.getActualAmountFromInp(this.paymentForm.controls['paymentDetails'].get('salesTax').value)\r\n const secondTax = this.getActualAmountFromInp(this.paymentForm.controls['paymentDetails'].get('secondTax').value)\r\n const additionalCharge = this.getActualAmountFromInp(this.paymentForm.controls['paymentDetails'].get('additionalCharges').value)\r\n const priorBalance = this.getActualAmountFromInp(this.paymentForm.controls['paymentDetails'].get('priorBalance').value)\r\n var totalCharges = rentalCharge + otherCharge + salesTax + secondTax + additionalCharge;\r\n if (priorBalance < 0 && (totalCharges + priorBalance <= 0)){\r\n paymentAdjustedWithPriorBal = true;\r\n }\r\n const totalAmountPaid = creditCardAmount + convenienceFee;\r\n if (totalAmountPaid != 0) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want to proceed with the payment?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n if (paymentAdjustedWithPriorBal) {\r\n var obj = {\r\n PaymentSuccess: true,\r\n OrderId: \"\",\r\n VerifoneId: 0\r\n }\r\n this.PaymentResponse(obj)\r\n } else {\r\n this.disablePayBtnAfterSubmit = true;\r\n if (this.paymentGatewayCredentials && this.processCreditCardOnline)\r\n this.processPayment = true;\r\n else {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Credit card cannot be processed.`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n }\r\n }\r\n });\r\n }\r\n else if (paymentAdjustedWithPriorBal) {\r\n var obj = {\r\n PaymentSuccess: true,\r\n OrderId: \"\",\r\n VerifoneId: 0\r\n }\r\n this.PaymentResponse(obj)\r\n }\r\n else {\r\n Swal.fire({\r\n title: $localize`Warning`,\r\n text: $localize`Please enter the Payment Amount!`,\r\n icon: \"warning\",\r\n confirmButtonText: $localize`Ok`,\r\n });\r\n }\r\n }\r\n\r\n PaymentResponse(response) {\r\n this.loaderIcon = Promise.resolve(true);\r\n if (response.PaymentSuccess) {\r\n this.verifoneId = response.VerifoneId;\r\n if (this.newVendor) {\r\n this.subscriptions.push(\r\n this.vendorService.SaveVendor(this.sharedDataService.newVendorContactInfo).subscribe((SaveVenresponse: any) => {\r\n if (SaveVenresponse.Success) {\r\n this.vendorId = SaveVenresponse.Id;\r\n this.loaderIcon = Promise.resolve(true);\r\n this.sharedDataService.newVendorLoginDetails.VendorId = SaveVenresponse.Id;\r\n this.vendorService.SaveVendorLoginDetail(this.sharedDataService.newVendorLoginDetails).subscribe((res: any) => {\r\n if (res.Success) {\r\n const credentials =\r\n {\r\n username: this.sharedDataService.newVendorLoginDetails.OnlineUserId,\r\n password: this.sharedDataService.newVendorLoginDetails.OnlinePassword,\r\n EmailLogin: false,\r\n MarketId: this.marketId\r\n }\r\n this.userService.getToken(credentials).subscribe(async (resTokenGen) => {\r\n sessionStorage.setItem('token', resTokenGen.token);\r\n if (this.businessLicenseInfo) {\r\n if (this.businessLicenseInfo.BusinessLicenseNoRequired) {\r\n const obj = {\r\n VendorID: this.vendorId,\r\n LicenseNameId: 1,\r\n LicenseName: \"\",\r\n ExpiryDate: new Date(this.businessLicenseInfo.ExpiryDate),\r\n LicenseNumber: this.businessLicenseInfo.LicenseNumber\r\n }\r\n this.subscriptions.push(this.operationRentalService.updateVendorBusinessLicense(this.marketId, obj).subscribe((res: any) => {\r\n }));\r\n }\r\n }\r\n // Proceed to save booking details after both vendor and login details are saved\r\n this.saveBookingDetails(response);\r\n this.sharedDataService.newVendorLoginDetails =\"\";\r\n this.sharedDataService.newVendorContactInfo = \"\";\r\n });\r\n } else {\r\n this.toastr.error($localize`Failed to save vendor login details`, $localize`Error`, this.toasterConfig);\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n });\r\n } else {\r\n this.toastr.error($localize`Failed to save vendor`, $localize`Error`, this.toasterConfig);\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n })\r\n );\r\n } else {\r\n // Directly save booking details without vendor saving\r\n this.saveBookingDetails(response);\r\n }\r\n }\r\n else {\r\n this.processPayment = false;\r\n this.voidPayment = false;\r\n this.disablePayBtnAfterSubmit = false;\r\n this.loaderIcon = Promise.resolve(false);\r\n }\r\n }\r\n\r\n saveBookingDetails(response) { \r\n switch (this.paymentData.RentalType) {\r\n case 1:\r\n var convenienceFee = this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, ''));\r\n if (convenienceFee > 0 && this.paymentOnly) {\r\n this.paymentOnly = false;\r\n }\r\n var obj = {\r\n VendorId: this.vendorId,\r\n PaymentOrderId: response.OrderId,\r\n RentalCharge: this.paymentData.RentalCharge,\r\n SalesTax: this.paymentData.SalesTax,\r\n SecLevelTax: this.paymentData.SecLevelTax,\r\n OtherCharge: this.paymentData.OtherCharge,\r\n PriorBalance: this.paymentData.PriorBalance,\r\n TotalBalanceDue: this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')),\r\n RentalNotes: this.paymentData.RentalNotes,\r\n CashAmount: 0,\r\n CheckAmount: 0,\r\n CheckNo: \"\",\r\n ChangeAmount: 0,\r\n CardAmount: this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')),\r\n DirectDebitAmount: 0,\r\n CardType: \"\",\r\n PaymentDone: true,\r\n WebRentalRequest: true,\r\n PaymentDueDate: this.paymentData.PaymentDueDate,\r\n VerifoneId: response.VerifoneId,\r\n DiscountAmount: this.paymentData.DiscountAmount,\r\n ConvenienceFee: this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')),\r\n BookingFee: this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().replace(/[^0-9.-]/g, '')),\r\n FacilityCharge: this.paymentForm.controls['paymentDetails'].get('facilityCharge').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('facilityCharge').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('facilityCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('facilityCharge').value.toString().replace(/[^0-9.-]/g, '')),\r\n DailyRentalBooth: [],\r\n DailyRentalOtherCharges: [],\r\n AppliedDiscountModel: []\r\n }\r\n\r\n if (this.paymentData.DailyRentalBooth.length > 0)\r\n obj.DailyRentalBooth = this.paymentData.DailyRentalBooth;\r\n\r\n if (this.paymentData.DailyRentalOtherCharges.length > 0)\r\n obj.DailyRentalOtherCharges = this.paymentData.DailyRentalOtherCharges;\r\n\r\n if(this.wifiOtherItemModel.length > 0){\r\n obj.DailyRentalOtherCharges = obj.DailyRentalOtherCharges.concat(this.wifiOtherItemModel);\r\n }\r\n\r\n if (this.bookingFeeOtherItemModel.length > 0) {\r\n obj.DailyRentalOtherCharges = obj.DailyRentalOtherCharges.concat(this.bookingFeeOtherItemModel);\r\n }\r\n\r\n if (this.paymentData.AppliedDiscountModel.length > 0)\r\n obj.AppliedDiscountModel = this.paymentData.AppliedDiscountModel;\r\n\r\n if (this.promoCodeDiscountAmount > 0) {\r\n obj.AppliedDiscountModel.push(this.promoCodeAppliedDiscount);\r\n }\r\n\r\n const sub = this.operationRentalService.SaveDailyRental(obj).subscribe(async (res: any) => {\r\n if (res.Success) {\r\n this.accountReceipId = res.Id;\r\n this.toastr.success($localize`Transaction saved successfully`, $localize`Success`, this.toasterConfig);\r\n if (this.printWIFIAccessCodeInReceipts && this.WIFIOtherItemRentalChargeId) { \r\n const checkMinimum = await this.operationRentalService.CheckMinimumUnusedCodeCount(this.marketId,\"Daily\").toPromise();\r\n if (checkMinimum.Success) { \r\n var distinctRentDates = Array.from(\r\n new Set(this.paymentData.DailyRentalBooth.map((item: any) => \r\n new Date(item.RentalDay).toISOString().split('T')[0] // Extract YYYY-MM-DD\r\n ))\r\n );\r\n if (distinctRentDates.length > 0) {\r\n for (const item of distinctRentDates) {\r\n var obj = {\r\n RentalType: 'Daily',\r\n AccountReceiptId: res.Id,\r\n VendorId: this.vendorId,\r\n RentalYearMonth: \"\",\r\n RentalTypeId: 1,\r\n RentalDay: item,\r\n MarketId: this.marketId\r\n }\r\n const updateRes = await this.operationRentalService.updateWIFIAccessCodeForRental(obj).toPromise();\r\n if (!updateRes.Success) {\r\n this.toastr.error($localize`Please contact market for the WIFI access codes`, $localize`Error`, this.toasterConfig);\r\n }\r\n }\r\n }\r\n }\r\n else{\r\n this.toastr.error($localize`${checkMinimum.Message}`, $localize`Error`, this.toasterConfig);\r\n } \r\n } \r\n if (this.paymentData.TempRecordNo != 0) {\r\n const temp = {\r\n TempRecordNo: this.paymentData.TempRecordNo.toString(),\r\n BoothNumber: \"\"\r\n }\r\n this.subscriptions.push(\r\n this.operationRentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n }\r\n this.sharedDataService.paymentSharedData = '';\r\n this.openConfirmationPage = true;\r\n } else {\r\n this.toastr.error($localize`Error occurred while saving the rental transaction`, $localize`Error`, this.toasterConfig);\r\n if (this.verifoneId) {\r\n this.voidPayment = true;\r\n }\r\n if (this.paymentData.TempRecordNo != 0) {\r\n const temp = {\r\n TempRecordNo: this.paymentData.TempRecordNo.toString(),\r\n BoothNumber: \"\"\r\n }\r\n this.subscriptions.push(\r\n this.operationRentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, (err) => {\r\n this.toastr.error($localize`Error occurred while saving the rental transaction`, $localize`Error`, this.toasterConfig);\r\n // const url = 'ops/vendors/details/' + this.vendorId + '/3';\r\n // this.router.navigate([url]); \r\n\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n\r\n this.subscriptions.push(sub);\r\n break;\r\n case 2:\r\n var convenienceFee = this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, ''));\r\n if (convenienceFee > 0 && this.paymentOnly) {\r\n this.paymentOnly = false;\r\n }\r\n var objMonthly = {\r\n VendorId: this.vendorId,\r\n PaymentOrderId: response.OrderId,\r\n RentalCharge: this.paymentData.RentalCharge,\r\n SalesTax: this.paymentData.SalesTax,\r\n SecLevelTax: this.paymentData.SecLevelTax,\r\n OtherCharge: this.paymentData.OtherCharge,\r\n PriorBalance: this.paymentData.PriorBalance,\r\n TotalBalanceDue: this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')),\r\n RentalNotes: this.paymentData.RentalNotes,\r\n CashAmount: 0,\r\n CheckAmount: 0,\r\n CheckNo: \"\",\r\n ChangeAmount: 0,\r\n CardAmount: this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')),\r\n DirectDebitAmount: 0,\r\n CardType: \"\",\r\n PaymentDone: true,\r\n WebRentalRequest: true,\r\n PaymentDueDate: this.paymentData.PaymentDueDate,\r\n VerifoneId: response.VerifoneId,\r\n DiscountAmount: this.paymentData.DiscountAmount,\r\n ConvenienceFee: this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')),\r\n BookingFee: this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().replace(/[^0-9.-]/g, '')),\r\n FacilityCharge: this.paymentForm.controls['paymentDetails'].get('facilityCharge').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('facilityCharge').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('facilityCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('facilityCharge').value.toString().replace(/[^0-9.-]/g, '')),\r\n MonthlyRentalBooth: [],\r\n MonthlyOtherRentalCharges: [],\r\n AppliedDiscountModel: []\r\n }\r\n\r\n if (this.paymentData.MonthlyRentalBooth.length > 0)\r\n objMonthly.MonthlyRentalBooth = this.paymentData.MonthlyRentalBooth;\r\n\r\n\r\n if (this.paymentData.MonthlyOtherRentalCharges.length > 0)\r\n objMonthly.MonthlyOtherRentalCharges = this.paymentData.MonthlyOtherRentalCharges;\r\n\r\n if(this.wifiOtherItemModel.length > 0){\r\n objMonthly.MonthlyOtherRentalCharges = objMonthly.MonthlyOtherRentalCharges.concat(this.wifiOtherItemModel);\r\n }\r\n\r\n if (this.paymentData.AppliedDiscountModel.length > 0)\r\n objMonthly.AppliedDiscountModel = this.paymentData.AppliedDiscountModel;\r\n\r\n const subMonthly = this.operationRentalService.saveMonthlyRental(this.marketId, objMonthly).subscribe(async (res: any) => {\r\n if (res.Success) {\r\n this.accountReceipId = res.Id;\r\n this.toastr.success($localize`Transaction saved successfully`, $localize`Success`, this.toasterConfig);\r\n\r\n if (this.printWIFIAccessCodeInReceipts && this.WIFIOtherItemRentalChargeId) {\r\n const checkMinimum = await this.operationRentalService.CheckMinimumUnusedCodeCount(this.marketId, \"Daily\").toPromise();\r\n if (checkMinimum.Success) {\r\n const distinctRentalYearMonth = Array.from(\r\n new Set(this.paymentData.MonthlyRentalBooth.map((item: any) => item.RentalYearMonth))\r\n );\r\n if (distinctRentalYearMonth.length > 0) {\r\n for (const item of distinctRentalYearMonth) {\r\n var obj = {\r\n RentalType: 'Monthly',\r\n AccountReceiptId: res.Id,\r\n VendorId: this.vendorId,\r\n RentalYearMonth: item,\r\n RentalTypeId: 2,\r\n MarketId: this.marketId\r\n }\r\n const updateRes = await this.operationRentalService.updateWIFIAccessCodeForRental(obj).toPromise();\r\n if (!updateRes.Success) {\r\n this.toastr.error($localize`Please contact market for the WIFI access codes`, $localize`Error`, this.toasterConfig);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n this.toastr.error($localize`${checkMinimum.Message}`, $localize`Error`, this.toasterConfig);\r\n }\r\n } \r\n this.sharedDataService.paymentSharedData = '';\r\n this.openConfirmationPage = true;\r\n }\r\n else {\r\n if (this.verifoneId) {\r\n this.voidPayment = true;\r\n }\r\n this.toastr.error($localize`Error occured while saving the rental transaction`, $localize`Error`, this.toasterConfig)\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, (err) => {\r\n this.toastr.error($localize`Error occured while saving the rental transaction`, $localize`Error`, this.toasterConfig)\r\n const url = 'ops/vendors/details/' + this.vendorId + '/3';\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(subMonthly);\r\n break;\r\n\r\n case 4:\r\n var convenienceFee = this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, ''));\r\n if (convenienceFee > 0 && this.paymentOnly) {\r\n this.paymentOnly = false;\r\n }\r\n var objCombinedMonthly = {\r\n VendorId: this.vendorId,\r\n PaymentOrderId: response.OrderId,\r\n RentalCharge: this.paymentData.RentalCharge,\r\n SalesTax: this.paymentData.SalesTax,\r\n SecLevelTax: this.paymentData.SecLevelTax,\r\n OtherCharge: this.paymentData.OtherCharge,\r\n PriorBalance: this.paymentData.PriorBalance,\r\n TotalBalanceDue: this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')),\r\n RentalNotes: this.paymentData.RentalNotes,\r\n CashAmount: 0,\r\n CheckAmount: 0,\r\n CheckNo: \"\",\r\n ChangeAmount: 0,\r\n CardAmount: this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')),\r\n DirectDebitAmount: 0,\r\n CardType: \"\",\r\n PaymentDone: true,\r\n WebRentalRequest: true,\r\n PaymentDueDate: this.paymentData.PaymentDueDate,\r\n VerifoneId: response.VerifoneId,\r\n DiscountAmount: this.paymentData.DiscountAmount,\r\n ConvenienceFee: this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')),\r\n BookingFee: this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().replace(/[^0-9.-]/g, '')),\r\n FacilityCharge: this.paymentForm.controls['paymentDetails'].get('facilityCharge').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('facilityCharge').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('facilityCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('facilityCharge').value.toString().replace(/[^0-9.-]/g, '')),\r\n MonthlyRentalBooth: [],\r\n MonthlyOtherRentalCharges: [],\r\n AppliedDiscountModel: []\r\n }\r\n\r\n if (this.paymentData.MonthlyRentalBooth.length > 0)\r\n objCombinedMonthly.MonthlyRentalBooth = this.paymentData.MonthlyRentalBooth;\r\n\r\n\r\n if (this.paymentData.MonthlyOtherRentalCharges.length > 0)\r\n objCombinedMonthly.MonthlyOtherRentalCharges = this.paymentData.MonthlyOtherRentalCharges;\r\n\r\n if(this.wifiOtherItemModel.length > 0){\r\n objCombinedMonthly.MonthlyOtherRentalCharges = objCombinedMonthly.MonthlyOtherRentalCharges.concat(this.wifiOtherItemModel);\r\n }\r\n\r\n if (this.paymentData.AppliedDiscountModel.length > 0)\r\n objCombinedMonthly.AppliedDiscountModel = this.paymentData.AppliedDiscountModel;\r\n\r\n const subCM = this.operationRentalService.SaveCombinedMonthlyRentalTransactions(objCombinedMonthly).subscribe(async (res: any) => {\r\n if (res.Success) {\r\n this.accountReceipId = res.Id;\r\n this.toastr.success($localize`Transaction saved successfully`, $localize`Success`, this.toasterConfig);\r\n if (this.printWIFIAccessCodeInReceipts && this.WIFIOtherItemRentalChargeId) {\r\n const checkMinimum = await this.operationRentalService.CheckMinimumUnusedCodeCount(this.marketId, \"Daily\").toPromise();\r\n if (checkMinimum.Success) {\r\n const distinctRentalYearMonth = Array.from(\r\n new Set(this.paymentData.MonthlyRentalBooth.map((item: any) => item.RentalYearMonth))\r\n );\r\n\r\n if (distinctRentalYearMonth.length > 0) {\r\n for (const item of distinctRentalYearMonth) {\r\n var obj = {\r\n RentalType: 'Combined Monthly',\r\n AccountReceiptId: res.Id,\r\n VendorId: this.vendorId,\r\n RentalYearMonth: item,\r\n RentalTypeId: 4,\r\n MarketId: this.marketId\r\n }\r\n const updateRes = await this.operationRentalService.updateWIFIAccessCodeForRental(obj).toPromise();\r\n if (!updateRes.Success) {\r\n this.toastr.error($localize`Please contact market for the WIFI access codes`, $localize`Error`, this.toasterConfig);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n this.toastr.error($localize`${checkMinimum.Message}`, $localize`Error`, this.toasterConfig);\r\n }\r\n } \r\n \r\n this.sharedDataService.paymentSharedData = '';\r\n this.openConfirmationPage = true;\r\n } else {\r\n this.toastr.error($localize`Error occurred while saving the rental transaction`, $localize`Error`, this.toasterConfig);\r\n if (this.verifoneId) {\r\n this.voidPayment = true;\r\n }\r\n if (this.paymentData.TempRecordNo != 0) {\r\n const temp = {\r\n TempRecordNo: this.paymentData.TempRecordNo.toString(),\r\n BoothNumber: \"\"\r\n }\r\n this.subscriptions.push(\r\n this.operationRentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, (err) => {\r\n this.toastr.error($localize`Error occurred while saving the rental transaction`, $localize`Error`, this.toasterConfig);\r\n // const url = 'ops/vendors/details/' + this.vendorId + '/3';\r\n // this.router.navigate([url]); \r\n\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n\r\n this.subscriptions.push(subCM);\r\n break;\r\n\r\n case 5:\r\n var convenienceFee = this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, ''));\r\n if (convenienceFee > 0 && this.paymentOnly) {\r\n this.paymentOnly = false;\r\n }\r\n var objCombinedWeekly = {\r\n VendorId: this.vendorId,\r\n PaymentOrderId: response.OrderId,\r\n RentalCharge: this.paymentData.RentalCharge,\r\n SalesTax: this.paymentData.SalesTax,\r\n SecLevelTax: this.paymentData.SecLevelTax,\r\n OtherCharge: this.paymentData.OtherCharge,\r\n PriorBalance: this.paymentData.PriorBalance,\r\n TotalBalanceDue: this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')),\r\n RentalNotes: this.paymentData.RentalNotes,\r\n CashAmount: 0,\r\n CheckAmount: 0,\r\n CheckNo: \"\",\r\n ChangeAmount: 0,\r\n CardAmount: this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')),\r\n DirectDebitAmount: 0,\r\n CardType: \"\",\r\n PaymentDone: true,\r\n WebRentalRequest: true,\r\n PaymentDueDate: this.paymentData.PaymentDueDate,\r\n VerifoneId: response.VerifoneId,\r\n DiscountAmount: this.paymentData.DiscountAmount,\r\n ConvenienceFee: this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')),\r\n BookingFee: this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().replace(/[^0-9.-]/g, '')),\r\n FacilityCharge: this.paymentForm.controls['paymentDetails'].get('facilityCharge').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('facilityCharge').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('facilityCharge').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('facilityCharge').value.toString().replace(/[^0-9.-]/g, '')),\r\n CombinedWeeklyRentalBooth: [],\r\n WeeklyRentalOtherCharges: [],\r\n AppliedDiscountModel: []\r\n }\r\n\r\n if (this.paymentData.CombinedWeeklyRentalBooth.length > 0)\r\n objCombinedWeekly.CombinedWeeklyRentalBooth = this.paymentData.CombinedWeeklyRentalBooth;\r\n\r\n\r\n if (this.paymentData.WeeklyRentalOtherCharges.length > 0)\r\n objCombinedWeekly.WeeklyRentalOtherCharges = this.paymentData.WeeklyRentalOtherCharges;\r\n\r\n if(this.wifiOtherItemModel.length > 0){\r\n objCombinedWeekly.WeeklyRentalOtherCharges = objCombinedWeekly.WeeklyRentalOtherCharges.concat(this.wifiOtherItemModel);\r\n }\r\n\r\n if (this.paymentData.AppliedDiscountModel.length > 0)\r\n objCombinedWeekly.AppliedDiscountModel = this.paymentData.AppliedDiscountModel;\r\n\r\n const subCW = this.operationRentalService.SaveCombinedWeeklyRentalTransactions(objCombinedWeekly).subscribe(async (res: any) => {\r\n if (res.Success) {\r\n this.accountReceipId = res.Id;\r\n this.toastr.success($localize`Transaction saved successfully`, $localize`Success`, this.toasterConfig);\r\n if (this.printWIFIAccessCodeInReceipts && this.WIFIOtherItemRentalChargeId) { \r\n const checkMinimum = await this.operationRentalService.CheckMinimumUnusedCodeCount(this.marketId,\"Daily\").toPromise();\r\n const distinctStartDates = Array.from(\r\n new Set(\r\n this.paymentData.CombinedWeeklyRentalBooth.map((item: any) => item.RentalWeeekStartDate)\r\n )\r\n );\r\n\r\n const distinctRentDates = new Set();\r\n distinctStartDates.forEach((startDate: string) => {\r\n const relatedItem = this.paymentData.CombinedWeeklyRentalBooth.find(\r\n (item: any) => item.RentalWeeekStartDate === startDate\r\n );\r\n\r\n if (relatedItem) {\r\n const rentalWeekStart = new Date(startDate);\r\n const rentalEndDate = new Date(relatedItem.RentalEndDate);\r\n let currentWeekStart = new Date(rentalWeekStart);\r\n\r\n while (currentWeekStart <= rentalEndDate) {\r\n const formattedDate = currentWeekStart.toISOString().split('T')[0];\r\n distinctRentDates.add(formattedDate);\r\n currentWeekStart.setDate(currentWeekStart.getDate() + 7);\r\n }\r\n }\r\n });\r\n const uniqueRentDatesArray = Array.from(distinctRentDates);\r\n if (uniqueRentDatesArray.length > 0) {\r\n for (const item of uniqueRentDatesArray) {\r\n if (checkMinimum.Success) {\r\n var obj = {\r\n RentalType: 'Combined Weekly',\r\n AccountReceiptId: res.Id,\r\n VendorId: this.vendorId,\r\n RentalYearMonth: \"\",\r\n RentalTypeId: 5,\r\n WeekStartDate: new Date(item),\r\n MarketId: this.marketId\r\n }\r\n const updateRes = await this.operationRentalService.updateWIFIAccessCodeForRental(obj).toPromise();\r\n if (!updateRes.Success) {\r\n this.toastr.error($localize`Please contact market for the WIFI access codes`, $localize`Error`, this.toasterConfig);\r\n }\r\n }\r\n }\r\n }\r\n else{\r\n this.toastr.error($localize`${checkMinimum.Message}`, $localize`Error`, this.toasterConfig);\r\n } \r\n }\r\n this.sharedDataService.paymentSharedData = '';\r\n this.openConfirmationPage = true;\r\n } else {\r\n this.toastr.error($localize`Error occurred while saving the rental transaction`, $localize`Error`, this.toasterConfig);\r\n if (this.verifoneId) {\r\n this.voidPayment = true;\r\n }\r\n if (this.paymentData.TempRecordNo != 0) {\r\n const temp = {\r\n TempRecordNo: this.paymentData.TempRecordNo.toString(),\r\n BoothNumber: \"\"\r\n }\r\n this.subscriptions.push(\r\n this.operationRentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, (err) => {\r\n this.toastr.error($localize`Error occurred while saving the rental transaction`, $localize`Error`, this.toasterConfig);\r\n // const url = 'ops/vendors/details/' + this.vendorId + '/3';\r\n // this.router.navigate([url]); \r\n\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n\r\n this.subscriptions.push(subCW);\r\n break;\r\n\r\n case 3:\r\n var convenienceFee = this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, ''));\r\n if (convenienceFee > 0 && this.paymentOnly) {\r\n this.paymentOnly = false;\r\n }\r\n var objWeekly = {\r\n VendorId: this.vendorId,\r\n PaymentOrderId: response.OrderId,\r\n RentalCharge: this.paymentData.RentalCharge,\r\n SalesTax: this.paymentData.SalesTax,\r\n SecLevelTax: this.paymentData.SecLevelTax,\r\n OtherCharge: this.paymentData.OtherCharge,\r\n PriorBalance: this.paymentData.PriorBalance,\r\n TotalBalanceDue: this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('balanceDue').value.toString().replace(/[^0-9.-]/g, '')),\r\n RentalNotes: this.paymentData.RentalNotes,\r\n CashAmount: 0,\r\n CheckAmount: 0,\r\n CheckNo: \"\",\r\n ChangeAmount: 0,\r\n CardAmount: this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('paymentAmount').value.toString().replace(/[^0-9.-]/g, '')),\r\n DirectDebitAmount: 0,\r\n CardType: \"\",\r\n PaymentDone: true,\r\n WebRentalRequest: true,\r\n PaymentDueDate: this.paymentData.PaymentDueDate,\r\n VerifoneId: response.VerifoneId,\r\n DiscountAmount: this.paymentData.DiscountAmount,\r\n ConvenienceFee: this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('convenienceFee').value.toString().replace(/[^0-9.-]/g, '')),\r\n BookingFee: this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().includes('(') && this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().includes(')') ? -1 * parseFloat(this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().replace(/[^0-9.-]/g, '')) : parseFloat(this.paymentForm.controls['paymentDetails'].get('additionalCharges').value.toString().replace(/[^0-9.-]/g, '')),\r\n WeeklyRentalBooth: [],\r\n WeeklyRentalOtherCharges: [],\r\n AppliedDiscountModel: []\r\n }\r\n\r\n if (this.paymentData.WeeklyRentalBooth.length > 0)\r\n objWeekly.WeeklyRentalBooth = this.paymentData.WeeklyRentalBooth;\r\n\r\n\r\n if (this.paymentData.WeeklyRentalOtherCharges.length > 0)\r\n objWeekly.WeeklyRentalOtherCharges = this.paymentData.WeeklyRentalOtherCharges;\r\n\r\n if (this.paymentData.AppliedDiscountModel.length > 0)\r\n objWeekly.AppliedDiscountModel = this.paymentData.AppliedDiscountModel;\r\n\r\n const subW = this.operationRentalService.SaveWeeklyRentalTransactions(objWeekly).subscribe((res: any) => {\r\n if (res.Success) {\r\n this.accountReceipId = res.Id;\r\n this.toastr.success($localize`Transaction saved successfully`, $localize`Success`, this.toasterConfig);\r\n this.sharedDataService.paymentSharedData = '';\r\n this.openConfirmationPage = true;\r\n } else {\r\n this.toastr.error($localize`Error occurred while saving the rental transaction`, $localize`Error`, this.toasterConfig);\r\n if (this.verifoneId) {\r\n this.voidPayment = true;\r\n }\r\n if (this.paymentData.TempRecordNo != 0) {\r\n const temp = {\r\n TempRecordNo: this.paymentData.TempRecordNo.toString(),\r\n BoothNumber: \"\"\r\n }\r\n this.subscriptions.push(\r\n this.operationRentalService.deleteFromTemp(temp).subscribe((res: any) => {\r\n })\r\n );\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, (err) => {\r\n this.toastr.error($localize`Error occurred while saving the rental transaction`, $localize`Error`, this.toasterConfig);\r\n // const url = 'ops/vendors/details/' + this.vendorId + '/3';\r\n // this.router.navigate([url]); \r\n\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n\r\n this.subscriptions.push(subW);\r\n break;\r\n }\r\n }\r\n\r\n voidPaymentResponse() {\r\n this.voidPayment = false;\r\n const url = 'rent-online/' + this.marketId + '/' + this.vendorId;\r\n this.router.navigate([url]);\r\n }\r\n\r\n getCCCredentials() {\r\n this.paymentService.getCCCredentials(this.marketId).subscribe((res) => {\r\n if (res !== null) {\r\n this.paymentGatewayCredentials = res.GatewayDetails ? JSON.parse(res.GatewayDetails) : null;\r\n this.processCreditCardOnline = res.ProcessCreditCardOnline;\r\n }\r\n })\r\n }\r\n\r\n ClearPay() {\r\n this.paymentForm.controls['paymentDetails'].patchValue({\r\n cashAmount: this.customCurrency.transform(\"0.00\"),\r\n checkAmount: this.customCurrency.transform(\"0.00\"),\r\n creditCardAmount: this.customCurrency.transform(\"0.00\"),\r\n directDebitAmount: this.customCurrency.transform(\"0.00\"),\r\n convenienceFee: this.customCurrency.transform(\"0.00\"),\r\n changeAmount: this.customCurrency.transform(\"0.00\"),\r\n checkNo: '',\r\n creditCardTypes:'1',\r\n totalDue: this.customCurrency.transform(this.actualTotalDue.toString()),\r\n balanceAmount:this.customCurrency.transform(this.paymentData.TotalBalanceDue.toString())\r\n });\r\n }\r\n\r\n cancel(){\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Are you sure you want cancel ?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.value) {\r\n if (this.newVendor) {\r\n this.cancelClick.emit();\r\n }\r\n else {\r\n const url = 'rent-online/' + this.marketId + '/' + this.vendorId;\r\n this.router.navigate([url]); //this.location.();\r\n }\r\n }\r\n });\r\n }\r\n \r\n ClosePaymentPage(){\r\n this.processPayment = false;\r\n this.voidPayment = false;\r\n this.disablePayBtnAfterSubmit = false;\r\n }\r\n\r\n ngOnDestroy(): void {\r\n //this.sharedDataService.paymentSharedData = {};\r\n this.subscriptions.forEach((subscription) => {\r\n if (subscription) {\r\n subscription.unsubscribe();\r\n }\r\n });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ActivatedRoute, ActivatedRouteSnapshot, CanActivate, Params, Router, RouterStateSnapshot, UrlTree } from '@angular/router';\r\nimport { Observable } from 'rxjs';\r\nimport { AuthService } from '../services/auth.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AuthGuard implements CanActivate {\r\n\r\n constructor(private router: Router,\r\n private route: ActivatedRoute,\r\n private authService: AuthService) { }\r\n marketId;\r\n canActivate(\r\n route: ActivatedRouteSnapshot,\r\n state: RouterStateSnapshot): Observable | Promise | boolean | UrlTree {\r\n this.route.params.subscribe((params: Params) => {\r\n this.marketId = route.paramMap.get('marketId');\r\n });\r\n let isLoggedIn: boolean = this.authService.isLoginAutenticated();\r\n\r\n if (isLoggedIn)\r\n return true;\r\n else\r\n this.router.navigate(['/login/' + this.marketId]);\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Booths can be rented\r\n for single or multiple market days on a one time\r\n basis.\r\n Booths can be rented for\r\n one market day per week on permanent monthly basis.\r\n Booths can be rented for\r\n one market day in the week on permanent weekly basis.\r\n Booth can be rented\r\n for all market days in the month on monthly basis.\r\n Booths can be rented\r\n for all market days in the week on weekly basis. \r\n
\r\n
\r\n How To Rent\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * required \r\n * max length exceeded\r\n \r\n
\r\n
\r\n \r\n \r\n * max length exceeded\r\n \r\n
\r\n
\r\n \r\n \r\n * max length exceeded\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * max length exceeded \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * required \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n * required \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n * required \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n Enter valid work\r\n phone number\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n * not complete\r\n * required \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * required \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * required \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n * required \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * required \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * required \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n * required \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n *\r\n required\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n *\r\n required\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n *\r\n required\r\n *\r\n minimum length is 6 characters\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
*password is\r\n required.
\r\n
*password must be\r\n at least 6 characters long.
\r\n
*password must be\r\n at least 20 characters long.
\r\n
*password must\r\n contain at least one special\r\n character.
\r\n
*password must\r\n contain at least one uppercase letter\r\n .
\r\n
*password must\r\n contain at least one lowercase letter\r\n .
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n *confirm password is\r\n required.
\r\n \r\n \r\n \r\n *Confirm password does not match.\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n *security question is\r\n required.
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
*security answer is\r\n required.
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n","import { Component, ElementRef, Input, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core';\r\nimport { AbstractControl, FormBuilder, FormControl, FormGroup, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';\r\nimport { ActivatedRoute, Params, Router } from '@angular/router';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { forkJoin, Subscription } from 'rxjs';\r\nimport { GeneralService } from 'src/app/services/General.service';\r\nimport { MarketInfoService } from 'src/app/services/MarketInfoService.service';\r\nimport { RentalService } from 'src/app/services/Rental.service';\r\nimport { VendorService } from 'src/app/services/Vendor.service';\r\nimport { customCurrencyPipe } from 'src/app/Shared/customCurrency.pipe';\r\nimport { ICountry, IStates, RegistrationFeeModel } from 'src/app/Shared/models/GeneralModel';\r\nimport { IVendorGeneralSettings } from 'src/app/Shared/models/SettingsModel';\r\nimport { IVendorInfo, IVendorLoginInfoModel, IVendorProductImageContents, IVendorProductImages, IVendorProductModel } from 'src/app/Shared/models/VendorModel';\r\nimport { SharedDataService } from 'src/app/Shared/SharedData.service';\r\nimport Swal from 'sweetalert2';\r\n\r\n@Component({\r\n selector: 'app-new-vendor-rentonline',\r\n templateUrl: './new-vendor-rentonline.component.html',\r\n styleUrls: ['./new-vendor-rentonline.component.scss']\r\n})\r\n\r\nexport class NewVendorRentonlineComponent implements OnInit, OnDestroy {\r\n showrentOnline: boolean = true;\r\n showContactInfo: boolean = false;\r\n showLoginInfo: boolean = false;\r\n showPaymentPage: boolean = false;\r\n IsVendorLogin: boolean = true;\r\n pageName: string = \"Rent Online\";\r\n howtoRentSpaceDocURL = \"\";\r\n rulesAndRegulations = \"\";\r\n @ViewChild('btnRentOnline') btnRentOnline!: ElementRef;\r\n @ViewChild('ContactInfo') ContactInfo!: ElementRef;\r\n @ViewChild('btnLoginInfo') btnLoginInfo!: ElementRef;\r\n @ViewChild('btnPayment') btnPayment!: ElementRef;\r\n marketId;\r\n rentalForm: FormGroup;\r\n vendorLoginData: IVendorLoginInfoModel;\r\n VendorGeneralSetting: IVendorGeneralSettings = {} as IVendorGeneralSettings;\r\n VendorForm: FormGroup;\r\n public ProductDropDownfields: Object = { text: 'ProductName', value: 'ProductId' };\r\n validationResponse: any;\r\n securityQuestions: any[];\r\n productList: any[];\r\n public loaderIcon: Promise;\r\n AllowBookingsCw = false;\r\n AllowBookingsWeekly = false;\r\n AllowBookingsCm = false;\r\n vendorAddressMandatory= false;\r\n AllowBookingsMonthly = false;\r\n AllowBookingsDaily = false;\r\n private subscriptions: Subscription[] = [];\r\n defaultRentalTypeSelected;\r\n marketName = \"\";\r\n countryList = [];\r\n vendorId;\r\n openPaymentDetails=false;\r\n vendorinfo: IVendorInfo;\r\n showStateDropDown;\r\n securityQuestion = [];\r\n showCellPhoneError = false;\r\n showWorkPhoneError = false;\r\n vendorMarketID = \"\";\r\n selected = '1';\r\n toasterConfig = {\r\n closeButton: true,\r\n timeOut: 4500,\r\n easing: 'ease-out',\r\n progressBar: true,\r\n positionClass: 'toast-top-right',\r\n tapToDismiss: true,\r\n showEasing: 'swing',\r\n hideEasing: 'linear',\r\n showMethod: 'fadeIn',\r\n hideMethod: 'slideUp'\r\n };\r\n vendorName;\r\n resaleNumberRequired = false;\r\n businessLicenseNoRequired = false;\r\n stateList: IStates[];\r\n registrationFee: RegistrationFeeModel;\r\n newVendor = true;\r\n VendorProductsList: IVendorProductModel[] = [];\r\n VendorProductsImageList: IVendorProductImages[] = [] as IVendorProductImages[];\r\n VendorProductsImageContentList: IVendorProductImageContents[] = [] as IVendorProductImageContents[];\r\n public PhoneNumberMask: String = '000-000-0000';\r\n public StateDropDownfields: Object = { text: 'StateCode', value: 'StateCode' };\r\n public ZipCodeMask: String = '00000-0000';\r\n VendorTypeList = [];\r\n businessLicenseInfo :any;\r\n initialFormValues: any;\r\n emailIdsPattern = '^(([\\\\w+-.%]+)@([\\\\w-.]+)\\\\.([A-Za-z]{2,}))([\\\\s]?[,;]{1}[\\\\s]?([\\\\w+-.%]+)@([\\\\w-.]+)\\\\.([A-Za-z]{2,})){0,4}$';\r\n constructor(private renderer: Renderer2,\r\n private formbuilder: FormBuilder,\r\n private vendorService: VendorService,\r\n private route: ActivatedRoute,\r\n private sharedDataService: SharedDataService,\r\n private generalService: GeneralService,\r\n public router: Router,\r\n private toastr: ToastrService,\r\n private rentalService:RentalService,\r\n private customCurrency: customCurrencyPipe,\r\n private marketInfoService: MarketInfoService,\r\n ) {\r\n const passwordValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\r\n const password = control.value;\r\n const minLength = 6;\r\n const hasSpecialChar = /[!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?]+/;\r\n const hasUpperCase = /[A-Z]+/;\r\n const hasLowerCase = /[a-z]+/;\r\n\r\n // Check the password against the conditions\r\n if (password.length < minLength) {\r\n return { minLength: true };\r\n }\r\n if (!hasSpecialChar.test(password)) {\r\n return { specialChar: true };\r\n }\r\n if (!hasUpperCase.test(password)) {\r\n return { upperCase: true };\r\n }\r\n if (!hasLowerCase.test(password)) {\r\n return { lowerCase: true };\r\n }\r\n\r\n return null;\r\n };\r\n\r\n this.rentalForm = this.formbuilder.group({\r\n rentalTypes: [\"1\"],\r\n VendorForm: this.formbuilder.group(\r\n {\r\n Address: ['', [Validators.maxLength(50)]],\r\n BusAddress: ['', [Validators.maxLength(50)]],\r\n BusCity: [''],\r\n BusState: [''],\r\n BusTelePhone: [''],\r\n BusZipCode: ['', [Validators.maxLength(10)]],\r\n CellPhone: ['', [Validators.minLength(10), Validators.maxLength(12)]],\r\n City: [''],\r\n CompanyName: ['', [Validators.maxLength(50)]],\r\n Country: [''],\r\n CountryCode: [0],\r\n DLExpiryDate: [null],\r\n DriverLicenseNumber: [''],\r\n ResaleNumber: [''],\r\n BusinessLicenseNumber: [''],\r\n BusinessLicenseExpiryDate:[null],\r\n Email: ['', [Validators.maxLength(40), Validators.pattern('^(([\\\\w+-.%]+)@([\\\\w-.]+)\\\\.([A-Za-z]{2,}))([\\\\s]?[,;]{1}[\\\\s]?([\\\\w+-.%]+)@([\\\\w-.]+)\\\\.([A-Za-z]{2,})){0,4}$')]],\r\n FirstName: ['', [Validators.required, Validators.maxLength(50)]],\r\n LastName: ['', [Validators.maxLength(50)]],\r\n MarketId: [0, [Validators.required]],\r\n MarketVendorId: [0, [Validators.required]],\r\n MiddleName: ['', [Validators.maxLength(50)]],\r\n State: [''],\r\n VendorId: [0, [Validators.required]],\r\n VendorSince: [Date],\r\n VendorType: ['', Validators.required],\r\n WorkPhone: ['',[Validators.minLength(10),Validators.maxLength(12)]],\r\n TelePhone: [''],\r\n ZipCode: [''],\r\n ProductPriority: ['', [Validators.required]],\r\n }),\r\n OnlineAccessForm: this.formbuilder.group(\r\n {\r\n UserName: ['', [Validators.maxLength(16), Validators.required]],\r\n Password: ['', [Validators.required, Validators.minLength(6), Validators.maxLength(20), passwordValidator]],\r\n ConfirmPassword: ['', Validators.required],\r\n SecurityQuestion: ['', Validators.required],\r\n Answer: ['', Validators.required],\r\n RegistrationFee: [],\r\n registrationPaymentCheck: new FormControl(false),\r\n registrationRuleReadCheck: new FormControl(false),\r\n })\r\n })\r\n this.initialFormValues = this.rentalForm.controls['VendorForm'];\r\n }\r\n\r\n ngOnInit(): void {\r\n this.route.params.subscribe((params: Params) => {\r\n this.marketId = params['marketId'];\r\n this.vendorId = params['vendorId'];\r\n });\r\n this.getVendorGeneralSettings();\r\n this.getMarketDetails();\r\n this.getallproducts();\r\n this.getCountries();\r\n this.getStates();\r\n this.getWebRentalSetting();\r\n this.getVendorTypes(); \r\n this.RegistrationFee();\r\n this.getSecurityQuestion();\r\n }\r\n\r\n getSecurityQuestion() {\r\n this.generalService.GetSecurityQuestion().subscribe((response) => {\r\n if (response) {\r\n this.securityQuestions = response.body;\r\n }\r\n }, (err) => {\r\n console.log(err);\r\n });\r\n }\r\n\r\n getCountries() {\r\n const sub = this.generalService.getCountries().subscribe((response: ICountry[]) => {\r\n this.countryList = response;\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n getStates() {\r\n const sub = this.generalService.getUSStates().subscribe((response: IStates[]) => {\r\n this.stateList = response;\r\n });\r\n this.subscriptions.push(sub);\r\n } \r\n\r\n getVendorGeneralSettings() {\r\n this.loaderIcon = Promise.resolve(true);\r\n this.subscriptions.push(this.marketInfoService.getCurrentMarketVendorGeneralSettings(this.marketId).subscribe((res: any) => {\r\n \r\n if (res) {\r\n this.VendorGeneralSetting = {\r\n IsVendorIdManual : res.SpecifyVendorID,\r\n VendorAddressMandatory : res.VendAddressMandatory,\r\n AllowAbsenteeRefund : res.BoothStatusRefund,\r\n TermForLease : res.LeaseLabel,\r\n DefaultProductEnabled : res.DefaultProductSelected,\r\n Product : res.ProductId,\r\n ResaleNumberRequired : res.ResaleNumberRequired,\r\n DaysToSellWithoutResaleNo : res.DaysSellWithoutResaleNumber,\r\n BusinessLicenseNumberReq : res.BusinessLicenseNumberRequired,\r\n DaysToSellWithoutBusinessLicenseNo : res.DaysSellWithoutBusiLicNumber,\r\n AlphaNumericField1Reqd : res.AlphaNumericField1Reqd,\r\n AlphaNumericField2Reqd : res.AlphaNumericField2Reqd,\r\n AlphaNumericField1Name : res.AlphaNumericField1Name,\r\n AlphaNumericField2Name : res.AlphaNumericField2Name,\r\n NumericField1Reqd : res.NumericField1Reqd,\r\n NumericField2Reqd : res.NumericField2Reqd,\r\n NumericField1Name : res.NumericField1Name,\r\n NumericField2Name : res.NumericField2Name,\r\n VendorNameFormat : res.VendorNamingConvention,\r\n VendorNameFormatId : res.VendorNamingConventionId,\r\n BoothTerm : res.BoothTerm\r\n }\r\n if(!this.VendorGeneralSetting.IsVendorIdManual){\r\n this.rentalForm.controls['VendorForm'].get('MarketVendorId').disable(); \r\n }\r\n\r\n if(this.VendorGeneralSetting.VendorAddressMandatory){\r\n this.vendorAddressMandatory = true;\r\n this.rentalForm.controls['VendorForm'].get('City').setValidators([Validators.required]);\r\n this.rentalForm.controls['VendorForm'].get('ZipCode').setValidators([Validators.required]);\r\n this.rentalForm.controls['VendorForm'].get('State').setValidators([Validators.required]);\r\n \r\n this.rentalForm.controls['VendorForm'].get('City').updateValueAndValidity();\r\n this.rentalForm.controls['VendorForm'].get('ZipCode').updateValueAndValidity();\r\n this.rentalForm.controls['VendorForm'].get('State').updateValueAndValidity();\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }));\r\n this.loaderIcon = Promise.resolve(false); \r\n }\r\n\r\n resaleNoInputRequired(val) {\r\n this.resaleNumberRequired = val;\r\n if (val) {\r\n this.rentalForm.controls['VendorForm'].get('ResaleNumber').setValidators([Validators.required]);\r\n this.rentalForm.controls['VendorForm'].get('ResaleNumber').updateValueAndValidity();\r\n }\r\n }\r\n\r\n businessLicenseRequired(val) {\r\n this.businessLicenseNoRequired = val;\r\n this.rentalForm.controls['VendorForm'].get('BusinessLicenseNumber').setValidators([Validators.required]);\r\n this.rentalForm.controls['VendorForm'].get('BusinessLicenseExpiryDate').setValidators([Validators.required]);\r\n this.rentalForm.controls['VendorForm'].get('BusinessLicenseNumber').updateValueAndValidity();\r\n this.rentalForm.controls['VendorForm'].get('BusinessLicenseExpiryDate').updateValueAndValidity(); \r\n }\r\n\r\n getallproducts() {\r\n this.subscriptions.push(this.marketInfoService.GetAllMarketProducts(this.marketId).subscribe((res: any) => {\r\n this.productList = [];\r\n res.map((el, i) => {\r\n const ob = {\r\n ProductId: el.ProductId,\r\n ProductName: el.ProductName,\r\n ProductCategory: el.ProductCategory,\r\n ProductCategoryId: el.ProductCategoryId,\r\n IsInActive: el.IsInActive,\r\n CompanyProductId: el.CompanyProductId,\r\n }\r\n\r\n this.productList.push(ob);\r\n\r\n });\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n }));\r\n }\r\n\r\n primaryproductchange(args1) {\r\n const Id = args1;\r\n const product = this.productList.find(p => p.ProductId === Id);\r\n\r\n if (product) {\r\n this.VendorProductsList.pop();\r\n const newProduct: IVendorProductModel = {\r\n VProductId: 0,\r\n ProductId: product.ProductId,\r\n Priority: true,\r\n VendorId: 0,\r\n ProductName: product.ProductName,\r\n ProductCategoryId: product.ProductCategoryId,\r\n ProductCategory: product.ProductCategory,\r\n };\r\n this.VendorProductsList.push(newProduct);\r\n } else {\r\n console.log(\"Product not found with ID:\", Id);\r\n }\r\n }\r\n\r\n public noWhitespaceValidator(control: FormControl) {\r\n if ((control.value !== '') && (control.value !== null)) {\r\n if (control.value) {\r\n const isWhitespace = (control.value).trim().length === 0;\r\n const isValid = !isWhitespace;\r\n return isValid ? null : { 'whitespace': true };\r\n }\r\n }\r\n }\r\n\r\n restrictSpace(eve) {\r\n if (eve.which === 32) {\r\n eve.preventDefault();\r\n }\r\n }\r\n\r\n onKeyUp(field: string) {\r\n const phoneControl = this.rentalForm.controls['VendorForm'].get(field);\r\n if (field === 'CellPhone') {\r\n this.showCellPhoneError = phoneControl && phoneControl.invalid && phoneControl.touched;\r\n } else if (field === 'WorkPhone') {\r\n this.showWorkPhoneError = phoneControl && phoneControl.invalid && phoneControl.touched;\r\n }\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.renderer.setStyle(this.btnRentOnline.nativeElement, 'background-color', '#DDEBFC');\r\n this.rentalForm.controls['VendorForm'].patchValue({\r\n CountryCode: this.countryList[0].Code\r\n });\r\n this.onCountryChange();\r\n }\r\n\r\n getMarketDetails() {\r\n this.loaderIcon = Promise.resolve(true);\r\n const sub = this.marketInfoService.getMarketDetails(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.marketName = res.MarketName;\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err => {\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n onCountryChange() {\r\n this.showStateDropDown = true;\r\n if (this.rentalForm.controls['VendorForm'].value['CountryCode'] == 2) {\r\n this.showStateDropDown = false;\r\n }\r\n }\r\n\r\n getVendorTypes() {\r\n const sub = this.vendorService.GetVendorTypes(this.marketId).subscribe((response: IStates[]) => {\r\n this.VendorTypeList = response;\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n ValidationVendorDetails(): void {\r\n if (this.rentalForm.controls['VendorForm'].value['FirstName'].trim() == '') {\r\n this.toastr.error($localize`Vendor first name can't be empty`, $localize`Error`, this.toasterConfig)\r\n this.loaderIcon = Promise.resolve(false);\r\n return;\r\n }\r\n\r\n if(this.resaleNumberRequired){\r\n if (this.rentalForm.controls['VendorForm'].value['ResaleNumber'].trim() == '') {\r\n this.toastr.error($localize`Resale Number can't be empty`, $localize`Error`, this.toasterConfig)\r\n this.loaderIcon = Promise.resolve(false);\r\n return;\r\n }\r\n }\r\n\r\n if(this.businessLicenseNoRequired){\r\n if (this.rentalForm.controls['VendorForm'].value['BusinessLicenseNumber'].trim() == '' || !this.rentalForm.controls['VendorForm'].value['BusinessLicenseExpiryDate']) {\r\n this.toastr.error($localize`Business License Number or Expiry date can't be empty`, $localize`Error`, this.toasterConfig)\r\n this.loaderIcon = Promise.resolve(false);\r\n return;\r\n }\r\n }\r\n this.loaderIcon = Promise.resolve(true);\r\n this.vendorinfo = {\r\n Address: this.rentalForm.controls['VendorForm'].get('Address').value,\r\n BusAddress: null,\r\n BusCity: null,\r\n BusState: null,\r\n BusTelePhone: null,\r\n BusZipCode: null,\r\n CellPhone: this.rentalForm.controls['VendorForm'].get('CellPhone').value,\r\n City: this.rentalForm.controls['VendorForm'].get('City').value,\r\n\r\n CompanyName: this.rentalForm.controls['VendorForm'].get('CompanyName').value,\r\n Country: this.rentalForm.controls['VendorForm'].get('Country').value,\r\n CountryCode: this.rentalForm.controls['VendorForm'].get('CountryCode').value,\r\n DLExpiryDate: this.rentalForm.controls['VendorForm'].get('DLExpiryDate').value,\r\n DriverLicenseNumber: this.rentalForm.controls['VendorForm'].get('DriverLicenseNumber').value == null ? '' : this.rentalForm.controls['VendorForm'].get('DriverLicenseNumber').value,\r\n Email: this.rentalForm.controls['VendorForm'].get('Email').value,\r\n FirstName: this.rentalForm.controls['VendorForm'].get('FirstName').value,\r\n\r\n LastName: this.rentalForm.controls['VendorForm'].get('LastName').value,\r\n MarketId: Number(this.marketId),\r\n MarketVendorId: this.rentalForm.controls['VendorForm'].get('MarketVendorId').value,\r\n MiddleName: this.rentalForm.controls['VendorForm'].get('MiddleName').value,\r\n\r\n State: this.rentalForm.controls['VendorForm'].get('State').value,\r\n TelephoneEXT: null,\r\n VendorId: this.rentalForm.controls['VendorForm'].get('VendorId').value,\r\n VendorSince: new Date(),\r\n VendorType: this.rentalForm.controls['VendorForm'].get('VendorType').value,\r\n TelePhone: this.rentalForm.controls['VendorForm'].get('TelePhone').value,\r\n WorkPhone: this.rentalForm.controls['VendorForm'].get('WorkPhone').value,\r\n ZipCode: this.rentalForm.controls['VendorForm'].get('ZipCode').value,\r\n BusTelephoneEXT: null,\r\n\r\n VendorName: \"\",\r\n VendorProductsList: this.VendorProductsList,\r\n VendorProductImageList: this.VendorProductsImageList,\r\n VendorProductImageContentList: this.VendorProductsImageContentList,\r\n VendorProfile: null,\r\n VenTxtPhotoFile: null,\r\n BusinessLicNum: this.rentalForm.controls['VendorForm'].get('BusinessLicenseNumber').value,\r\n ResaleNum: this.rentalForm.controls['VendorForm'].get('ResaleNumber').value,\r\n WebRentalRequest: true\r\n };\r\n\r\n this.vendorService.RegisterVendorInfoValidation(this.vendorinfo).subscribe((res: any) => {\r\n this.validationResponse = res;\r\n if (this.validationResponse.Success) { \r\n this.displayOnlineAccess();\r\n } else {\r\n this.toastr.error(this.validationResponse.Message, $localize`Error`, this.toasterConfig)\r\n }\r\n this.loaderIcon = Promise.resolve(false);\r\n }, err=>{\r\n this.loaderIcon = Promise.resolve(false);\r\n });\r\n }\r\n\r\n validateContactForm() {\r\n if (this.rentalForm['controls'].contactInfoForm.invalid) {\r\n return true\r\n } else {\r\n return false\r\n }\r\n }\r\n\r\n paymentCancelClick(eve) {\r\n this.ngOnInit();\r\n this.rentOnline();\r\n }\r\n\r\n getWebRentalSetting() {\r\n const sub = this.marketInfoService.getWebRentalSetting(this.marketId).subscribe((res: any) => {\r\n if (res) {\r\n this.AllowBookingsDaily = res.AllowBookingsDaily;\r\n this.AllowBookingsMonthly = res.AllowBookingsMonthly;\r\n this.AllowBookingsCm = res.AllowBookingsCm;\r\n this.AllowBookingsWeekly = res.AllowBookingsWeekly;\r\n this.AllowBookingsCw = res.AllowBookingsCw;\r\n this.howtoRentSpaceDocURL = res.HowtoRentSpaceDocURL;\r\n this.rulesAndRegulations = res.RulesAndRegulationsAttachmentPDFUrl;\r\n this.rentalForm.get('rentalTypes').setValue(res.DefaultRentalType.toString());\r\n\r\n if (this.sharedDataService.rentalType) {\r\n this.rentalForm.get('rentalTypes').setValue(this.sharedDataService.rentalType.toString());\r\n this.sharedDataService.rentalType = \"\";\r\n this.sharedDataService.paymentSharedData.RentalMethod = \"\";\r\n }\r\n }\r\n }, err => {\r\n });\r\n this.subscriptions.push(sub);\r\n }\r\n\r\n bookingFormCompleted(eve) {\r\n if (eve) {\r\n this.contactInfo();\r\n }\r\n }\r\n\r\n RegistrationFee() {\r\n this.marketInfoService.RegistrationFee(this.marketId).subscribe((res: any) => {\r\n this.registrationFee = res;\r\n this.rentalForm.controls['OnlineAccessForm'].patchValue(\r\n {\r\n RegistrationFee: this.registrationFee.RegistrationFee.toString() != null ? this.customCurrency.transform(String(this.registrationFee.RegistrationFee)) : this.customCurrency.transform(\"0.00\"),\r\n }\r\n );\r\n }, (err) => {\r\n console.log(err);\r\n });\r\n }\r\n\r\n rentOnline() {\r\n this.showrentOnline = true;\r\n this.showContactInfo = false;\r\n this.showLoginInfo = false;\r\n this.showPaymentPage = false;\r\n this.pageName = \"Rent Online\";\r\n this.renderer.setStyle(this.btnRentOnline.nativeElement, 'background-color', '#DDEBFC');\r\n this.renderer.setStyle(this.ContactInfo.nativeElement, 'background-color', 'white');\r\n this.renderer.setStyle(this.btnLoginInfo.nativeElement, 'background-color', 'white');\r\n this.renderer.setStyle(this.btnPayment.nativeElement, 'background-color', 'white');\r\n }\r\n\r\n contactInfo() {\r\n this.showrentOnline = false;\r\n this.showContactInfo = true;\r\n this.showLoginInfo = false;\r\n this.showPaymentPage = false;\r\n this.pageName = \"Current Contact Information\";\r\n this.renderer.setStyle(this.ContactInfo.nativeElement, 'background-color', '#DDEBFC');\r\n this.renderer.setStyle(this.btnLoginInfo.nativeElement, 'background-color', 'white');\r\n this.renderer.setStyle(this.btnRentOnline.nativeElement, 'background-color', 'white');\r\n this.renderer.setStyle(this.btnPayment.nativeElement, 'background-color', 'white');\r\n }\r\n\r\n displayOnlineAccess() {\r\n this.showContactInfo = false;\r\n this.showLoginInfo = true;\r\n this.showrentOnline = false;\r\n this.showPaymentPage = false;\r\n this.renderer.setStyle(this.btnLoginInfo.nativeElement, 'background-color', '#DDEBFC');\r\n this.renderer.setStyle(this.ContactInfo.nativeElement, 'background-color', 'white');\r\n this.renderer.setStyle(this.btnRentOnline.nativeElement, 'background-color', 'white');\r\n this.renderer.setStyle(this.btnPayment.nativeElement, 'background-color', 'white');\r\n }\r\n\r\n paymentInfo() {\r\n this.showrentOnline = false;\r\n this.showContactInfo = false;\r\n this.showLoginInfo = false;\r\n this.showPaymentPage = true;\r\n this.openPaymentDetails = true;\r\n this.pageName = \"Online Payment Info\";\r\n this.renderer.setStyle(this.btnPayment.nativeElement, 'background-color', '#DDEBFC');\r\n this.renderer.setStyle(this.btnRentOnline.nativeElement, 'background-color', 'white');\r\n this.renderer.setStyle(this.ContactInfo.nativeElement, 'background-color', 'white');\r\n this.renderer.setStyle(this.btnLoginInfo.nativeElement, 'background-color', 'white');\r\n }\r\n\r\n setDirtyFlag(eve) {\r\n\r\n }\r\n\r\n isCancelClicked(eve) {\r\n this.rentalForm.get('rentalTypes').setValue('0');\r\n setTimeout(() => {\r\n this.rentalForm.get('rentalTypes').setValue(eve);\r\n }, 0);\r\n }\r\n\r\n cancelContactModification() {\r\n if (this.rentalForm.controls['VendorForm'].dirty) {\r\n Swal.fire({\r\n title: $localize`Confirm`,\r\n text: $localize`Unsaved changes will be lost. Are you sure you want to cancel?`,\r\n icon: \"question\",\r\n showCancelButton: true,\r\n confirmButtonText: $localize`Yes`,\r\n cancelButtonText: $localize`No`,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.rentalForm.controls['VendorForm'].reset(this.initialFormValues);\r\n this.rentalForm.controls['VendorForm'].markAsPristine();\r\n } else {\r\n }\r\n });\r\n } else {\r\n }\r\n }\r\n\r\n Oncancel(){\r\n\r\n }\r\n\r\n rentalBookingData(data) {\r\n this.sharedDataService.paymentSharedData = data;\r\n }\r\n\r\n openPaymentPage(){\r\n this.vendorLoginData = {\r\n VendorId: 0,\r\n VendorName: null,\r\n OnlineAccess: true,\r\n OnlineUserId:this.rentalForm.controls['OnlineAccessForm'].get('UserName').value,\r\n OnlinePassword:this.rentalForm.controls['OnlineAccessForm'].get('Password').value,\r\n SecurityQuestionId:this.rentalForm.controls['OnlineAccessForm'].get('SecurityQuestion').value,\r\n SecurityQuestionAnswer:this.rentalForm.controls['OnlineAccessForm'].get('Answer').value,\r\n OnlineRegistrationDate: new Date()\r\n };\r\n const check = this.CheckValidations();\r\n if (!check) {\r\n this.loaderIcon = Promise.resolve(false);\r\n return;\r\n }\r\n\r\n this.sharedDataService.newVendorLoginDetails = this.vendorLoginData;\r\n this.sharedDataService.newVendorContactInfo = this.vendorinfo;\r\n if(this.sharedDataService.paymentSharedData){ \r\n if (this.rentalForm.value['rentalTypes'] == 1) {\r\n if (this.sharedDataService.paymentSharedData.DailyRentalBooth && this.sharedDataService.paymentSharedData.DailyRentalBooth.length > 0) {\r\n for (const item of this.sharedDataService.paymentSharedData.DailyRentalBooth) {\r\n item.ProductId = this.rentalForm.controls['VendorForm'].value[\"ProductPriority\"];\r\n }\r\n }\r\n }\r\n else if (this.rentalForm.value['rentalTypes'] == 2 || this.rentalForm.value['rentalTypes'] == 4) {\r\n if (this.sharedDataService.paymentSharedData.MonthlyRentalBooth && this.sharedDataService.paymentSharedData.MonthlyRentalBooth.length > 0) {\r\n for (const item of this.sharedDataService.paymentSharedData.MonthlyRentalBooth) {\r\n item.ProductId = this.rentalForm.controls['VendorForm'].value[\"ProductPriority\"];\r\n }\r\n }\r\n }\r\n else if (this.rentalForm.value['rentalTypes'] == 3) {\r\n if (this.sharedDataService.paymentSharedData.WeeklyRentalBooth && this.sharedDataService.paymentSharedData.WeeklyRentalBooth.length > 0) {\r\n for (const item of this.sharedDataService.paymentSharedData.WeeklyRentalBooth) {\r\n item.ProductId = this.rentalForm.controls['VendorForm'].value[\"ProductPriority\"];\r\n }\r\n }\r\n }\r\n else if (this.rentalForm.value['rentalTypes'] == 5) {\r\n if (this.sharedDataService.paymentSharedData.CombinedWeeklyRentalBooth && this.sharedDataService.paymentSharedData.CombinedWeeklyRentalBooth.length > 0) {\r\n for (const item of this.sharedDataService.paymentSharedData.CombinedWeeklyRentalBooth) {\r\n item.ProductId = this.rentalForm.controls['VendorForm'].value[\"ProductPriority\"];\r\n }\r\n }\r\n }\r\n }\r\n if (this.businessLicenseNoRequired) {\r\n this.businessLicenseInfo = [];\r\n var obj =\r\n {\r\n BusinessLicenseNoRequired: this.businessLicenseNoRequired,\r\n LicenseNumber: this.rentalForm.controls['VendorForm'].value['BusinessLicenseNumber'].trim(),\r\n ExpiryDate: this.rentalForm.controls['VendorForm'].value['BusinessLicenseExpiryDate']\r\n }\r\n this.businessLicenseInfo = obj;\r\n }\r\n this.paymentInfo();\r\n }\r\n\r\n CheckValidations() {\r\n if (this.rentalForm.controls['OnlineAccessForm'].get('UserName').hasError('required') || this.rentalForm.controls['OnlineAccessForm'].get('Password').hasError('required') || this.rentalForm.controls['OnlineAccessForm'].get('ConfirmPassword').hasError('required') || this.rentalForm.controls['OnlineAccessForm'].get('SecurityQuestion').hasError('required') || this.rentalForm.controls['OnlineAccessForm'].get('Answer').hasError('required')) {\r\n this.toastr.error($localize`Please fill all mandatory fields properly`, $localize`Error`, this.toasterConfig)\r\n return false;\r\n }\r\n\r\n if (this.rentalForm.controls['OnlineAccessForm'].get('Password').hasError('minLength')) {\r\n this.toastr.error($localize`Password must be atleast 6 character`, $localize`Error`, this.toasterConfig)\r\n return false;\r\n }\r\n if (this.rentalForm.controls['OnlineAccessForm'].get('Password').hasError('maxLength')) {\r\n this.toastr.error($localize`Password must be at least 20 characters long.`, $localize`Error`, this.toasterConfig)\r\n return false;\r\n }\r\n if (this.rentalForm.controls['OnlineAccessForm'].get('Password').hasError('upperCase')) {\r\n this.toastr.error($localize`Password must contain at least one uppercase letter`, $localize`Error`, this.toasterConfig)\r\n return false;\r\n }\r\n if (this.rentalForm.controls['OnlineAccessForm'].get('Password').hasError('specialChar')) {\r\n this.toastr.error($localize`Password must contain at least one special`, $localize`Error`, this.toasterConfig)\r\n return false;\r\n }\r\n if (this.rentalForm.controls['OnlineAccessForm'].get('Password').hasError('lowerCase')) {\r\n this.toastr.error($localize`password must contain at least one lowercase letter`, $localize`Error`, this.toasterConfig)\r\n return false;\r\n }\r\n if (this.rentalForm.controls['OnlineAccessForm'].get('Answer').hasError('minLength')) {\r\n this.toastr.error($localize`Security Answer must be atleast 4 character`, $localize`Error`, this.toasterConfig)\r\n return false;\r\n }\r\n if (this.rentalForm.controls['OnlineAccessForm'].get('Password').value != this.rentalForm.controls['OnlineAccessForm'].get('ConfirmPassword').value) {\r\n this.toastr.error($localize`Confirm Password doesn't match.`, $localize`Error`, this.toasterConfig)\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscriptions.forEach((subscription) => {\r\n if (subscription) {\r\n subscription.unsubscribe();\r\n }\r\n });\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\nimport { HomeComponent } from './rental-menu/home/home.component';\r\nimport { VendorRegistrationComponent } from './rental-menu/vendor-registration/vendor-registration.component';\r\nimport { RentalMenuComponent } from './rental-menu/rental-menu.component';\r\nimport { VendorLoginComponent } from './rental-menu/vendor-login/vendor-login.component';\r\nimport { RentOnlineComponent } from './rental-menu/vendor-login/rent-online/rent-online.component';\r\nimport { MarketMapComponent } from './rental-menu/market-map/market-map.component';\r\nimport { NewsComponent } from './rental-menu/news/news.component';\r\nimport { ContactUsComponent } from './rental-menu/contact-us/contact-us.component';\r\nimport { VendorPaymentsComponent } from './Shared/vendor-Payment-details/vendor-payments.component';\r\nimport { RentalConfirmationComponent } from './rental-menu/vendor-login/rent-online/rental-confirmation/rental-confirmation.component';\r\nimport { AuthGuard } from './auth/auth.guard';\r\nimport { NewVendorRentonlineComponent } from './rental-menu/vendor-login/rent-online/new-vendor-rentonline/new-vendor-rentonline.component';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: ':marketId',\r\n component: HomeComponent,\r\n },\r\n {\r\n path: 'home/:marketId',\r\n component: HomeComponent,\r\n },\r\n {\r\n path: 'registration/:marketId',\r\n component: VendorRegistrationComponent,\r\n },\r\n {\r\n path: 'menu/:marketId',\r\n component: RentalMenuComponent,\r\n },\r\n {\r\n path: 'login/:marketId',\r\n component: VendorLoginComponent,\r\n },\r\n {\r\n path: 'rent-online/:marketId/:vendorId',\r\n component: RentOnlineComponent,\r\n canActivate: [AuthGuard]\r\n },\r\n {\r\n path: 'rent-online/:marketId/:vendorId/:bookingpage/:rentaltype',\r\n component: RentOnlineComponent,\r\n canActivate: [AuthGuard]\r\n },\r\n {\r\n path:'newven-online/:marketId/:vendorId',\r\n component:NewVendorRentonlineComponent,\r\n },\r\n {\r\n path: 'map/:marketId',\r\n component: MarketMapComponent,\r\n },\r\n {\r\n path: 'news/:marketId',\r\n component: NewsComponent,\r\n },\r\n {\r\n path: 'contact/:marketId',\r\n component: ContactUsComponent,\r\n },\r\n {\r\n path: 'vendor-payments/:marketId',\r\n component: VendorPaymentsComponent,\r\n canActivate: [AuthGuard]\r\n },\r\n {\r\n path: 'vendor-payments/:marketId/:vendorId',\r\n component: VendorPaymentsComponent,\r\n canActivate: [AuthGuard]\r\n },\r\n {\r\n path: 'thank-you/:marketId',\r\n component: RentalConfirmationComponent,\r\n canActivate: [AuthGuard]\r\n }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forRoot(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AppRoutingModule { }\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-root',\r\n templateUrl: './app.component.html',\r\n styleUrls: ['./app.component.scss']\r\n})\r\nexport class AppComponent {\r\n title = 'Web Rental';\r\n}\r\n","","import { Injectable } from '@angular/core';\r\nimport {\r\n HttpInterceptor,\r\n HttpRequest,\r\n HttpHandler,\r\n HttpEvent,\r\n HttpHeaders\r\n} from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { UserService } from 'src/app/services/User.service';\r\n\r\n@Injectable()\r\nexport class TokenInterceptor implements HttpInterceptor {\r\n constructor(private userService: UserService) {}\r\n\r\n intercept(\r\n request: HttpRequest,\r\n next: HttpHandler\r\n ): Observable> {\r\n // Get the token\r\n //const token = this.userService.getToken(); \r\n const token=localStorage.getItem('token');\r\n // Clone the request and add the Bearer token header if a token exists\r\n if (token) {\r\n request = request.clone({\r\n setHeaders: {\r\n Authorization: `Bearer ${token}`,\r\n },\r\n });\r\n }\r\n // Clone the request and add additional headers\r\n const httpRequest = request.clone({\r\n setHeaders: {\r\n 'Cache-Control': 'no-cache',\r\n 'Pragma': 'no-cache',\r\n 'Expires': 'Sat, 01 Jan 2000 00:00:00 GMT'\r\n }\r\n });\r\n\r\n return next.handle(httpRequest);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'linkify'\r\n})\r\nexport class LinkifyPipe implements PipeTransform {\r\n transform(value: string): string {\r\n if (!value) return '';\r\n\r\n // Regex to detect URLs (http, https, www)\r\n const urlRegex = /(https?:\\/\\/[^\\s]+|www\\.[^\\s]+)/g;\r\n\r\n return value.replace(urlRegex, (url) => {\r\n let hyperlink = url;\r\n if (!hyperlink.startsWith('http')) {\r\n hyperlink = 'https://' + hyperlink; // Ensure proper linking for \"www.\" URLs\r\n }\r\n return `${url}`;\r\n });\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { BrowserModule } from '@angular/platform-browser';\r\nimport { AppRoutingModule } from './app-routing.module';\r\nimport { AppComponent } from './app.component';\r\nimport { GridAllModule } from '@syncfusion/ej2-angular-grids';\r\nimport { HomeComponent } from './rental-menu/home/home.component';\r\nimport { VendorRegistrationComponent } from './rental-menu/vendor-registration/vendor-registration.component';\r\nimport { RentalMenuComponent } from './rental-menu/rental-menu.component';\r\nimport { VendorLoginComponent } from './rental-menu/vendor-login/vendor-login.component';\r\nimport { RentOnlineComponent } from './rental-menu/vendor-login/rent-online/rent-online.component';\r\nimport { DatePickerModule } from '@syncfusion/ej2-angular-calendars';\r\nimport { MarketMapComponent } from './rental-menu/market-map/market-map.component';\r\nimport { NewsComponent } from './rental-menu/news/news.component';\r\nimport { ContactUsComponent } from './rental-menu/contact-us/contact-us.component';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { CommonModule, CurrencyPipe, DecimalPipe } from '@angular/common';\r\nimport { HttpClientModule,HTTP_INTERCEPTORS} from '@angular/common/http';\r\nimport { DiagramModule } from '@syncfusion/ej2-angular-diagrams';\r\nimport { DatePipe } from '@angular/common';\r\nimport { ToastrModule } from 'ngx-toastr';\r\nimport { LoaderComponent } from './Shared/loader/loader.component';\r\nimport { MaskedTextBoxModule } from '@syncfusion/ej2-angular-inputs';\r\nimport { DropDownListModule } from '@syncfusion/ej2-angular-dropdowns';\r\nimport { DailyrentalOnlineComponent } from './rental-menu/vendor-login/rent-online/dailyrental-online/dailyrental-online.component'\r\nimport { TokenInterceptor } from './Shared/token.interceptor';\r\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { customCurrencyPipe } from './Shared/customCurrency.pipe';\r\nimport { PaymentComponent } from './Shared/payment/payment.component';\r\nimport { BsModalService } from 'ngx-bootstrap/modal';\r\nimport { WeeklyrentalOnlineComponent } from './rental-menu/vendor-login/rent-online/weeklyrental-online/weeklyrental-online.component';\r\nimport { MonthlyrentalOnlineComponent } from './rental-menu/vendor-login/rent-online/monthlyrental-online/monthlyrental-online.component';\r\nimport { CombinedmonthlyrentalOnlineComponent } from './rental-menu/vendor-login/rent-online/combinedmonthlyrental-online/combinedmonthlyrental-online.component';\r\nimport { CombinedweeklyrentalOnlineComponent } from './rental-menu/vendor-login/rent-online/combinedweeklyrental-online/combinedweeklyrental-online.component';\r\nimport { RentalLayoutComponent } from './rental-menu/vendor-login/rent-online/rentallayout-online/rentallayout-online.component';\r\nimport { VendorPaymentsComponent } from './Shared/vendor-Payment-details/vendor-payments.component';\r\nimport { RentalConfirmationComponent } from './rental-menu/vendor-login/rent-online/rental-confirmation/rental-confirmation.component';\r\nimport { ModalModule } from 'ngx-bootstrap/modal';\r\nimport { BookingDetailsComponent } from './rental-menu/vendor-login/rent-online/booking-details/booking-details.component';\r\nimport { BookingDetailsWeeklyMonthlyComponent } from './rental-menu/vendor-login/rent-online/booking-details-weekly-monthly/booking-details-weekly-monthly.component';\r\nimport { SuccessTickComponent } from './Shared/success-tick/success-tick.component';\r\nimport { FailureCrossComponent } from './Shared/failure-cross/failure-cross.component';\r\nimport { NewVendorRentonlineComponent } from './rental-menu/vendor-login/rent-online/new-vendor-rentonline/new-vendor-rentonline.component';\r\nimport { ComboBoxModule } from '@syncfusion/ej2-angular-dropdowns';\r\nimport { LinkifyPipe } from './Shared/LinkifyPipe.pipe';\r\n\r\n@NgModule({\r\n declarations: [AppComponent, RentalMenuComponent, PaymentComponent, HomeComponent,SuccessTickComponent,FailureCrossComponent, VendorRegistrationComponent, VendorLoginComponent, RentOnlineComponent, MarketMapComponent, NewsComponent, ContactUsComponent, LoaderComponent, customCurrencyPipe, DailyrentalOnlineComponent, WeeklyrentalOnlineComponent, MonthlyrentalOnlineComponent, CombinedweeklyrentalOnlineComponent, CombinedmonthlyrentalOnlineComponent,RentalLayoutComponent,VendorPaymentsComponent, RentalConfirmationComponent, BookingDetailsComponent, BookingDetailsWeeklyMonthlyComponent, NewVendorRentonlineComponent,LinkifyPipe],\r\n imports: [GridAllModule, HttpClientModule, CurrencyPipe, DecimalPipe, BrowserAnimationsModule, CommonModule, FormsModule, ReactiveFormsModule, BrowserModule, AppRoutingModule, DatePickerModule, DiagramModule, DropDownListModule, MaskedTextBoxModule,ToastrModule.forRoot({preventDuplicates: true}), ModalModule.forRoot(),ComboBoxModule],\r\n exports: [CurrencyPipe, DecimalPipe, DatePickerModule, ToastrModule, customCurrencyPipe, LinkifyPipe],\r\n providers: [\r\n { provide: HTTP_INTERCEPTORS, useClass: TokenInterceptor, multi: true },\r\n DatePipe, CurrencyPipe, customCurrencyPipe,LinkifyPipe, BsModalService, PaymentComponent],\r\n bootstrap: [AppComponent]\r\n})\r\nexport class AppModule { }\r\n","import {IAppConfig} from '../interfaces/app-config.interface';\r\nimport {InjectionToken} from '@angular/core';\r\n\r\nexport const AppConfig: InjectionToken = new InjectionToken('AppConfig');\r\n","// import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r\n\r\n// import { AppModule } from './app/app.module';\r\n\r\n\r\n// platformBrowserDynamic().bootstrapModule(AppModule)\r\n// .catch(err => console.error(err));\r\n\r\nimport { enableProdMode } from '@angular/core';\r\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r\nimport { AppModule } from './app/app.module';\r\nimport { environment } from './environments/environment';\r\nimport { AppConfig } from './app/Shared/app-config.inject';\r\nimport { registerLicense } from '@syncfusion/ej2-base';\r\n\r\nconst requestOrigin = window.location.origin;\r\nif (environment.production) {\r\n enableProdMode();\r\n}\r\n\r\nfunction bootstrapApp() {\r\n const req = new XMLHttpRequest();\r\n\r\n req.addEventListener('error', (res: any) => {\r\n console.log('Error: ', res);\r\n });\r\n\r\n\r\n //to auto login if user session already exists --End--\r\n req.addEventListener('load', (res: any) => {\r\n let appConfig = JSON.parse(res.currentTarget.response);\r\n environment.syncfusionKey = appConfig.syncfusionKey;\r\n environment.apiBaseUrl = appConfig.apiBaseUrl;\r\n environment.production = appConfig.production;\r\n registerLicense(environment.syncfusionKey);\r\n const loginRequest = {\r\n scopes: ['']\r\n }\r\n\r\n environment.apiBaseUrl = requestOrigin + \"/api\";\r\n console.log(\"baseURL = \" , environment.apiBaseUrl);\r\n console.log('config', appConfig);\r\n\r\n platformBrowserDynamic([\r\n {\r\n provide: AppConfig, useValue: {\r\n ...appConfig\r\n }\r\n },\r\n ]).bootstrapModule(AppModule)\r\n .then(() => {\r\n if ('serviceWorker' in navigator && environment.production) {\r\n navigator.serviceWorker.register('/ngsw-worker.js');\r\n }\r\n })\r\n .catch(err => console.error(err));\r\n });\r\n\r\n req.open('GET', '/assets/config/config.json');\r\n req.send(null);\r\n}\r\n\r\nbootstrapApp();\r\n"],"x_google_ignoreList":[]}