{"version":3,"sources":["app.js","contactUs/contactUs.js","dateSelector/dateSelector.js","documents/documents.js","home/home.js","login/login.js","header/header.js","pages/pages.js","paperwork/paperwork.js","reportSettings/reportSettings.js","account/payments/Payments.js","account/profile/profile.js","account/reports/reports.js","documents/account/account.js","fuelCards/cards/fuelCardsCards.js","fuelCards/prices/fuelCardsPrices.js","fuelCards/transactions/fuelCardsTransactions.js","orders/ordering/orders.js","orders/pricing/odPricing.js","httpService.js","directives/core.directives.js","directives/pdi.ng.extensions.js","directives/pdi.ng.validate.js","core/core.ajax.js","Services/services.paymentAccounts.js","core/core.constants.js","core/core.enums.js","core/core.error.js","core/core.objects.js","core/core.security.js","filters/core.filters.js","Services/services.browser.js","Services/services.bulkFuelPriceNotices.js","Services/services.contactUs.js","Services/services.customers.js","Services/services.documents.js","Services/services.edoc.js","Services/services.encrypt.js","Services/services.fuelCards.js","Services/services.globalizations.js","Services/services.home.js","Services/services.localizations.js","Services/services.logging.js","Services/services.orders.js","Services/services.pages.js","Services/services.paperwork.js","Services/services.paperworkDealerForms.js","Services/services.paperworkDeliveries.js","Services/services.paperworkMeters.js","Services/services.paperworkReports.js","Services/services.paperworkTanks.js","Services/services.payments.js","Services/services.profile.js","Services/services.reporting.js","Services/services.reports.js","Services/services.userAccounts.js","Services/services.warehousePriceNotices.js","providers/core.providers.js"],"names":["angular","module","$routeProvider","$httpProvider","$locationProvider","templateProvider","hashPrefix","templateUrl","getTemplate","controller","resolve","localStrings","localizationSvc","getCachedLocalizationsContainer","interceptors","push","$rootScope","$q","$injector","request","config","headers","loginInfo","userIsImpersonated","userId","userKey","userType","impersonatorUserId","impersonatorUserKey","impersonatorUserType","showLoader","when","response","get","pendingRequests","length","isAuthenticated","responseError","status","data","ExceptionMessage","match","notifier","show","getLocalizedString","reject","$scope","$http","Authentication","WebUserSvc","$location","WebFunctionGroups","WebFunctions","$window","BrowserService","WebProfileService","$timeout","$filter","encryptData","WebFunctionModules","PaymentService","PaperworkService","LoggingService","EdocService","localDateRangeStrings","openNewWindow","url","window","open","initialize","appInfo","profile","webUser","paperwork","fuelCards","userLoaded","profileKey","customText","backgroundImage","syscfg","isUndefinedOrNullOrEmpty","password","impersonationAccessGuid","undefined","path","search","indexOf","applySystemSettings","getLoggedInWebUserToken","logout","getAuthenticationToken","userToken","sessionExpired","clearInfo","goTo","loggingOut","paperworkLockInfo","amplify","store","RemovePaperworkLock","batchKey","custKey","lockData","unLockPayments","CustContKey","EmailAddress","CustKey","unlockInvoices","setTimeout","rememberMe","locationInfo","functionGroup","webFunctions","menuLocation","subMenuLocation","sideMenu","sideMenuData","applyAction","then","Configuration","softwareVersion","SoftwareVersion","ContactUsText","poweredByPdiText","PoweredByPdiText","countryInfo","Country","passwordComplexity","PasswordComplexity","LandingLogoImage","LandingBannerImage","UseGoogleAnalytics","GoogleAnalyticsKey","isBlank","ga","applySystemSettingsSiteDisabled","initializeSiteDisabled","applySelectedProfile","getWebUser","CurrentWebProfile","Key","setProfileColor","PrimaryColor","authorizationIndex","getCurrentAuthorization","CurrentAuthorization","WebAuthorizations","MenuBackgroundImage","checkForAppliedProfile","setSubMenu","value","location","pendingNav","subMenu","setWebProfile","WebProfile","setSystemConfiguration","checkCurrentUserPermissions","contact","CustomerContact","CustomerContactWebFunctions","x","hasModuleAccess","checkCurrentCustomerModules","i","WebFnKey","Selected","checkCurrentUserPermission","AllWebFunctions","currentCustomer","Customer","isBulkFuel","BulkFuelCustomer","isCardLock","CardLockCustomer","isRetail","RetailCustomer","isWholesale","WholesaleCustomer","isWebEft","WebPmtEFTGrpKey","checkWebFunctionModules","openEdocByRefNo","type","key","refNo","renderEdocByRefNo","JSON","stringify","EdocDetailsKey","Type","RefNo","edoc","createUrl","openEdoc","edocKey","renderEdoc","openEdocEmail","senderAddress","encrypt","encodeURIComponent","openAttachment","attachmentGuid","getWebProfileMessage","messageKey","$on","event","next","current","previous","rejection","urlFormatDate","aDate","ignoreIe","browser","getBrowserType","aDate2","Date","Object","prototype","toString","call","substr","parse","replace","isNaN","getTime","getFullYear","getMonth","slice","getDate","formatDate","formatDateTime","addDaysToDate","date","days","result","setDate","successEventListener","opResults","HasWarnings","forEach","Warnings","item","failedEventListener","_accountLockError","HasErrors","Errors","lockedAccount","errorEventListener","obj","errors","Stacktrace","StackTrace","logErrors","console","log","setFocusOnReady","elemID","$apply","$","focus","paymentsEnabled","WebPaymentsEnabled","UsesWebEFT","CustWebPaymentSettings","CurrentProfileTerms","AddandEditWebPaymentAccounts","AddandEditWebPayments","ActiveAccountCount","execOnReady","func","resetDirtyFlags","form","$setPristine","removeClass","resizeKendoGrid","grid","count","offset","widowHeight","innerHeight","setOptions","height","scrollable","initializeDateSelector","dateSelector","displaySelector","selection","startDate","startMin","startMax","endDate","endMin","endMax","numOfDays","maxNumOfDays","options","name","valid","overrideDefaults","hideAllDays","disabled","dateSelectorInitialized","localizationFilesListener","localizationFilesInitialized","$watch","setCachedLocalizations","modalifier","display","title","text","showConfirm","closeBtnTxt","confirmBtnTxt","hide","showSetupError","showSavedError","showNoResults","page","confirm","fnYes","fnNo","confirmYes","isUndefined","confirmNo","restrict","require","link","scope","element","attrs","$formatters","modelValue","Number","$parsers","viewValue","ContactUs","Message","ct","st","m","this","ContactUsSubject","SubjectText","ContactUsMessage","CustomerContactKey","showContactUsModal","message","CommentContexts","showErrorBox","loadContactUsContext","$parent","sendMessage","toNumber","validateMessage","saveMessage","MessageSent","getAttrTextFromNodeMap","attr","attributes","getNamedItem","$provide","constant","templates","initDateSelector","onChange","validateStartAndEndDate","today","year","month","getDay","parseInt","$routeParams","$anchorScroll","menu","SiteLayout","HeaderMenu","Name","header","SubMenu","ParentKey","sub","SideMenu","side","setSiteMenuLocation","val","menuObject","subMenuObject","menuText","subMenuText","documentService","getDocuments","ref","desc","start","end","docType","contKey","listDocuments","RefDateFormatted","RefDate","kendo","documentsGridInit","documents","documentsGrid","documentsGridOptions","autoBind","change","e","dataItem","select","Guid","columns","field","width","class","filterable","cell","operator","showOperators","template","dataSource","DataSource","editable","mode","extra","navigatable","pageable","selectable","sortable","ds","documentsGridDS","read","minDate","thisMenu","find","SourceType","SourceKey","documentType","referenceNumber","description","originalWhen","globalResolves","resolveWebUser","_user","route","extend","ajax","homeService","globalizationSvc","modalInfo","curArticle","toggleModal","modalHeader","modalContent","content","shown","updatePageInfo","loadHomePageInformation","PageInfo","formatArticles","formatCurrencies","accountChangeListener","showLastCreditNotification","DispType","HomeInfo","LastCreditNotification","emailPopUp","EdocDtlKey","AttachGUID","showAccountSummary","ViewCreditInformation","DisplayPastDueMsgAt","CrStatus","AccountNeedingVerificationv","showRecentActivity","homeInfo","ScheduledPayment","Amount","PendingEft","PostedEft","LastInvoice","CustomerActivity","LastRcptAmt","LastStmtAmt","CustomerPriceNotice","EdocDetails","DtlKey","getArticle","dir","Announcements","Text","trim","unescapeHTML","lastInv","lastStmt","lastEft","lastPmnt","pendEft","nextSchPmnt","acctBalance","AccountBalance","unbilledActivity","UnshippedBalance","creditLimit","CrLimitTotal","availableCred","AvailableCredit","AmountDisplay","formatCurrency","LastStmtAmtDisplay","LastRcptAmtDisplay","AccountBalanceDisplay","UnshippedBalanceDisplay","CrLimitTotalDisplay","AvailableCreditDisplay","validatorSvc","constantLists","showLogin","showProfileSelector","showForgotPassword","initializeLogin","clearValidationScopes","impersonationGuid","automatedLogin","getRememberMe","checkForAutomatedLogin","authenticateUser","executeValidations","error","passwordExpired","passwordDays","setRememberMe","login","user","token","Token","expires","timeout","validatePasswordComplexity","errorList","retrieveWebUser","err","webUserKey","Answer2","Answer","_webProfileCount","WebProfiles","loadSelectedProfile","getWebUserProfile","retrieveSelectedProfile","Id","showForgotMyPassword","addScopeToValidate","submitForgotMyPassword","processForgotMyPassword","Success","signup","displayControls","Timestamp","AnswerClear","GUID","Password","PasswordClear","Question","QuestionClear","Reset","Validated","controls","confirmPassword","question","answer","confirmAnswer","secretQuestions","instance","getWebUserForSignup","sendWebUser","signupWebUser","clearErrors","clearAllValidations","resetPassword","displayTitle","displayQuestion","displayPassword","displayButton","buttonText","getWebUserForPasswordReset","sendAnswer","verifyWebUserSecretQuestionAnswer","setNewPassword","resetWebUserPassword","submitInfo","webUserToUpdate","customMessage","submitPassword","OldPassword","pageInfo","oldPassword","success","userAccountService","resultMessage","cont","unsubscribeContact","Successful","Unsubscibed","initializePage","showAccounts","showUserOpt","setMenuLocation","setSubMenuLocation","checkUserMenuSecurity","securityGroup","setNewCurrentAuthorization","index","previousIndex","previousAuthorization","$broadcast","showAccountList","editUser","changePassword","showUserOptions","headerTimer","subMenuWaiter","menuKey","barWidth","document","getElementById","clientWidth","acctWidth","style","overflowX","startIndex","endIndex","menuLength","setMenuVisibility","maxMenuWidth","currentMenuWidth","menuItem","visible","moveMenuLeft","moveMenuRight","controllerAs","input","PagesService","ctrl","Context","Pages","Tokens","ViewCustomPages","getWebProfileSiteLayout","customPagesMenuNode","MenuNodes","filter","$sce","$interval","reloadInterval","selectedPage","conf","selectedIndex","pages","foundPage","retrieveToken","getAccessToken","AccessToken","MenuNode","ClientAuthMethod","trustAsResourceUrl","PageURL","access_token","msg","AuthMethods","Header","req","method","Authorization","frame","querySelector","contentWindow","write","close","failed","URL","glue","includes","params","token_type","expires_in","failure","isSelected","retval","PaperworkReportsService","PaperworkEntry","context","reports","reviewPaperwork","loaded","unposted","getPaperworkContext","paperworkSites","PaperworkSites","selectedSite","SelectedSiteKey","lockPaperworkAfterDru","LockPaperworkAfterDru","calculatedPriceToPriorDaysPriceVariance","CalculatedPriceToPriorDaysPriceVariance","calculatedPriceToCapturedRetailPriceVariance","CalculatedPriceToCapturedRetailPriceVariance","netSalesDollarsToCapturedRetailPriceNetUnitsVariance","NetSalesDollarsToCapturedRetailPriceNetUnitsVariance","setSiteDescByKey","showEnterPaperworkMenuItem","CanEnterPaperwork","PaperworkReports","paperworkReports","site","SiteKey","selectedSiteObj","setupNav","retailWarningMessage","averageWarningMessage","setupAppNavigation","apps","app","MenuCode","deliveries","meters","tanks","DealerFormVersionKey","forms","AppKey","openNewPaperworkBatch","OpenPaperworkBatch","batch","PaperworkBatch","PaperworkApps","PaperworkForm","siteInfo","PaperworkSiteInfo","paperworkKey","pwLoadedListener","viewOnly","navPg","menuCode","$$path","resolveCurrentPageMenuCode","getSinglePath","reportingService","$root","reportSettings","reportKey","inventorySummary","reportType","setSiteAndDate","NextPaperworkDate","unwrapReportSettings","loadOptions","wrapReportSettings","saveOptions","setNextPaperworkDate","getNextPaperworkDate","sender","sitekey","paperworkDate","args","format","ValidatePaperworkSiteDateForContact","qs","exportReport","renderReport","localizeReports","sort","compareDisplayNames","report","DisplayName","a","b","localeCompare","isFirstPage","isLastPage","HistoryLimit","maxDate","FutureLimit","getRouterPath","SubmitStatus","paperworkHistoryGrid","paperworkHistoryGridOptions","paperworkHistoryGridInit","paperworkHistoryGridDS","selectedReviewSite","viewPaperworkHistory","reviewLoaded","noRecordsFound","allEntry","PaperworkDate","InvtyCOGSDate","FuelCOGSDate","getPaperworkBatchesByDate","each","PaperworkDateFormatted","TotalFuelSales","loadPaperwork","isEntry","PaperworkMetersService","showRetailPrice","showEndingDollar","showNetDollars","showEndingUnits","showNetUnits","showAvgPrice","showBeginMeters","metersLoaded","kInputOptions","culture","getLocale","decimals","spinners","MaxUnits","scopesToValidate","metersEditable","OpenPaperworkBatchByKey","res","firstLastPage","nextApp","loadMeters","navigateToPage","pwSubMenu","meterIndex","gridColEditorInput","container","fieldName","required","kendoNumericTextBox","max","min","appendTo","gridColNumber","cellIndex","rowIndex","meterGridColIsEditable","model","DollarsEndingState","DollarsNetState","UnitsEndingState","UnitsNetState","FuelPositionUnitReading","FuelPositionDollarReading","onGridKeydown","keyCode","keys","TAB","shiftKey","focusPreviousEditableCell","focusNextEditableCell","initializeMetersGrid","metersGridDS","schema","id","fields","DispenserNo","FuelPositionNo","ProductDescription","RtlPrice","EndAmount","NetAmount","EndUnits","NetUnits","CalcPrice","aggregate","metersGridOptions","data-field","footerTemplate","editor","headerTemplate","hidden","aggregates","dataBinding","parent","dataBound","setupMetersRows","edit","$input","addClass","prop","currentCell","tbody","children","gridInputCellOnBlur","retailChange","endAmountChange","netAmountChange","endUnitsChange","netUnitsChange","row","col","$col","setupGridColumnValidationNotificationUI","setupMetersGridColumns","some","meter","metersGrid","hideColumn","widget","on","calculatePageTotals","qtip","position","adjust","y","classes","processGridColumnValidationNotification","$row","errorMessages","warningMessages","idx","hasErrors","hasWarnings","messageList","append","warningList","meterRowValidation","parms","calcTotalSales","isValid","uid","errorRtlPrice","warningRtlPrice","PriorCalcPrice","Math","abs","errorEndUnits","warningEndUnits","BeginUnits","errorEndAmount","warningEndAmount","BeginAmount","warningCalcPrice","validateMeters","newPWBatchLoadedListener","loadMetersForEntry","PCKey","PaperworkMeters","priceToleranceAmount","PriceToleranceAmount","ShowRetailPrice","ShowEndingDollar","ShowNetDollars","ShowEndingUnits","ShowNetUnits","ShowAvgPrice","ShowBeginMeters","DRUPosted","Status","PageStage","hasChanges","saveMeters","submit","submitClicked","processSubmit","skipNav","submitPaperworkCmdParms","SubmitPaperwork","PreviouslySubmitted","HasBeenSubmitted","GetPaperworkBatchErrorWarning","submitPaperwork","fuelMetersAppInfo","HasData","IsRequired","isPrevious","paperworkMeterHeader","metersForm","FuelMtrKey","SiteDesc","ProfCtrKey","PaperworkBatchKey","UserName","Ts","HeaderTimeStamp","copy","toJSON","updateMeters","savePaperworkMeters","netAmountCalc","calcPerUnit","CheckAveragePriceToRetail","CheckAveragePriceOverDay","calculateNetAmountFromEnd","calculateNetUnitsFromEnd","totalAmount","calculatePageAmountTotals","totalUnits","calculatePageUnitTotals","nextCell","eq","hasClass","nextAll","editCell","prevAll","prev","openBeginMeter","beginAmount","beginUnits","useBeginUnits","useBeginAmount","openPumpTest","TestAmount","TestUnits","saveModalValues","BeginAmountOverride","BeginUnitsOverride","classList","add","PaperworkTanksService","tanksLoaded","postedReadingsExist","NewOSComments","postedTanks","loadTanks","tankIndex","selectOnFocus","partialUnitsEditor","partialUnits","dataTextField","dataValueField","selectionElement","selectedRow","selectedRowData","calculateTankValues","calculateWaterVolumeValues","_filterSource","getPartialDescFromValue","Value","PartialUnits","noReadingChkClick","modelRow","getByUid","NoReading","set","initializeTanksGrid","tanksGridDS","TankNo","ProductId","LargeUnits","SmallUnits","Quantity","WaterSmallUnits","WaterPartialUnits","WaterQuantity","Temperature","NetQuantity","Electronic","Depth","tanksGridOptions","ng-click","setupTankRows","last","tanksGrid","setupTankGridColumns","target","closest","checked","useLargeUnits","quantityOnly","trackWaterLevels","useTempCorrections","calculateVolumeForTemperature","depth","calculateTankDepth","metric","quantity","getVolumeFromTankChart","tankCharts","adjustVolumeForTemperature","tempCharts","calculateWaterDepth","getWaterVolumeFromTankChart","validateTankOverShort","referenceTank","hasWarning","UseOSWarnings","HasWarning","Min","Max","InventoryTankNo","tolerance","EndQty","OSWarningPct","OSWarningUnits","totalValue","calculateTankEndQuantity","tankCommentIsRequired","tank","inventoryTankNo","tankRowValidation","errorFuelQty","warningFuelQty","maxTankVolume","getMaxVolumeFromTankChart","validateTanks","tankCommentRequiredError","refreshDataSource","PaperworkTanks","PostedPaperworkTanks","PartialUnitsList","Metric","QuantityOnly","UseLargeUnits","UseTempCorrections","TrackWaterLevels","TankCharts","TempCharts","OSComments","RequireOSComments","tanksEditable","tankCommentValidation","validationMessage","validatorError","tankCommentErrorOnBlur","tankCommentErrorOnFocus","savePaperworkTanks","showPostedReadings","popupTitle","gridOptions","el","kendoGrid","refresh","HeaderKey","tanksForm","tankHeader","StickType","FuelStkHdrKey","NewText","getPartialValue","PaperworkDeliveriesService","$compile","deliveriesList","fuelDelivery","AuthorizedVendors","AuthorizedTerminals","AuthorizedCarriers","FuelDeliveryFreight","VendKey","TrmnlKey","CarrierKey","deliveriesLoaded","deliveryFilteredTanks","currentView","changeView","view","freightModalFormDelegate","productValidation","errorDescription","newDeliveryProduct","getDeliveriesWithContext","hideModals","FuelDeliveriesList","NewDelivery","LiftDatetime","DelivDateTime","fuelDeliveriesCount","initializeDeliveriesGrid","productEditor","SiteTankProducts","Description","tankEditor","getFilteredTanksList","ProdKey","addDeliveryGridRow","$newRow","deliveriesGridColIsEditable","deliveryIsEditable","getProductByKey","prodKey","deliveriesGridDS","ProdId","ProdDesc","DelivGrossQty","DelivNetQty","SelectedTank","FuelDeliveryProducts","deliveriesGridOptions","setupDeliveryRows","deliveriesGrid","addDeliveryAction","setupDeliveriesGridColumns","setupDeliveryRow","deliveryRow","selectedProduct","totalRows","$lastRow","cancelRow","AllocFuelContKey","AllocFuelContDtlKey","AllocLastPostedFuelContDtlKey","BasedOnUnits","BOLAutoMatched","BOLDtlKey","BusEntKey","CalcExtCost","CalcFrtCost","CalcUnitCost","CnfrmDateTime","CnfrmStatus","CnfrmUserID","ContractOverride","CostOverride","CostPosted","CustLocKey","DestProdKey","DestSiteKey","DestType","ExternalRecID","FrtInInventory","FrtOverride","FrtPLAmt","FrtPLInInvAmt","FrtPLInInventory","FueldelProdFrtReconGrossQty","FueldelProdFrtReconNetQty","FrtReconUserID","FrtReconciled","FrtUnitCost","FrtVndInvKey","FrtVndInvPndKey","FuelContKey","FuelContDtlKey","FuelDelKey","InvcExtCost","InvcFrtCost","InvcFrtUnitCost","InvcGrossQty","InvcNetQty","InvcUnitCost","LastPostedFuelContDtlKey","OrdQty","OrigProdKey","OwnerOption","ReconUserID","Reconciled","TaxPLAmt","TaxPLInInvAmt","VndInvKey","VndInvPndKey","FuelDeliveryTanks","DelivQty","DelProdKey","Ethanol","InventoryCost","LastCost","LastDelivGrossQty","LastDelivNetQty","LastEthanol","LastOctane","LastQty","LastRVP","LastTankNo","Octane","RplCarrierKey","RplCostAssigned","RplTrmnlKey","RplVendKey","RVP","insert","editRow","ShowGrossUnits","deleteDeliveryProductRow","dataRow","remove","newValue","oldValue","vendKey","UsesSiteAuthorizedTerminals","getSiteFuelAuthorizedOrigins","trmnlKey","terminals","savePaperworkDelivery","validateDeliveries","isNewRow","appForm","EntryUserID","paperworkDeliveryHeader","FuelDelivery","deliveryProduct","FilteredTanksList","displayDeleteConfirmationModal","deleteConfirmationModalDeferred","defer","showDeleteConfirmationModal","promise","deleteDeliveryHandler","deliveryListItem","deletePaperworkDelivery","displayCommentsModalForm","showCommentsEntryModalForm","perLoadFreightModalFormDeferred","displayPerLoadFreightModalForm","fuelDeliveryFreight","showPerLoadFreightEntryModalForm","editPerLoadFreight","productKey","SiteTanks","siteTankProductLookup","SiteTankProductLookup","findAll","ProductKey","authorizedTank","TankProductKey","isDefined","delivery","deliveryGridRowValidation","errorNetQty","warningNetQty","errorGrossQty","warningGrossQty","Capacity","showErrorTooltip","deliveriesGridRowsCount","$gridActionFooter","$gridActionFooterRowMiddle","getStatusDescription","liftDateValidation","validationMessageWrn","liftDateTime","hasError","errorMsg","liftDateTimeObject","maxDateTime","minDateTime","validatorWarning","validateLiftDate","pdi","ng","validate","PdiValidation","deliveryDateValidation","deliveryDateTime","delivDateTimeObject","validateDeliveryDate","viewDelivery","deliveryKey","getDelivery","editPerLoadFreightOkHandler","executeValidationsForScope","editPerLoadFreightCancelHandler","addDeliveryFreightRow","newFreightRow","CalcAmt","FrtRuleKey","InvcAmt","Override","validateFreightRow","freight","freightRuleValidation","PaperworkDealerFormsService","dealerFormsLoaded","formsEditable","kOptions","loadDealerForms","dealerForms","DealerForms","setupDisplayValues","Updated","updateDealerForms","setFocus","AllFieldsDisplay","AllFields","newObject","property","formatNumeric","saveDealerForms","dealerFormsForm","Caption","DealerFormVersion","focusSet","Rows","DisplayOnly","IsCalculated","onDealerFormChange","dataIDValue","DataIDValue","parseFloat","convertStringToNumber","CalcFields","calcField","Calcuations","calc","ResultTypeKey","TypeKey","CalcTypeKey","Operation","getReportFromSubMenu","PaperworkReportSites","SubjectArea","intervalPromise","paperworkBatchKey","beforeunloadEventCreated","refreshLock","RefreshPaperworkLock","startLockInterval","stopLockInterval","cancel","beforeUnloadHandler","ID","preventDefault","pwLockListener","addEventListener","pwSubmitListener","removeEventListener","currentPage","isView","menuOrder","findIndex","noKey","pathMode","ReportSettingsService","showSettingsBar","allowLoad","allowSave","allowExport","allowCsv","allowXml","allowPdf","allowExcel","exportReportData","initReportSettings","exportOptions","selectedExportOptions","saveSettingsName","showModalLoad","showModalSave","showModalConfirmSave","selectedKey","selectedReportContactKey","selectedDescription","canDelete","exportData","applyReportSettings","deleteReportSettings","saveReportSettings","getReportSettings","notify","returnedReportSettings","ReportSettings","ARWebSettings","saveSettings","loadSettings","saveConfirmReportSettings","selectKey","saveSettingsKey","fromJson","Options","apiService","deferred","apiSvcSettings","ApiServiceSettings","RptKey","skipValidations","execute","Data","ErrorMessages","custContKey","recStatus","settingsKey","toJson","RecStatus","ReportKey","SettingsKey","executeAndNotifyOnSuccess","getTermsAndConditions","theTermsAndConditions","declineTerms","acceptTerms","agreeToTerms","acceptTermsAndConditions","CustomerWebPaymentSettings","paymentKey","invoicesGrid","invoicesGridOptions","invoicesGridInit","charge","DueDate1","create","InvoiceDate","Balance","invoicesGridDS","creditsGrid","creditsGridOptions","creditsGridInit","UnAppAmount","creditsGridDS","async","unlockPaymentsAsync","localLockData","Headers","body","CustomerKey","fetch","keepalive","webPaymentLocked","paymentControlOptions","CurrentTerms","lockPayments","listeners","beforeunload","initializePart2","invoicesValueArr","invoiceWarning","webPayment","WebPaymentWithContext","CustomerScheduledPayment","PaymentType","InvoiceValues","selctedInvoicesValue","selctedInvoicesValueDisplay","setUpView","getPayment","lockInvoices","getScheduledPayments","HasPendingPayments","CustomerScheduledPayments","any","HasPendingBudgetPayments","selctedCreditsValue","totalInvoiceAmount","setPaymentType","lastStatementDate","LastStatementDate","isStatementCustomer","IsStatementCustomer","LastStatementAmount","HasUnpaidStatement","isBudgetCustomer","IsBudgetCustomer","isBBEnabled","IsBBEnabled","BudgetBalance","isInvoiceCustomer","IsOpenItemCustomer","Invoices","IsPrepaidCustomer","WebMinEFTDate","WebMaxEFTDate","PaymentDate","viewSetupComplete","paymentDate","termsDiscount","theValue","theGrossValue","theDiscount","TermsDiscountDate","TermsDiscount","TermsDiscountDate2","TermsDiscount2","TermsDiscountDate3","TermsDiscount3","TermsDiscountDate4","TermsDiscount4","TermsDiscountDate5","TermsDiscount5","TermsDiscountDate6","TermsDiscount6","round","selctedInvoicesGrossValue","selctedInvoicesGrossValueDisplay","selctedInvoicesDiscountValue","selctedInvoicesDiscountValueDisplay","credit","selctedCreditsValueDisplay","totalInvoiceAmountDisplay","getCssClasses","ngModelController","$invalid","$dirty","$valid","showError","$error","setScheduledPaymentAmount","verifyPayment","dataItems","invoice","Credits","CreatedByCustContKey","LastModifiedByCustContKey","CustPmtAcctKey","CreditAmount","GrossAmount","DiscountAmount","CreditAmountDisplay","GrossAmountDisplay","DiscountAmountDisplay","amount","$cancelPromptToSave","paymentIsValid","elem","css","paymentDateValidation","_localStrings","liftDate","replacementParms","validatePaymentDate","unlockInvoicesAsync","invoicesLocked","delay","paymentType","checkAll","paymentsInfo","lastStmtAmt","budgetBalance","LastStatementAmountDisplay","BudgetAmountDisplay","isBudgetPayment","budgetBalanceChanged","confirmPayment","getBudgetPaymentContext","savePayment","changePayment","reCalculateCreditValues","paymentHistory","scheduled","processed","canceled","getScheduledPaymentHistoryContext","accounts","CustomerPaymentAccounts","scheduledPayments","pmntGrid","pmntGridOptions","pmntGridInit","payment","pmntGridDS","CustPmtAcctDescription","FormattedDate","StatusDescription","FormattedActivityDate","Created","predicate","reverse","cancelPaymentKey","cancelConfirm","selectedAccount","LastModifiedDateTime","FormattedCreatedDate","CreatedDateTime","CreatedByCustContEmailAddress","confirmCancelPayment","cancelPayment","Payments","unloadPaymentHandler","persisted","unloadInvoiceHandler","resetValues","paymentLockListener","invoiceLockListener","paymentUnlockListener","invoiceUnlockListener","PaymentAccountService","acctGrid","acctGridOptions","acctGridInit","acctGridDS","WebPaymentAccounts","AccountStatusDesc","NextPaymentText","getPaymentAccountList","AccountLastActivity","FormattedPaymentDate","AccountNextPayment","AccountNextPaymentAmmount","editableAccount","paymentAccountKey","initializeEditAcount","AccountTypes","descr","WebPaymentAccount","AccountStatus","getPaymentAccount","AccountTypeDescr","AccountType","CustomerPaymentAccount","routingNumberIsValid","setAccountStatus","savePaymentAccount","verifyPaymentAccount","validateRoutingNumber","BankRoutingNo","verifyPaymentAccountOverride","routingNumberValidation","confirmDeactivate","confirmClose","no","acctInfo","confirmPaymentAccount","changePaymentAccount","AccountNoVerify","AccountNo","verifyAccount","webPaymentAccountKey","webPaymentAccountDesc","amt1","amount1","amt2","amount2","VerificationAmount1","VerificationAmount2","contactsGrid","contactsGridOptions","selectedRows","contactsGridInit","contactsGridDS","CustomerContacts","WebActive","ManageContactsAndSecurity","listContacts","FirstName","LastName","$route","expandWFGrids","expand","showAccountFNs","showFuelFNs","showOrdersFNs","showPaperworkFNs","showCustomPagesFNs","wbfns","Disabled","textMessagePhoneNumbers","modalMultiSave","modalCopySecurity","copyContact","clearSecurity","modalResetPassword","verify","modalChangeEmail","hash","email","pendingSave","phoneTypes","clearButton","canResetPassword","EnforcePasswordComplexity","getNextPasswordResetDate","hideActiveCheckbox","hideWebActiveControl","contactKey","customerContactKey","editWebUser","AnswerClear2","copyUser","CopyContacts","loadContactContext","WebQuestionAnswer2","WebQuestionAnswer","TextAddressPhone","setAllWebFunctions","editUserForm","wbFns","saveContact","secretQuestion","$angular_scope","scopeValidationErrors","MatchingContactCount","saveContactOnly","ApplyToAll","save","saveAllContacts","EditorName","EditorEmailAddress","PhoneFormatted","Phone","AltPhoneFormatted","AltPhone","AltPhone2Formatted","AltPhone2","FAXFormatted","FAX","saveWebUser","reload","retrieveWebUserData","setEditUserSelectedAuthorization","updateContactSecurity","currentContactWebFunctions","questionChanged","showChangeEmailModal","hideChangeEmailModal","saveChangeEmail","addUser","copyContacts","getBlankContact","createContact","validationsPassed","closeAddUser","customerService","contacts","primaryCreditContact","sendBalanceAlerts","SendBalanceAlerts","sendBalanceAlertText","balanceAlertThreshold","BalanceAlertThreshold","prepaidBalance","CrPrePaidBalance","balanceAlertThresholdDisplay","CreditContKey","num","saveAccountSettings","saveCustomerAccountSettings","settingsForm","currentCustomerId","auditLog","auditResults","auditLogGrid","auditLogGridOptions","auditLogGridInit","sideMenuLocation","includeAdds","includeChanges","includeDeletes","includeActions","subjectArea","changedBy","showContacts","subjectAreas","contactList","getWebAudits","WebAuditEntries","AudEntryDateTime","AccountActivity","invoices","reportTypeDetail","outstandingOnly","showReportDetail","transactionHistory","creditCardActivity","groupByDate","pending","setReport","tenNinetyNine","useDateRange","AccountReports","recentActivity","AccountPayments","unappliedPayments","statementsGrid","statementsGridOptions","StmtEdocKey","statementsGridInit","statementsGridDS","getStatements","stmt","StmtDateTime","notifications","types","fullName","Active","sortBy","notificationsGrid","notificationsGridOptions","handleRowClick","notificationsGridInit","notificationsGridDS","getNotifications","note","NotcDate","EmailBody","trustAsHtml","NotcType","tenNinetyNineAdvice","yearsBack","adviceGrid","adviceGridOptions","Get1099AdviceList","DateTimeFormatted","DateTime","PmtYear","adviceGridInit","adviceGridDS","FuelCardsService","viewCards","modalEdit","modalPin","modalReissue","modalDeactivate","modalChangeCardNo","viewCardsGrid","viewCardsGridOptions","displayFuelCard","viewCardsGridInit","viewCardsGridDS","cards","getCards","cardFormat","cardNumber","active","expired","locked","cancelled","department","Cards","NumberMasked","Template","statusCodes","act","ActivationDate","exp","ExpirationDate","Sort","FuelCardsCards","FuelCardsTrans","FuelCardsPrices","stringFromCharacterEntity","getCardsContext","formats","CardFormats","embossingReasons","CardEmbossingReasons","deactivateReasons","CardDeactivationReasons","states","States","alertRules","CardAlertRules","CustomerCardTemplates","company","Company","getCardsDepartments","departments","Departments","getCustomerLocations","locations","Locations","saveCards","state","closeModal","card","cardDetails","CardInfos","Number_Formatted","Number_Masked","isValidForWebTemplate","PIN","Activation_Date","Expiration_Date","Cards_Issued","Emboss_Date","Emboss_Line_1","Emboss_Line_2","Emboss_Line_3","Export_To_Embosser","Marked_For_Export","Last_Emboss_Date","CardDeactRsn_Key","Deactivation_Date","HasTransactions","TimeStamp","securityOptions","allowPending","CardCFs","editCards","getCardDetails","ViewCardNumbers","CardDetails","origCardDetails","setSecurityOptions","displayModelPin","saveChangesPrompt","PIN1","PIN2","displayModelReissue","CardEmbRsn_Key","displayModelDeactReasons","toISOString","displayChangeCardNo","command","nextDate","CardFmt_Key","VisibleOnWeb","PhysicalCard","AutoNo","AllowPending","UseExpirationDates","DefaultLifetimeSelection","AllowDefaultByCustomer","Next_Exp_Date","keyLookup","list","isArray","readOnly","formTitle","viewCardNumber","displayCardNumber","canChangeCardNo","showVehicleInfo","showCardAuths","showProdSite","showTaxExemeptions","showEmbossingAlert","showChangePin","showReissue","reissueTitle","showDeactivate","showSaveTemplate","shipToLocation","cardType","cardStatus","deactivationReason","embossingReason","alertRule","EditCards","AllowEditAfterEmbossed","autoNo","maxCardNoLength","Mask","CardAlertRule_Key","Max_Trans_PerDay","AllowVehicleInfo","Auth_By_Product","Single_Site_Auth_Site_Key","CardTaxExs","showSave","AllowPIN","AddNewCards","CardDptKey","Vehicle_State_Key","cols","addFooterBar","addCardAction","stateList","optionLabel","Code","addCardsGridOptions","nullable","validation","number","unique","matches","addCardsGrid","vehicleID","licenseNo","defaultValue","update","destroy","createAt","messages","commands","canceledit","mobile","table","getAttribute","addRow","showCardNo","showPIN","showVehInfo","validateTemplates","templateKey","templateDropDown","saveChanges","templateDetails","clone","newCard","Cust_Key","SetExpirationDate","VehicleID","Vehicle_License_No","CardFmt_Allow_Pending","addCard","CardNumberValid","getCard","splice","myItem","AutoNoKey","locationsGrid","locationsGridOptions","selectLocation","locationsGridInit","locationsGridDS","results","selected","disableCtrls","LocIDFormat","LocIDLength","canAddorSave","ViewCards","pullLocations","unshift","addLocation","clearLocation","blankLocation","deleteLocation","pushLocation","saveLocation","loc","StateKey","State","saveCustomerLocations","locationsForm","updatePhone","departmentsGridReady","departmentsGrid","departmentsGridOptions","selectRow","deptKey","departmentsGridInit","departmentsGridDS","tableArray","html","FieldName","values","selDept","selVals","disableControls","pullDepartments","createObjects","hideCol1","hideCol2","hideCol3","hideCol4","hideCol5","Fields","Values","FieldNumber","CardDptFldKey","FieldValue","dept","makeTable","loadTable","deleteDept","pushDepartments","departmentForm","newDesc","saveCardsDepartments","n","cell2","cell4","deptName","cell1","cell1Key","cell1Value","cell2Key","cell2Value","cell3","cell3Key","cell3Value","cell4Key","cell4Value","cell5","cell5Key","cell5Value","formDisabled","pullFields","setFields","clickCancel","clickSave","pushFields","deptSetupForm","CPPriceNotices","lookupPrices","product","groupBy","sites","CustContCPSite_Site_Key","Site_Description","products","ProdAliasGrp_Key","ProdAliasGrp_Description","maxCPDays","getPriceNoticesSettings","CPPrcNtcRuleKey","PriceNoticesSettingsSites","concat","Site_Selected","PriceNoticesSettingsGroups","ProdAliasGrp_Selected","CPPriceRuleMaxDays","productsGrid","productsGridOptions","sitesGrid","sitesGridOptions","siteSearchGrid","siteSearchGridOptions","siteSearchGridInit","siteSearchGridDS","sitesGridInit","sitesGridDS","Site_Address1","Site_City","State_Code","Site_Zip","productsGridInit","productsGridDS","initPriceNoticesSettings","initModalSiteSelector","priceNoticesSettings","methods","allProducts","CustContCPProd_Key","CustContCPProd_CustCont_Key","ProdAliasGrp_ID","ts","refreshPriceNoticesSettings","PriceNoticesSettingsMethods","CompKey","modalSiteSelector","siteSearch","city","postal","limit","toManyResults","maxResults","showModalSiteSelector","retrieveSites","getSearchSites","SearchSites","checkAllProducts","disableNotices","EmailSelected","AltEmailSelected","PhoneTextSelected","addSites","CustContCPSite_Key","removeSite","savePriceNoticeSettings","hasProducts","hasSites","transactionAlerts","CardTransactions","transactionDetails","cardNoDesc","inclUnbilled","inclBilled","inclAdditionalInfo","viewCardNumbers","additionalInfoReportName","rptName","CPInvcRecapSumTaxesByInvcGrp","updateOptions","transactionSummary","invoiceNo","enableUnbilled","enableBilled","recap1","recap2","transactionByInvoice","getTaxAuthorities","taxAuthorities","TaxAuthorities","taxDetails","taxAuthKey","groupBy1","enableGroupBy1None","groupBy2","enableGroupBy2","groupBy3","enableGroupBy3","inclTransDetail","enableInclAdditionalInfo","taxSummary","transactionsAlerts","reportCount","refreshTransactionAlerts","transactionTaxRecap","showTaxRecap","canOpenAddOrders","CanAddEditWebOrders","ordersService","errorsDisplayed","enableButton","removeAttr","setButtonVisiblity","displayOrders","orderDetails","OrdStatusKey","reopenBtn","submitBtn","WOGSettings","SubmitOnHold","cancelBtn","hasAnyItems","keyProperty","tanksAndEquipment","addOrder","tankIDCol","cancelCommentModal","blankOrderHeaderObj","creditHoldMessage","getOrdersContext","buttonBar","PONumber","DeliveryDT","ordKey","getOrderDetails","OrderDetails","getLocationDetails","getOrderLocationInfo","ReqDelivDateTime","TanksAndEquipment","OrdDelivDirections","DeliveryDirections","equipment","TankNumber","OrderQty","EquipmentKey","hasAnyTanks","hasAnyEquipment","saveOrder","Command","OrdCreatedByContKey","saveOrderDetails","OrdKey","cancelCommentModalDialogClose","editOrders","shipTo","prevCustLocKey","hideTankAndEquipment","ordersGrid","ordersGridOptions","ordersEquipmentGridOptions","ordersGridInit","showIdCol","ordersGridDS","TankID","Product","capacity","is","rowData","getKendoNumericTextBox","MaxVolume","rowDataMaxVolume","showColumn","ordersEquipmentGridInit","ordersEquipmentGridDS","EquipmentID","EquipmentDescription","ordersEquipmentGrid","validateOrderDate","savedTankData","dataBetweenDateChanges","getOrderContext","getOrderCustomerLocations","MinDateTime","OrderLocations","HasValidTankOrEquipment","updateCustomerLocationData","l","loadExistingOrder","initialOrderCustLocKey","validOrderQtys","items","map","order","isInteger","qtyValidityStates","every","Boolean","isFinite","floor","orderQtyWarning","orderTotal","sum","OrdQtyParams","OrdMinQty","OrdMaxQty","validOrder","editForm","updateCustomerLocationDataLock","source","validTankOrEquipment","isEmpty","finalItems","s","existing","CustFuelTankKey","copyTankData","te","OrderEquipmentDetails","copyEquipmentData","t","p","blankOrderDetailsObj","all","requestedDT","suggestedDT","theWinner","temp","reqDelivDateTimeString","oldReqDelivDateTimeString","isString","oldReqDelivDateTime","reqDelivDateTime","toDateString","openOrders","DeliveryDate","getOpenOrders","OpenOrders","openOrder","orders","ViewOrderHistoryandPriceNotices","quotes","ordered","dispatched","delivered","billed","fuel","warehouse","noninventory","productSearchText","packageSearchText","orderInvoiceBOLSearchTerm","bulkFuelPriceNoticesService","bulkPricesGrid","bulkPricesGridOptions","bulkPricesGridInit","bulkPricesGridDS","bulkFuelPrices","loadBulkFuelPrices","EffDateTimeFormatted","EffDateTime","warehousePriceNoticesService","warehousePricesGrid","warehousePricesGridOptions","warehousePricesGridInit","warehousePricesGridDS","warehousePrices","loadWarehousePrices","closeDialog","closeText","autoClose","transclude","$eval","dialogStyle","$element","$attrs","hideModal","ngModelCtrl","transformedInput","$setViewValue","$render","ele","dynamic","contents","NUMBER_REGEXP","lastValidValue","precision","symbol","unFormatNumber","formatViewValue","decimalPlaces","$isEmpty","nStr","split","x1","x2","rgx","test","addCommas","toFixed","applyFormat","$modelValue","$viewValue","empty","$setValidity","bind","customAutofocus","at","tip","corner","$parse","passwordMeterScore","pwdValidLength","pwdHasLetter","pwdHasNumber","pwdHasSpecial","PasswordMinLength","PasswordMinUpperCase","PasswordMinNumbers","score","total","$pristine","currentValue","imageArray","stop","advance","slider","getPrevImage","pauseAutoAdvance","getNextImage","modelCtrl","inputValue","alphaNumeric","initializeWindowSize","maxHeight","scrollHeight","documentElement","offsetHeight","clientHeight","windowHeight","windowWidth","innerWidth","newHeight","oldHeight","replaceWith","onCloseFn","onCloseMessage","onbeforeunload","onLeaveIfFn","onLeaveMessage","$locationChangeStartUnbind","localizedString","confirmPopUpText","pnLocalizationCtrl","localizations","overlayContainer","mainContent","getElementsByClassName","setHeight","postRender","terminal","paperworkLocalizedString","submitPopUpText","currentMenu","currentSubMenu","currentSideMenu","counter","findDirtyElements","formName","nextPath","nextPathIndex","substring","yesFN","navigate","yes","noFN","localResetDirtyFlags","parseMenuLocation","kendoDateFormat","formatForCulture","kendoTimeFormat","kendoDateTimeFormat","inputMaskDateFormat","inputMaskTimeFormat","inputMaskDateTimeFormat","dateFormat","timeFormat","dateTimeFormat","dateTimeFormatPatterns","ntbCtrl","widgetInstance","ui","inputmask","clearMaskOnLostFocus","toBoolean","v","$$lowercase","String","theString","arguments","regEx","RegExp","validatorParms","executionExplicit","processElementErrorNotification","validationAttr","propertyName","validationValidationMsg","kendoDropDwnElm","errFocusHdlr","errBlurHdlr","errClickHdlr","ngModel","join","toggle","currentElement","span","unbind","processElementWarningNotification","wrnFocusHdlr","wrnBlurHdlr","kendoDropDwnElm1","processValidationNotification","compile","output","validationErr","viewport","my","collision","screen","fixed","scopeValidationWarnings","validationWrn","processValidationsSummaryNotification","createElementValidationMessageError","validationMsg","validationMessageElement","clearBtnElm","siblings","after","createElementValidationMessageWarning","removeElementValidationMessage","$this","requiredMsgDefault","minLengthMsgDefault","maxLengthMsgDefault","valueRuleRngMsgDefault","valueRuleGtMsgDefault","valueRuleLtMsgDefault","pdiRequiredExecutionExplicitDefault","ptrnEmailMsgDefault","pdiMinLengthExecutionExplicitDefault","pdiMaxLengthExecutionExplicitDefault","pdiMaxLengthEnforceMaxConstraintDefault","pdiValueRuleRangeExecutionExplicitDefault","pdiValueRuleGreaterThanExecutionExplicitDefault","pdiValueRuleLessThanExecutionExplicitDefault","pdiEmailValidataionExecutionExplicitDefault","evaluateIfConditions","ifExpr","cs","$$childHead","$$nextSibling","scopeValidations","hadError","validatorResult","validator","validateErrors","validateWarnings","warnings","formModelWatchers","addScope","scopeID","$id","pdivalidation","pdiValidations","elementValue","expression","isObject","isFunction","priority","validations","addValidation","showValidationNotification","ctrlIndex","errorValidatorFn","warningValidatorFn","validationErrorMsg","validationWarningMsg","formModel","newScope","$new","appHtml","addFormModelWatcher","watchUnBinder","unBinderFn","ctrls","requiredValidationMsg","requiredValidationMsgWrn","requiredExecutionExplicit","requiredIfExpr","requiredIfExprWrn","minlengthValidationMsg","minlengthValidationMsgWrn","minlengthExecutionExplicit","pdiMinlength","minlengthIfExpr","minlengthIfExprWrn","ifConditions","maxlengthValidationMsg","maxlengthValidationMsgWrn","enforceMaxConstraint","enforcemaxconstraint","maxlengthIfExpr","pdiMaxlength","maxlengthExecutionExplicit","lowerLimit","upperLimit","valueRuleRngValidationMsg","valueRuleRngValidationMsgWrn","valueruleRngValidationMsg","valueruleRngValidationMsgWrn","rangeParms","pdiValueruleRange","valueruleRngExecutionExplicit","valueruleRngIfExpr","valueruleRngIfExprWrn","valueruleGtValidationMsg","valueruleGtValidationMsgWrn","valueruleGtExecutionExplicit","pdiValueruleGreaterthan","valueruleGtIfExpr","valueruleGtIfExprWrn","valueruleLtValidationMsg","valueruleLtValidationMsgWrn","valueruleLtExecutionExplicit","pdiValueruleLessthan","valueruleLtIfExpr","valueruleLtIfExprWrn","ptrnValidationMsg","pdiValueIsNumeric","pdiValueIsNumericMsg","pdiDateIsGreaterEqualToMsg","pdiDateIsGreaterEqualToMsgWrn","fromDate","pdiDateIsGreaterEqualToFromDate","thruDate","ptrnValidationMsgWrn","regExPattern","ptrnEmailValidationMsg","ptrnEmailValidationMsgWrn","prtnEmailExecutionExplicit","emails","matchElementValidationMsg","matchElementValidationMsgWrn","valueruleNgModelMatch","valueruleMatchElementValidationMsg","valueruleMatchElementValidationMsgWrn","valueruleMatchElementIfExpr","valueruleMatchElementIfExprWrn","constructor","settings","responseType","ApiServiceOperationResult","SuccessMsg","SucessMessage","ErrorTitle","WarningMessages","IsRedirect","RedirectUrl","account","AccountNoMasked","PrenoteDate","RejectedEmailSent","VerificationDate","IsDefault","AccountNextPaymentKey","ScheduledPaymentCount","post","Content-Type","NotificationService","webAPICall","notifyOnSuccess","suppressErrors","assign","handleSuccess","handleFailure","handleError","executeAndNotifyOnSuccessAndSuppressErrors","executeAndSuppressErrors","factory","service","All","BulkFuel","CardLock","Retail","Wholesale","CardAlerts","ViewNotificationsSenttoOtherContacts","AddAndEditBulkFuelOrders","Account","Orders","Paperwork","FuelCards","Comments","Documents","AccountAlerts","CustomPages","webFunction","customer","handle","HttpUtil","paymentInfo","sessionTimeout","$analytics","WebUserId","WebUserPassword","ImpersonationGuid","ImpersonatedUserId","ImpersonatedKey","ImpersonatedType","ImpersonatorUserId","ImpersonatorKey","ImpersonatorType","eventTrack","category","label","removeEmptySiteMenuEntries","WebUser","retrieveWebUserFromAPI","retrieveWebUserFromAPIWithToken","ProfileKey","retrieveSelectedProfileFromAPI","webUserId","quiet","isLogin","WebUserKey","IsLogin","date1_ms","PWCreatedDate","date2_ms","_token","_profile","tel","country","userAgent","navigator","browsers","chrome","safari","firefox","ie","custLocKey","StartDate","EndDate","alertAmount","sendAlerts","executeAndNotify","PrimaryContactKey","AlertAmount","locType","LocationType","Location","custkey","beginDate","BeginDate","customerKey","listAttachmentsCmdParms","ReferenceNumber","DocumentType","ContactKey","documetnList","cust","yb","YearsBack","EdocKey","parameters","Parameters","MimeType","blob","bytes","EdocStream","raw","atob","uint8Array","Uint8Array","charCodeAt","Blob","createBlob","file","createObjectURL","setDatesToNull","cardNumDesc","isActive","isExpired","isPending","isLocked","isCancelled","CardFormatKey","CardNumDesc","IsActive","IsExpired","IsPending","IsLocked","IsCancelled","Department","cardKey","canViewCardNumbers","CardKey","CanViewCardNumbers","compKey","CompanyKey","cardCF","Card","CardCF","getLookupPrices","daysBack","DaysBack","cpPriceNoticeRuleKey","CPPriceRuleKey","City","Zip","Limit","groups","Address1","Address2","County","PostalCode","Email","depts","vals","locale","language","toLocaleString","currency","dateString","_cachedLocalizations","setLocalizations","localizationFilesContainer","innerText","string","getStringFrom","r","doesNotExist","getCachedLocalizationsFor","rp","Array","replaceString","fromCharCode","str","localizationSvcFactory","moduleName","self","$onInit","templateName","requestedDeliveryDate","RequestedDeliveryDate","Comment","CustContName","CustContPhone","CustLocAddress","CustLocCity","CustLocDesc","CustLocState","CustLocZip","LangID","OrdDelivNotes","OrdNumber","OrdStatus","OrdType","OrdFuelKey","localCache","Cache","object","expiration","now","inserted","nodeKey","ignoreStatus","IgnoreStatus","siteKey","Unposted","PaperworkBatches","emailAddress","BatchKey","ReadOnly","readonly","forEntry","ForEntry","RefreshLock","customerId","LockType","LockKey","CustomerId","DealerFormsHeader","forViewOnly","vendorKey","deliveryHeader","DeliveryHeader","calculateNet","begin","diff","nMax","profitcenterKey","ProfitCenterKey","netUnits","rtlPrice","checkRetailPrice","checkAveragePrice","showRtlPrice","netAmounts","totalDollar","theVal","pumpTestVal","meterHeaders","PaperworkMeterHeader","getPaperworkReports","getPaperworkReportSites","reportName","ReportName","convertVolumeToSiteUnits","units","siteUOM","tankUOM","getVolume","UnitOfMeasure","MeasurementType","tankChart","TankTypeKey","convertLinearUnits","wholeNumber","decimalNumber","baseAmount","partialAmount","Volume","isMetric","WaterDepth","TmpChartKey","temperature","tempChart","conversionFactor","ConvFactor","qty","wQty","TmpChartUseNetQty","tankHeaders","PaperworkTankHeader","customerPaymentAccountKey","webPaymentAccount","routingNumber","webPaymentKey","WebPaymentKey","accountKey","AccountKey","Scheduled","Canceled","Processed","skipBroadcast","CmdSuccess","lockPaymentsAndInvoices","termsKey","LegalTermKey","getARCustWebSheet","styleSheets","setLandingColor","pcolor","landingClasses","profileClasses","resetStyle","cssOverrideStyle","attribute","classNames","pdiSheet","rules","cssRules","selectorText","ArWebProfile","WebProfileKey","retrieveWebProfileFromAPI","webProfileWithContext","WebProfileWithContext","sCfg","iniializeFromApi","LandingPrimaryColor","Timeout","webProfileKey","messageType","ca","MessageType","WebProfileMessage","retrieveWebProfileMessageFromAPI","includeEvents","nameEmail","IncludeAdds","IncludeChanges","IncludeDeletes","IncludeEvents","NameEmail","MaxRows","renderReportApi","ReportBytes","documentMode","msSaveBlob","Filename","blobUrl","filename","createElement","click","href","download","appendChild","parentNode","removeChild","top","padCharacter","revokeObjectURL","AltEmailAddress","AltExt","AltExt2","AltPhone2Type","AltPhoneType","AltSpdDial","AltSpdDial2","CnSalKey","CPPrcNtcAllProducts","CPPrcNtcChgByDateTime","CPPrcNtcChgByUser","CPPrcNtcSignupDateTime","CPPrcNtcSignupUser","CreatedBy","EmailAddressOrig","Ext","FAXExt","FAXSpdDial","FaxPrefix","Greeting","LastChgBy","Notes","PhoneType","ReceiveMarketingLetters","SpdDial","TextAddressTextMsgDomKey","Title","WebMustChgPwd","WebPWAccessSingleSite","WebPWAccessSiteKey","WebPwd","WebQuestionType","CustomerContactWebAlerts","ConfirmEmail","customerContact","$get","absurl","protocol","hostname","pathname","indexOfAppRel","toLowerCase"],"mappings":"AAIAA,QAAAC,OAAA,cAAA,CACA,iBACA,mBACA,yBACA,UACA,YACA,cACA,UACA,WACA,SACA,UACA,mBACA,oBACA,mBACA,oBACA,0BACA,WACA,cACA,cACA,cACA,eACA,iBACA,mBACA,UACA,kBACA,eACA,aACA,iBACA,aACA,eACA,gBACA,mBACA,gCACA,mBACA,qBACA,qBACA,qBACA,gBACA,0BACA,kBACA,qBACA,2BACA,0BACA,+BACA,gCACA,4BACA,oBACA,2BACA,wBACA,iCACA,sBACA,qBACA,iBACA,mBACA,qBACA,gBACA,eACA,iBACA,cACA,iC,gFAEA,SAAAC,eAAAC,cAAAC,kBAAAC,kBAIAD,kBAAAE,WAAA,IAEAJ,e,KACA,IACA,CACAK,YAAAF,iBAAAG,YAAA,SACAC,WAAA,YACAC,QAAA,CACAC,aAAA,CAAA,kBAAA,SAAAC,iBACA,OAAAA,gBAAAC,gCAAA,0B,KAKA,uCACA,CACAN,YAAA,oEACAE,WAAA,sB,UAGA,CACAF,YAAAF,iBAAAG,YAAA,QACAC,WAAA,WACAC,QAAA,CACAC,aAAA,SAAAC,iBACA,OAAAA,gBAAAC,gCAAA,wBAMAV,cAAAW,aAAAC,KAAA,mBACAZ,cAAAW,aAAAC,KAAA,sB,QAKA,kBAAA,CAAA,aAAA,KAAA,YAAA,kBAAA,SAAAC,WAAAC,GAAAC,UAAAN,iBAGA,MAAA,CAEAO,QAAA,SAAAC,QAkBA,OAfAA,OAAAC,QAAAD,OAAAC,SAAA,GAGAL,WAAAM,WAAAN,WAAAM,UAAAC,qBACAH,OAAAC,QAAA,uBAAAL,WAAAM,UAAAE,OACAJ,OAAAC,QAAA,wBAAAL,WAAAM,UAAAG,QACAL,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AyoC,WAAAM,QAAAJ,gBAAAzzC,KACA,SAAA/E,MACAu4C,SAAAp6C,QAAA6B,KAAA64C,QAGAN,SAAApK,aC1BA1wC,QAAAC,OAAA,iBAAA,I,SACA,WAAA,CAAA,WAEAqV,KAAA8sF,KAAA,WACA,MAAA,IAGA9sF,KAAA9U,YAAA,SAAAu1F,cACA,IAAAsM,OAAAl+F,OAAAoF,SAAA+4F,SAAA,KAAAn+F,OAAAoF,SAAAg5F,SAAAp+F,OAAAoF,SAAAi5F,SACAC,cAAAJ,OAAAK,cAAAp9F,QAAA,eAEA,OADA+8F,OAAArkB,UAAA,EAAAykB,eAAA,aAAA1M,iB,SAKA,YAAA,SAAA11F,kBAAA,OAAAA","file":"ARCustWeb.min.js","sourcesContent":["/**\r\n * Created by rhampton on 3/6/14.\r\n */\r\n\r\nangular.module('petronetApp', [\r\n 'core.providers',\r\n 'kendo.directives',\r\n 'services.localizations',\r\n 'ngRoute',\r\n 'ngAnimate',\r\n 'pnContactUs',\r\n 'pnLogin',\r\n 'pnHeader',\r\n 'pnHome',\r\n 'pnAdmin',\r\n 'pnAccountReports',\r\n 'pnAccountPayments',\r\n 'pnFuelCardsCards',\r\n 'pnFuelCardsPrices',\r\n 'pnFuelCardsTransactions',\r\n 'pnOrders',\r\n 'pnODPricing',\r\n 'pnPaperwork',\r\n 'pnDocuments',\r\n 'pnDocAccount',\r\n 'pnDateSelector',\r\n 'pnReportSettings',\r\n 'pnPages',\r\n 'core.directives',\r\n 'core.filters',\r\n 'core.enums',\r\n 'core.constants',\r\n 'core.error',\r\n 'core.objects',\r\n 'core.security',\r\n 'services.browser',\r\n 'services.bulkFuelPriceNotices',\r\n 'services.encrypt',\r\n 'services.FuelCards',\r\n 'services.contactUs',\r\n 'services.documents',\r\n 'services.home',\r\n 'services.globalizations',\r\n 'services.orders',\r\n 'services.paperwork',\r\n 'services.paperworkMeters',\r\n 'services.paperworkTanks',\r\n 'services.paperworkDeliveries',\r\n 'services.paperworkDealerForms',\r\n 'services.paperworkReports',\r\n 'services.payments',\r\n 'services.paymentAccounts',\r\n 'services.userAccounts',\r\n 'services.warehousePriceNotices',\r\n 'services.WebProfile',\r\n 'services.customers',\r\n 'services.pages',\r\n 'services.logging',\r\n 'services.reporting',\r\n 'services.edoc',\r\n 'pdi.validate',\r\n 'pdi.extensions',\r\n 'angulartics',\r\n 'angulartics.google.analytics'\r\n])\r\n .config(function ($routeProvider, $httpProvider, $locationProvider, templateProvider)\r\n {\r\n // as of angularjs 1.6.0 they append ! to hashbang urls which causes undesired behavior\r\n // reset that functionlity by adding this hashPrefix change\r\n $locationProvider.hashPrefix('');\r\n\r\n $routeProvider\r\n .when(\"/\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"LogIn\"),\r\n controller: 'loginCtrl',\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"LoginLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Alerts/BalanceAlertSettings\",\r\n {\r\n templateUrl: \"account/alerts/balanceAlertSettings/balanceAlertSettings.tpl.html\",\r\n controller: \"VerifyPaymentCtrl\"\r\n }\r\n )\r\n .otherwise({\r\n templateUrl: templateProvider.getTemplate(\"Home\"),\r\n controller: \"homeCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"HomeLocalization\");\r\n }\r\n }\r\n });\r\n\r\n // Add our custom Interceptors\r\n $httpProvider.interceptors.push('httpInterceptor');\r\n $httpProvider.interceptors.push('AuthInterceptor');\r\n\r\n // For backwards compatibility to old browsers, set this to false\r\n //$locationProvider.html5Mode(false).hashPrefix('!');\r\n })\r\n .factory('httpInterceptor', function ($rootScope, $q, $injector, localizationSvc)\r\n {\r\n\r\n return {\r\n\r\n request: function (config)\r\n {\r\n\r\n config.headers = config.headers || {};\r\n\r\n\r\n if ($rootScope.loginInfo && $rootScope.loginInfo.userIsImpersonated) {\r\n config.headers['customerweb-user-id'] = $rootScope.loginInfo.userId;\r\n config.headers['customerweb-user-key'] = $rootScope.loginInfo.userKey;\r\n config.headers['customerweb-user-type'] = $rootScope.loginInfo.userType;\r\n config.headers['customerweb-impersonator-id'] = $rootScope.loginInfo.impersonatorUserId;\r\n config.headers['customerweb-impersonator-key'] = $rootScope.loginInfo.impersonatorUserKey;\r\n config.headers['customerweb-impersonator-type'] = $rootScope.loginInfo.impersonatorUserType;\r\n }\r\n\r\n // Show our ajax spinner\r\n $rootScope.showLoader = true;\r\n\r\n return config || $q.when(config);\r\n },\r\n\r\n response: function (response)\r\n {\r\n\r\n var $http = $http || $injector.get('$http');\r\n\r\n // If all the pending http requests are done or\r\n // the user is not authenticated\r\n if ($http.pendingRequests.length < 1 || $rootScope.isAuthenticated === false)\r\n {\r\n // Hide the ajax spinner\r\n $rootScope.showLoader = false;\r\n }\r\n\r\n return response || $q.when(response);\r\n\r\n },\r\n\r\n responseError: function (response)\r\n {\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"AppLocalization\");\r\n switch (response.status)\r\n {\r\n case 500:\r\n if (response.data.ExceptionMessage && response.data.ExceptionMessage.match(\"UNIQUE KEY constraint\"))\r\n {\r\n if (response.data.ExceptionMessage.match(\"AR_Web_Settings\"))\r\n $rootScope.notifier.show('' + localStrings.getLocalizedString(\"SaveFailed\") + '
' + localStrings.getLocalizedString(\"UniqueNameRequired\"), 'error');\r\n else\r\n $rootScope.notifier.show('' + localStrings.getLocalizedString(\"SaveFailed\") + '
' + localStrings.getLocalizedString(\"CannotInsertDuplicate\"), 'error');\r\n }\r\n\r\n if (response.data.ExceptionMessage && response.data.ExceptionMessage.match(\"Timeout expired\"))\r\n {\r\n $rootScope.notifier.show(localStrings.getLocalizedString(\"ConnectionTimedOut\"), 'error');\r\n }\r\n }\r\n\r\n // An error has occurred, hide the ajax spinner\r\n $rootScope.showLoader = false;\r\n\r\n return $q.reject(response);\r\n\r\n }\r\n\r\n };\r\n\r\n })\r\n .controller(\"indexCtrl\", function ($scope, $http, $q, $rootScope, Authentication, WebUserSvc, $location,\r\n WebFunctionGroups, WebFunctions, $window, BrowserService, WebProfileService, $timeout, $filter, encryptData,\r\n WebFunctionModules, PaymentService, PaperworkService, localizationSvc, LoggingService, EdocService)\r\n {\r\n 'use strict';\r\n\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"AppLocalization\");\r\n var localDateRangeStrings = localizationSvc.getCachedLocalizationsContainer(\"DateSelectorLocalization\");\r\n $scope.initialize = function ()\r\n {\r\n $scope.appInfo = $scope.appInfo || {\r\n profile: {},\r\n webUser: {},\r\n paperwork: {},\r\n fuelCards: {},\r\n userLoaded: false,\r\n profileKey: -1,\r\n customText: \"\",\r\n backgroundImage: {},\r\n syscfg: {}\r\n };\r\n\r\n if (angular.isUndefinedOrNullOrEmpty($rootScope.loginInfo))\r\n {\r\n $rootScope.loginInfo = {};\r\n $rootScope.loginInfo.userId = \"\";\r\n $rootScope.loginInfo.password = \"\";\r\n $rootScope.loginInfo.userKey = -1;\r\n $rootScope.loginInfo.userType = 1;\r\n $rootScope.loginInfo.userIsImpersonated = false;\r\n $rootScope.loginInfo.impersonatorUserId = \"\";\r\n $rootScope.loginInfo.impersonatorUserKey = -1;\r\n $rootScope.loginInfo.impersonatorUserType = 0;\r\n $rootScope.loginInfo.impersonationAccessGuid = undefined;\r\n\r\n }\r\n\r\n if ($location.path().search(/(SignUp|ResetPassword|unsubscribe|SiteDisabled)/i) === -1)\r\n {\r\n if ($location.path().indexOf(\"SetPassword\") >= 0)\r\n {\r\n\r\n $scope.applySystemSettings();\r\n\r\n }\r\n else if (!$scope.appInfo.userLoaded || $scope.appInfo.webUser === undefined)\r\n {\r\n if (WebUserSvc.getLoggedInWebUserToken() === undefined)\r\n $scope.logout();\r\n }\r\n }\r\n };\r\n\r\n $scope.getAuthenticationToken = function ()\r\n {\r\n return Authentication.userToken();\r\n };\r\n\r\n $scope.logout = function ()\r\n {\r\n $rootScope.sessionExpired = false;\r\n $scope.clearInfo();\r\n $scope.goTo('/');\r\n };\r\n\r\n $scope.clearInfo = function ()\r\n {\r\n $rootScope.loggingOut = true;\r\n let paperworkLockInfo = amplify.store(\"removeLockInfo\");\r\n if (!angular.isUndefinedOrNullOrEmpty(paperworkLockInfo)) {\r\n PaperworkService.RemovePaperworkLock(paperworkLockInfo.batchKey, paperworkLockInfo.custKey);\r\n }\r\n\r\n clearPaymentLocks();\r\n\r\n setTimeout(function() {\r\n amplify.store(\"removeLockInfo\", null);\r\n amplify.store(\"pnuser-token\", null);\r\n amplify.store(\"pnprofile\", null);\r\n amplify.store(\"pnWebProfile\", null);\r\n amplify.store(\"pnAuthIndex\", null);\r\n $rootScope.isAuthenticated = false;\r\n $rootScope.loginInfo = {};\r\n $rootScope.loginInfo.userId = \"\";\r\n $rootScope.loginInfo.password = \"\";\r\n $rootScope.loginInfo.rememberMe = false;\r\n $scope.locationInfo = {};\r\n $scope.appInfo = {};\r\n }, 0);\r\n };\r\n\r\n function clearPaymentLocks() {\r\n let lockData = amplify.store(\"paymentLockData\");\r\n if (!angular.isUndefinedOrNullOrEmpty(lockData)) {\r\n PaymentService.unLockPayments(lockData.CustContKey, lockData.EmailAddress, lockData.CustKey);\r\n PaymentService.unlockInvoices(lockData.CustContKey, lockData.EmailAddress, lockData.CustKey);\r\n\r\n amplify.store(\"paymentLockData\", null);\r\n }\r\n }\r\n\r\n $scope.functionGroup = WebFunctionGroups;\r\n $scope.webFunctions = WebFunctions;\r\n $scope.locationInfo = {\r\n menuLocation: 0,\r\n subMenuLocation: -1,\r\n sideMenu: \"\",\r\n sideMenuData: {}\r\n };\r\n\r\n //default actions for side menu apply buttons\r\n $scope.applyAction = function ()\r\n {\r\n //todo: set error condition indicating there is no assigned action\r\n };\r\n\r\n\r\n $scope.applySystemSettings = function ()\r\n {\r\n WebProfileService.initialize().then(function (data)\r\n {\r\n $scope.appInfo.syscfg = data.Configuration;\r\n $scope.appInfo.softwareVersion = data.SoftwareVersion;\r\n $scope.appInfo.ContactUsText = data.ContactUsText;\r\n $scope.appInfo.poweredByPdiText = data.PoweredByPdiText;\r\n $scope.appInfo.countryInfo = data.Country;\r\n $scope.appInfo.passwordComplexity = data.PasswordComplexity;\r\n\r\n if (!$scope.appInfo.userLoaded)\r\n {\r\n $scope.appInfo.LandingLogoImage = data.LandingLogoImage;\r\n $scope.appInfo.backgroundImage = data.LandingBannerImage;\r\n }\r\n\r\n if ($scope.appInfo.syscfg.UseGoogleAnalytics === 'True' && !$scope.appInfo.syscfg.GoogleAnalyticsKey.isBlank())\r\n {\r\n ga('create', $scope.appInfo.syscfg.GoogleAnalyticsKey, 'auto'); // 'none' while you are working on localhost else 'auto'\r\n }\r\n });\r\n };\r\n\r\n $scope.applySystemSettingsSiteDisabled = function ()\r\n {\r\n WebProfileService.initializeSiteDisabled().then(function (data)\r\n {\r\n $scope.appInfo.syscfg = data.Configuration;\r\n $scope.appInfo.softwareVersion = data.SoftwareVersion;\r\n $scope.appInfo.poweredByPdiText = data.PoweredByPdiText;\r\n $scope.appInfo.countryInfo = data.Country;\r\n $scope.appInfo.passwordComplexity = data.PasswordComplexity;\r\n if (!$scope.appInfo.userLoaded)\r\n {\r\n $scope.appInfo.LandingLogoImage = data.LandingLogoImage;\r\n $scope.appInfo.backgroundImage = data.LandingBannerImage;\r\n }\r\n\r\n });\r\n };\r\n\r\n $scope.applySelectedProfile = function () {\r\n $scope.appInfo.webUser = WebUserSvc.getWebUser();\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.appInfo.webUser)) {\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.appInfo.webUser.CurrentWebProfile)) {\r\n $scope.appInfo.profile = $scope.appInfo.webUser.CurrentWebProfile;\r\n $scope.appInfo.profileKey = $scope.appInfo.webUser.CurrentWebProfile.Key;\r\n WebProfileService.setProfileColor($scope.appInfo.webUser.CurrentWebProfile.PrimaryColor);\r\n }\r\n\r\n if (angular.isUndefinedOrNullOrEmpty($scope.appInfo.authorizationIndex))\r\n $scope.appInfo.authorizationIndex = WebUserSvc.getCurrentAuthorization();\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.appInfo.authorizationIndex))\r\n $scope.appInfo.webUser.CurrentAuthorization = $scope.appInfo.webUser.WebAuthorizations[$scope.appInfo.authorizationIndex];\r\n\r\n $scope.appInfo.backgroundImage = $scope.appInfo.webUser.MenuBackgroundImage;\r\n $scope.appInfo.userLoaded = true;\r\n }\r\n };\r\n\r\n $scope.checkForAppliedProfile = function () {\r\n if (angular.isUndefinedOrNullOrEmpty($scope.appInfo.webUser) ||\r\n angular.isUndefinedOrNullOrEmpty($scope.appInfo.webUser.CurrentWebProfile) ||\r\n angular.isUndefinedOrNullOrEmpty($scope.appInfo.webUser.CurrentAuthorization)) {\r\n $scope.applySelectedProfile();\r\n }\r\n };\r\n\r\n $scope.setSubMenu = function (value, location)\r\n {\r\n $scope.locationInfo.sideMenuData.pendingNav = $timeout(function ()\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = value;\r\n $scope.locationInfo.sideMenuData.pendingNav = undefined;\r\n }, 0);\r\n };\r\n\r\n $scope.setWebProfile = function (profileKey)\r\n {\r\n $scope.appInfo.profileKey = profileKey;\r\n WebProfileService.setWebProfile(profileKey).then(function (data)\r\n {\r\n $scope.appInfo.profile = data.WebProfile;\r\n });\r\n };\r\n\r\n $scope.setSystemConfiguration = function ()\r\n {\r\n WebProfileService.setSystemConfiguration().then(function (data)\r\n {\r\n\r\n });\r\n };\r\n\r\n $scope.checkCurrentUserPermissions = function (value, contact)\r\n {\r\n $scope.checkForAppliedProfile();\r\n\r\n if (!contact)\r\n {\r\n if (!$scope.appInfo.webUser) return false;\r\n if (!$scope.appInfo.webUser.CurrentAuthorization) return false;\r\n contact = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact;\r\n }\r\n var webFunctions = contact.CustomerContactWebFunctions;\r\n for (var x = 0; x < value.length; x++)\r\n {\r\n var hasModuleAccess = $scope.checkCurrentCustomerModules(value[x]);\r\n\r\n for (var i = 0; i < webFunctions.length; i++)\r\n //check to see if the current customer has the allowed function.\r\n //then check the contact security.\r\n if (webFunctions[i].WebFnKey === value[x])\r\n if (hasModuleAccess && webFunctions[i].Selected)\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n $scope.checkCurrentUserPermission = function (value, contact)\r\n {\r\n $scope.checkForAppliedProfile();\r\n\r\n if (!contact)\r\n {\r\n if (!$scope.appInfo.webUser) return false;\r\n if (!$scope.appInfo.webUser.CurrentAuthorization) return false;\r\n contact = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact;\r\n }\r\n\r\n //check to see if the current customer has the allowed function.\r\n if (!$scope.checkCurrentCustomerModules(value))\r\n return false;\r\n\r\n if (contact.AllWebFunctions) return true;\r\n\r\n var webFunctions = contact.CustomerContactWebFunctions;\r\n for (var i = 0; i < webFunctions.length; i++)\r\n if (webFunctions[i].WebFnKey === value)\r\n {\r\n return webFunctions[i].Selected;\r\n }\r\n return false;\r\n };\r\n\r\n $scope.checkCurrentCustomerModules = function (value)\r\n {\r\n var currentCustomer = $scope.appInfo.webUser.CurrentAuthorization.Customer;\r\n var isBulkFuel = currentCustomer.BulkFuelCustomer !== 0;\r\n var isCardLock = currentCustomer.CardLockCustomer !== 0;\r\n var isRetail = currentCustomer.RetailCustomer !== 0;\r\n var isWholesale = currentCustomer.WholesaleCustomer !== 0;\r\n var isWebEft = (currentCustomer.WebPmtEFTGrpKey !== null && currentCustomer.WebPmtEFTGrpKey !== 0);\r\n\r\n //check to see if the current customer has the allowed function.\r\n return WebFunctionModules.checkWebFunctionModules(value, isBulkFuel, isCardLock, isRetail, isWholesale, isWebEft, currentCustomer);\r\n };\r\n\r\n $scope.openEdocByRefNo = function (type, key, refNo, custKey)\r\n {\r\n var qs = {\r\n \"EdocDetailsKey\" : 0,\r\n \"Type\" : type,\r\n \"Key\" : key,\r\n \"RefNo\" : refNo,\r\n \"CustKey\" : custKey\r\n };\r\n\r\n EdocService.renderEdocByRefNo(JSON.stringify(qs))\r\n .then(function (edoc) {\r\n var url = EdocService.createUrl(edoc);\r\n window.open(url, '_blank', 'menubar=no,resizable=no,height=600,width=770,toolbar=no');\r\n });\r\n };\r\n\r\n function openNewWindow(url)\r\n {\r\n window.open(url, localStrings.getLocalizedString(\"DocumentViewer\"), 'location=no,menubar=no,resizable=no,scrollbars=no,status=no ,toolbar=no, height=600, width=770');\r\n }\r\n\r\n $scope.openEdoc = function (edocKey)\r\n {\r\n EdocService.renderEdoc(edocKey)\r\n .then(function (edoc){\r\n openNewWindow(EdocService.createUrl(edoc));\r\n });\r\n };\r\n\r\n $scope.openEdocEmail = function (edocKey, senderAddress)\r\n {\r\n if (senderAddress && senderAddress.length > 0)\r\n {\r\n var qs = \"EdocDetailsKey=\" + edocKey +\r\n \"senderAddress=\" + senderAddress;\r\n\r\n encryptData.encrypt(qs).then(function (data)\r\n {\r\n var url = '../EdocDetailsEmail/Index/?x=' + encodeURIComponent(data) + '&y=' + encodeURIComponent(Authentication.userToken());\r\n openNewWindow(url);\r\n });\r\n return;\r\n }\r\n $scope.openEdoc(edocKey);\r\n };\r\n\r\n $scope.openAttachment = function (attachmentGuid)\r\n {\r\n var url = '../api/Attachment/?x=' + attachmentGuid + '&y=' + encodeURIComponent(Authentication.userToken());\r\n openNewWindow(url);\r\n };\r\n\r\n $scope.getWebProfileMessage = function (messageKey)\r\n {\r\n var profileKey = ($scope.appInfo && $scope.appInfo.profileKey) ? $scope.appInfo.profileKey : 0;\r\n\r\n WebProfileService.getWebProfileMessage(profileKey, messageKey).then(function (data)\r\n {\r\n $scope.appInfo.customText = data;\r\n });\r\n };\r\n\r\n //spin up the webprofile service to make sure future calls will load correctly\r\n $scope.getWebProfileMessage(1);\r\n\r\n $scope.$on('$locationChangeStart', function (event, next, current) {\r\n\r\n if ($location.path().search(/(login|SignUp|ResetPassword|SetPassword|SiteDisabled|unsubscribe)/i) > -1)\r\n return;\r\n\r\n if (angular.isUndefinedOrNullOrEmpty($scope.appInfo) ||\r\n angular.isUndefinedOrNullOrEmpty(WebUserSvc.getLoggedInWebUserToken())) {\r\n $scope.goTo('/');\r\n }\r\n\r\n $scope.checkForAppliedProfile();\r\n\r\n if (!next || !current || !$scope.appInfo.webUser) return;\r\n\r\n if (next.indexOf('AccountVerifyPayment') < 0 &&\r\n next.indexOf('MakeAPayment') < 0 &&\r\n (current && current.indexOf('/Payments/') >= 0)) {\r\n PaymentService.unLockPayments($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey);\r\n PaymentService.unlockInvoices($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey);\r\n amplify.store(\"paymentLockData\", null);\r\n }\r\n });\r\n\r\n $scope.$on('$routeChangeError', function (event, current, previous, rejection)\r\n {\r\n switch (rejection)\r\n {\r\n\r\n // Handle invalid auth token errors on route change\r\n case 'authentication:auth-token not valid':\r\n $scope.goTo('/login');\r\n $scope.notifier.show(localStrings.getLocalizedString(\"InvalidCredentials\"), 'error');\r\n break;\r\n\r\n default:\r\n // Display error message to user\r\n $scope.notifier.show('Invalid path', 'error');\r\n }\r\n });\r\n\r\n $scope.urlFormatDate = function (aDate, ignoreIe)\r\n {\r\n if (typeof(aDate) !== 'string' || aDate.isBlank()) return;\r\n\r\n var browser = BrowserService.getBrowserType();\r\n var aDate2 = new Date();\r\n if (Object.prototype.toString.call(aDate) !== '[object Date]')\r\n {\r\n aDate = aDate.substr(0, 10);\r\n aDate2 = new Date(Date.parse(aDate.replace(/-/g, \"/\").replace(/T/g, \" \")));\r\n if (isNaN(aDate2.getTime()))\r\n {\r\n aDate2 = new Date();\r\n }\r\n } else\r\n {\r\n aDate2 = aDate;\r\n }\r\n\r\n if (browser === 'ie' && !ignoreIe)\r\n return (\"0\" + (aDate2.getMonth() + 1)).slice(-2) + '/' + (\"0\" + aDate2.getDate()).slice(-2) + '/' + aDate2.getFullYear();\r\n return aDate2.getFullYear() + '-' + (\"0\" + (aDate2.getMonth() + 1)).slice(-2) + '-' + (\"0\" + aDate2.getDate()).slice(-2);\r\n };\r\n\r\n $scope.formatDate = function (aDate)\r\n {\r\n return $filter('date')(aDate, 'MM/dd/yyyy');\r\n };\r\n\r\n $scope.formatDateTime = function (aDate)\r\n {\r\n return $filter('date')(aDate, 'MM/dd/yyyy hh:mm a');\r\n };\r\n\r\n $scope.addDaysToDate = function addDays(date, days)\r\n {\r\n var result = new Date(date);\r\n result.setDate(result.getDate() + days);\r\n return result;\r\n };\r\n\r\n var successEventListener = $rootScope.$on('event:Success', function (event, data)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ChangesSaved\"), \"success\");\r\n\r\n if (data.opResults.HasWarnings)\r\n {\r\n angular.forEach(data.opResults.Warnings, function (item)\r\n {\r\n $scope.notifier.show(item, \"warning\");\r\n });\r\n }\r\n });\r\n\r\n $scope.$on('$destroy', successEventListener);\r\n\r\n var failedEventListener = $rootScope.$on('event:Failed', function (event, data)\r\n {\r\n if (data.opResults.HasErrors)\r\n {\r\n // Account lock errors go into a custom kendo notification widget\r\n var _accountLockError = localStrings.getLocalizedString(\"AccountLockError\");\r\n\r\n angular.forEach(data.opResults.Errors, function (item)\r\n {\r\n if (item === _accountLockError) {\r\n $scope.lockedAccount.show(item, \"error\");\r\n }\r\n else\r\n $scope.notifier.show(item, \"error\");\r\n });\r\n }\r\n\r\n if (data.opResults.HasWarnings)\r\n {\r\n angular.forEach(data.opResults.Warnings, function (item)\r\n {\r\n $scope.notifier.show(item, \"warning\");\r\n });\r\n }\r\n });\r\n\r\n $scope.$on('$destroy', failedEventListener);\r\n\r\n var errorEventListener = $rootScope.$on('event:Error', function (obj, data) {\r\n var errors = { ExceptionMessage: data.opResults.ExceptionMessage, Stacktrace: data.opResults.StackTrace };\r\n\r\n LoggingService.logErrors(errors).then(function(data) {\r\n console.log(\"Exception was logged please check SIEL in Enterprise Web.\");\r\n });\r\n });\r\n\r\n $scope.$on('$destroy', errorEventListener);\r\n\r\n $scope.goTo = function (path)\r\n {\r\n $location.path(path);\r\n };\r\n\r\n $scope.setFocusOnReady = function setFocusOnReady(elemID)\r\n {\r\n setTimeout(function ()\r\n {\r\n $scope.$apply(function ()\r\n {\r\n $(elemID).focus();\r\n });\r\n }, 100);\r\n };\r\n\r\n $scope.paymentsEnabled = function ()\r\n {\r\n return $scope.appInfo.webUser.CurrentWebProfile.WebPaymentsEnabled &&\r\n $scope.appInfo.webUser.CurrentAuthorization.Customer.UsesWebEFT !== '0' &&\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms > 0 &&\r\n ($scope.checkCurrentUserPermission($scope.webFunctions.AddandEditWebPaymentAccounts) ||\r\n ($scope.checkCurrentUserPermission($scope.webFunctions.AddandEditWebPayments) && $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.ActiveAccountCount > 0 ));\r\n };\r\n\r\n $scope.execOnReady = function execOnReady(func)\r\n {\r\n setTimeout(function ()\r\n {\r\n $scope.$apply(func());\r\n }, 0);\r\n };\r\n\r\n $scope.resetDirtyFlags = function resetDirtyFlags(form)\r\n {\r\n $timeout(function ()\r\n {\r\n form.$setPristine();\r\n $('.k-dirty').removeClass('k-dirty');\r\n $('.k-dirty-cell').removeClass('k-dirty-cell');\r\n }, 0);\r\n };\r\n\r\n $scope.resizeKendoGrid = function resizeKendoGrid(grid, count, offset)\r\n {\r\n var widowHeight = $(window).innerHeight() - offset;\r\n var dataHeight = count * 35;\r\n\r\n if (dataHeight > widowHeight)\r\n {\r\n grid.setOptions({\r\n height: widowHeight,\r\n scrollable: true\r\n });\r\n }\r\n else\r\n {\r\n grid.setOptions({\r\n height: 'inherit',\r\n scrollable: false\r\n });\r\n }\r\n };\r\n\r\n $scope.initializeDateSelector = function() {\r\n $scope.dateSelector = {\r\n displaySelector: true,\r\n selection: 9,\r\n startDate: '',\r\n startMin: '1/1/1900',\r\n startMax: '6/6/2079',\r\n endDate: '',\r\n endMin: '1/1/1900',\r\n endMax: '6/6/2079',\r\n numOfDays: 7,\r\n maxNumOfDays: 90,\r\n options: [\r\n { name: localDateRangeStrings.getLocalizedString(\"Today\"), value: 0 },\r\n { name: localDateRangeStrings.getLocalizedString(\"Yesterday\"), value: 1 },\r\n { name: localDateRangeStrings.getLocalizedString(\"Tomorrow\"), value: 2 },\r\n { name: localDateRangeStrings.getLocalizedString(\"ThisWeek\"), value: 3 },\r\n { name: localDateRangeStrings.getLocalizedString(\"ThisMonth\"), value: 4 },\r\n { name: localDateRangeStrings.getLocalizedString(\"ThisYear\"), value: 5 },\r\n { name: localDateRangeStrings.getLocalizedString(\"PriorWeek\"), value: 6 },\r\n { name: localDateRangeStrings.getLocalizedString(\"PriorMonth\"), value: 7 },\r\n { name: localDateRangeStrings.getLocalizedString(\"PriorYear\"), value: 8 },\r\n { name: localDateRangeStrings.getLocalizedString(\"LastSevenDays\"), value: 9 },\r\n { name: localDateRangeStrings.getLocalizedString(\"LastThirtyDays\"), value: 10 },\r\n { name: localDateRangeStrings.getLocalizedString(\"SelectDates\"), value: 11 },\r\n { name: localDateRangeStrings.getLocalizedString(\"SelectDays\"), value: 12 },\r\n { name: localDateRangeStrings.getLocalizedString(\"AllDays\"), value: 13 }\r\n ],\r\n valid: false,\r\n overrideDefaults: false,\r\n hideAllDays: false,\r\n disabled: false\r\n };\r\n\r\n $scope.dateSelectorInitialized = true;\r\n };\r\n\r\n $scope.$on('$viewContentLoaded', function () {\r\n $timeout(function () {\r\n\r\n //Build localized strings for the entire application once all localization files are rendered\r\n if (!$scope.localizationFilesInitialized) {\r\n var localizationFilesListener = $scope.$watch($('#DateSelectorLocalization innerText'), $timeout(function () {\r\n localizationFilesListener();//Destroy the $watch\r\n localizationSvc.setCachedLocalizations();\r\n $scope.localizationFilesInitialized = true;//Only initialize once\r\n }, true), 0);\r\n }\r\n\r\n // Initialize the dateselector control if it has not been initialized\r\n // From one of the other javascript files\r\n if (!$scope.dateSelectorInitialized) {\r\n $scope.initializeDateSelector();\r\n }\r\n\r\n $scope.modalifier = {\r\n display: false,\r\n title: '',\r\n text: '',\r\n showConfirm: false,\r\n closeBtnTxt: localStrings.getLocalizedString(\"Close\"),\r\n confirmBtnTxt: localStrings.getLocalizedString(\"Yes\"),\r\n show: function (title, text)\r\n {\r\n $scope.modalifier.title = title;\r\n $scope.modalifier.text = text;\r\n $scope.modalifier.showConfirm = false;\r\n $scope.modalifier.display = true;\r\n },\r\n hide: function ()\r\n {\r\n $scope.modalifier.display = false;\r\n },\r\n showSetupError: function ()\r\n {\r\n $scope.modalifier.title = localStrings.getLocalizedString(\"PageSetupError\");\r\n $scope.modalifier.text = localStrings.getLocalizedString(\"SomeDataFailedLoad\") + '
' +\r\n localStrings.getLocalizedString(\"PleaseRefresh\");\r\n $scope.modalifier.showConfirm = false;\r\n $scope.modalifier.display = true;\r\n },\r\n showSavedError: function () {\r\n $scope.modalifier.title = localStrings.getLocalizedString(\"PageSetupError\");\r\n $scope.modalifier.text = localStrings.getLocalizedString(\"DailySettlementFailed\") + '
' +\r\n localStrings.getLocalizedString(\"FuelMetersSaveFailed\");\r\n $scope.modalifier.showConfirm = false;\r\n $scope.modalifier.display = true;\r\n },\r\n showNoResults: function (page)\r\n {\r\n $scope.modalifier.title = page;\r\n $scope.modalifier.text = localStrings.getLocalizedString(\"CriteriaNoResults\");\r\n $scope.modalifier.showConfirm = false;\r\n $scope.modalifier.display = true;\r\n },\r\n confirm: function (text, fnYes, fnNo, title)\r\n {\r\n $scope.modalifier.title = title || localStrings.getLocalizedString(\"Confirm\");\r\n $scope.modalifier.closeBtnTxt = localStrings.getLocalizedString(\"No\");\r\n $scope.modalifier.confirmBtnTxt = localStrings.getLocalizedString(\"Yes\");\r\n $scope.modalifier.text = text;\r\n $scope.modalifier.confirmYes = function ()\r\n {\r\n $scope.modalifier.display = false;\r\n if (!angular.isUndefined(fnYes))\r\n fnYes();\r\n };\r\n $scope.modalifier.confirmNo = function ()\r\n {\r\n $scope.modalifier.display = false;\r\n if (!angular.isUndefined(fnNo))\r\n fnNo();\r\n };\r\n $scope.modalifier.showConfirm = true;\r\n $scope.modalifier.display = true;\r\n },\r\n confirmNo: null,\r\n confirmYes: null\r\n };\r\n }, 0);\r\n });\r\n })\r\n .directive('stringNumber', [function () {\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n link: function (scope, element, attrs, controller) {\r\n controller.$formatters.push(function (modelValue) {\r\n return Number(modelValue); /*convert to number, for going from to view*/\r\n });\r\n controller.$parsers.push(function (viewValue) {\r\n return '' + viewValue; /*convert to string, for going from view to model*/\r\n });\r\n }\r\n };\r\n }]);\r\n","/**\r\n * Created by rhampton on 2/27/2015.\r\n */\r\nangular.module(\"pnContactUs\", ['ngSanitize', 'core.objects', 'services.payments', 'core.directives'])\r\n .controller(\"ContactUs\", function ($scope, ContactUs, localizationSvc)\r\n {\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"AppLocalization\");\r\n function Message(ct, st, m)\r\n {\r\n this.ContactUsSubject = ct || 0;\r\n this.SubjectText = st || '';\r\n this.ContactUsMessage = m || '';\r\n this.CustomerContactKey = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.Key || 0;\r\n }\r\n\r\n $scope.appInfo.showContactUsModal = false;\r\n\r\n $scope.$watch('appInfo.showContactUsModal', function ()\r\n {\r\n if ($scope.appInfo.showContactUsModal)\r\n {\r\n $scope.message = new Message($scope.CommentContexts[0] ? $scope.CommentContexts[0].Key : '');\r\n $scope.getWebProfileMessage(2);\r\n }\r\n });\r\n\r\n $scope.initialize = function ()\r\n {\r\n $scope.CommentContexts = {};\r\n $scope.showErrorBox = false;\r\n\r\n ContactUs.loadContactUsContext().then(function (data)\r\n {\r\n $scope.CommentContexts = data.CommentContexts;\r\n });\r\n };\r\n\r\n $scope.$parent.sendMessage = function ()\r\n {\r\n if (!validateMessage())\r\n return;\r\n\r\n ContactUs.saveMessage($scope.message).then(\r\n function (data)\r\n {\r\n if (data.MessageSent)\r\n {\r\n $scope.appInfo.showContactUsModal = false;\r\n $scope.notifier.show(localStrings.getLocalizedString(\"MessageSent\"), 'success');\r\n }\r\n else\r\n $scope.notifier.show(localStrings.getLocalizedString(\"MessageNotSent\"), 'error');\r\n });\r\n };\r\n\r\n function validateMessage()\r\n {\r\n var valid = true;\r\n\r\n if($scope.CommentContexts.length > 0 && $scope.message.ContactUsSubject.toNumber() < 1)\r\n {\r\n valid = false;\r\n }\r\n\r\n if($scope.CommentContexts.length <= 0 && $scope.message.SubjectText.isBlank())\r\n {\r\n valid = false;\r\n }\r\n\r\n if($scope.message.ContactUsMessage.isBlank())\r\n {\r\n valid = false;\r\n }\r\n\r\n $scope.showErrorBox = !valid;\r\n return valid;\r\n }\r\n });\r\n","/**\r\n * Created by jvitoria on 1/30/2015.\r\n */\r\n\r\n//helper functions\r\nvar getAttrTextFromNodeMap = function (element, attr) {\r\n // get html element attribute by name from a NamedNodeMap\r\n return $('#' + element )[0].attributes.getNamedItem(attr).value;\r\n};\r\n\r\nangular.module(\"pnDateSelector\", ['core.objects'])\r\n .config(function ($provide, templateProvider) {\r\n $provide.constant('templates', templateProvider);\r\n })\r\n .controller(\"dateSelectorCtrl\", function ($scope)\r\n {\r\n 'use strict';\r\n })\r\n .directive('dateSelector', function (templates)\r\n {\r\n return {\r\n restrict: 'E',\r\n scope: false,\r\n controller: function ($scope, $rootScope, $filter, localizationSvc)\r\n {\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"DateSelectorLocalization\"); \r\n $scope.initDateSelector = function ()\r\n {\r\n // set defaults\r\n if (!$scope.dateSelector) {\r\n $scope.dateSelector = {};\r\n }\r\n \r\n // reset dateSelector.options based on hideAllDays flag\r\n $scope.dateSelector.options = [];\r\n if ($scope.dateSelector.hideAllDays !== true) {\r\n $scope.dateSelector.options.push(\r\n {name: localStrings.getLocalizedString(\"AllDays\"), value: 13});\r\n }\r\n $scope.dateSelector.options.push(\r\n {name: localStrings.getLocalizedString(\"Today\"), value: 0},\r\n {name: localStrings.getLocalizedString(\"Yesterday\"), value: 1},\r\n {name: localStrings.getLocalizedString(\"Tomorrow\"), value: 2},\r\n {name: localStrings.getLocalizedString(\"ThisWeek\"), value: 3},\r\n {name: localStrings.getLocalizedString(\"ThisMonth\"), value: 4},\r\n {name: localStrings.getLocalizedString(\"ThisYear\"), value: 5},\r\n {name: localStrings.getLocalizedString(\"PriorWeek\"), value: 6},\r\n {name: localStrings.getLocalizedString(\"PriorMonth\"), value: 7},\r\n {name: localStrings.getLocalizedString(\"PriorYear\"), value: 8},\r\n {name: localStrings.getLocalizedString(\"LastSevenDays\"), value: 9},\r\n {name: localStrings.getLocalizedString(\"LastThirtyDays\"), value: 10},\r\n {name: localStrings.getLocalizedString(\"SelectDates\"), value: 11},\r\n {name: localStrings.getLocalizedString(\"SelectDays\"), value: 12});\r\n\r\n $scope.dateSelector.startMin = '1/1/1900';\r\n $scope.dateSelector.startMax = '6/6/2079';\r\n $scope.dateSelector.endMin = '1/1/1900';\r\n $scope.dateSelector.endMax = '6/6/2079';\r\n $scope.dateSelector.disabled = false;\r\n $scope.dateSelector.hideAllDays = false;\r\n\r\n // override parameer data if flag is false\r\n if ($scope.dateSelector.overrideDefaults) {\r\n $scope.dateSelector.overrideDefaults = false;\r\n }\r\n else\r\n {\r\n $scope.dateSelector.displaySelector = true;\r\n $scope.dateSelector.selection = 9;\r\n $scope.dateSelector.startDate = '';\r\n $scope.dateSelector.endDate = '';\r\n $scope.dateSelector.numOfDays = 7;\r\n $scope.dateSelector.maxNumOfDays = 90;\r\n $scope.dateSelector.valid = false;\r\n }\r\n $scope.onChange();\r\n };\r\n\r\n $scope.validateStartAndEndDate = function ()\r\n {\r\n $scope.dateSelector.valid = Date.parse($scope.dateSelector.startDate) <= Date.parse($scope.dateSelector.endDate);\r\n if (!$scope.dateSelector.valid)\r\n {\r\n // (htmlElement, attribute) \r\n $scope.notifier.show(getAttrTextFromNodeMap('dateSelectorFromThru', 'pdi-date-is-greater-equal-to-msg'), 'error');\r\n }\r\n };\r\n\r\n $scope.onChange = function ()\r\n {\r\n var today = new Date();\r\n var year = new Date().getFullYear();\r\n //month is the only zero based date variable\r\n var month = new Date().getMonth();\r\n var date = new Date().getDate();\r\n var days = new Date().getDay();\r\n\r\n switch (parseInt($scope.dateSelector.selection, 10))\r\n {\r\n case 0: //today\r\n case 14: //single date selector\r\n $scope.dateSelector.startDate = $filter('date')(today, 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $scope.dateSelector.startDate;\r\n break;\r\n case 1: //yesterday\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month, date - 1), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $scope.dateSelector.startDate;\r\n break;\r\n case 2: //tomorrow\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month, date + 1), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $scope.dateSelector.startDate;\r\n break;\r\n case 3: //this week\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month, date - days), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(year, month, date - days + 6), 'MM/dd/yyyy');\r\n break;\r\n case 4: //this month\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month, 1), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(year, month + 1, 0), 'MM/dd/yyyy');\r\n break;\r\n case 5: //this year\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, 0, 1), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(year, 11, 31), 'MM/dd/yyyy');\r\n break;\r\n case 6: //previous week\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month, date - days - 7), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(year, month, date - days - 1), 'MM/dd/yyyy');\r\n break;\r\n case 7: //previous month\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month - 1, 1), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(year, month, 0), 'MM/dd/yyyy');\r\n break;\r\n case 8: //previous year\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year - 1, 0, 1), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(year - 1, 11, 31), 'MM/dd/yyyy');\r\n break;\r\n case 9: //last 7 days\r\n case 11: //select dates\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month, date - 6), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(), 'MM/dd/yyyy');\r\n break;\r\n case 10: //last 30 days\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month, date - 29), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(), 'MM/dd/yyyy');\r\n break;\r\n case 12: //select days\r\n $scope.dateSelector.numOfDays = ($scope.dateSelector.numOfDays > $scope.dateSelector.maxNumOfDays) ? $scope.dateSelector.maxNumOfDays : $scope.dateSelector.numOfDays;\r\n $scope.dateSelector.startDate = $filter('date')(new Date(year, month, date - $scope.dateSelector.numOfDays + 1), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(), 'MM/dd/yyyy');\r\n break;\r\n case 13: //all days\r\n $scope.dateSelector.startDate = $filter('date')(new Date(1900, 0, 1), 'MM/dd/yyyy');\r\n $scope.dateSelector.endDate = $filter('date')(new Date(2079, 0, 1), 'MM/dd/yyyy');\r\n break;\r\n }\r\n\r\n /*var debug = 'Date Changed
Start Date: '+ $scope.dateSelector.startDate + '
End Date: '+ $scope.dateSelector.endDate;\r\n $scope.notifier.show(debug ,'info');*/\r\n };\r\n\r\n },\r\n templateUrl: templates.getTemplate(\"DateSelector\")\r\n };\r\n });","/**\r\n * Created by rhampton on 1/29/2015.\r\n */\r\nangular.module(\"pnDocuments\", ['ngSanitize', 'core.objects', 'services.payments', 'core.directives'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider.when(\"/Dyn/:header/Home\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Dyn\"),\r\n controller: \"DocumentCtrl\"\r\n }\r\n )\r\n .when(\"/Dyn/:header/:sub/Home\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Dyn\"),\r\n controller: \"DocumentCtrl\"\r\n }\r\n )\r\n .when(\"/Dyn/:header/:sub/:side\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Dyn\"),\r\n controller: \"DocumentBodyCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"DocumentsLocalization\");\r\n }\r\n }\r\n }\r\n );\r\n })\r\n .controller(\"DocumentSideMenuCtrl\", function ($scope, $http, $q, $routeParams, $anchorScroll, $filter)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.locationInfo.sideMenuData.subMenu || $scope.locationInfo.sideMenuData.subMenu.length === 0)\r\n {\r\n var menu = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.HeaderMenu, {Name: $routeParams.header})[0];\r\n if (menu)\r\n {\r\n $scope.locationInfo.menuLocation = menu.Key;\r\n }\r\n var subMenu = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SubMenu, {\r\n ParentKey: $scope.locationInfo.menuLocation,\r\n Name: $routeParams.sub\r\n })[0];\r\n if (subMenu)\r\n {\r\n $scope.locationInfo.subMenuLocation = subMenu.Key;\r\n }\r\n var sideMenu = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SideMenu, {\r\n ParentKey: $scope.locationInfo.subMenuLocation,\r\n Name: $routeParams.side\r\n })[0];\r\n if (sideMenu)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = sideMenu.Key;\r\n }\r\n }\r\n };\r\n\r\n $scope.setSiteMenuLocation = function (val)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = val;\r\n };\r\n })\r\n .controller(\"DocumentCtrl\", function ($scope, $http, $q, $routeParams, $anchorScroll, $filter, templates)\r\n {\r\n 'use strict';\r\n $scope.locationInfo.menuObject = {};\r\n $scope.locationInfo.subMenuObject = {};\r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.sideMenu = '';\r\n $scope.locationInfo.menuText = $routeParams.header;\r\n $scope.locationInfo.subMenuText = $routeParams.sub;\r\n var subMenu = {};\r\n if (!$scope.locationInfo.subMenuText)\r\n {\r\n subMenu = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SubMenu, {ParentKey: $scope.locationInfo.menuLocation})[0];\r\n if (subMenu)\r\n {\r\n $scope.locationInfo.subMenuText = subMenu.Name;\r\n $scope.locationInfo.subMenuLocation = subMenu.Key;\r\n }\r\n } else\r\n {\r\n subMenu = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SubMenu, {\r\n ParentKey: $scope.locationInfo.menuLocation,\r\n Name: $scope.locationInfo.subMenuText\r\n })[0];\r\n if (subMenu)\r\n {\r\n $scope.locationInfo.subMenuLocation = subMenu.Key;\r\n }\r\n\r\n }\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"DocumentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.subMenu || $scope.locationInfo.sideMenuData.subMenu.length === 0)\r\n {\r\n var sideMenu = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SideMenu, {ParentKey: $scope.locationInfo.subMenuLocation})[0];\r\n if (!sideMenu)\r\n {\r\n $scope.goTo('Documents/Account/Statements');\r\n }\r\n\r\n if (sideMenu)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = sideMenu.Key;\r\n $scope.goTo(\"/Dyn/\" + $routeParams.header + \"/\" + $scope.locationInfo.subMenuText + \"/\" + sideMenu.Name);\r\n }\r\n }\r\n\r\n $scope.name = 'document';\r\n };\r\n })\r\n .controller(\"DocumentBodyCtrl\", function ($scope, $http, $q, $routeParams, $anchorScroll, $filter, documentService, templates, localStrings)\r\n {\r\n 'use strict';\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.documentsGrid = {};\r\n $scope.kendo.documentsGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var dataItem = this.dataItem(this.select()[0]);\r\n if (!dataItem.Guid)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"Documents\"), localStrings.getLocalizedString(\"SelectedDocumentNoLonger\"));\r\n return;\r\n }\r\n else\r\n $scope.openAttachment(dataItem.Guid);\r\n\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"RefDateFormatted\",\r\n title: localStrings.getLocalizedString(\"ReferenceDate\"),\r\n width: 100,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"RefNo\",\r\n title: localStrings.getLocalizedString(\"ReferenceNo\"),\r\n width: 150,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Description\",\r\n title: localStrings.getLocalizedString(\"Description\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.documentsGridInit = function (ds)\r\n {\r\n $scope.kendo.documentsGridDS = new kendo.data.DataSource({\r\n data: ds\r\n });\r\n\r\n $scope.kendo.documentsGridDS.read();\r\n $scope.kendo.documentsGrid.dataSource.data($scope.kendo.documentsGridDS.data());\r\n };\r\n\r\n function getDocuments(ref, desc, start, end, custKey, docType, contKey)\r\n {\r\n documentService.listDocuments(ref, desc, start, end, custKey, docType, contKey).then(function (data)\r\n {\r\n if (data.length === 0)\r\n {\r\n $scope.modalifier.showNoResults($scope.locationInfo.documents.name);\r\n return;\r\n }\r\n\r\n angular.forEach(data, function (element)\r\n {\r\n element.RefDateFormatted = element.RefDate === \"0001-01-01T00:00:00\" ? null : $filter('date')(element.RefDate, 'MM/dd/yyyy');\r\n });\r\n\r\n $scope.kendo.documentsGridInit(data);\r\n });\r\n }\r\n\r\n $scope.initialize = function ()\r\n {\r\n $scope.checkForAppliedProfile();\r\n\r\n //required to rebuild dymanic sub and side menus in case of user pressing refresh.\r\n if($scope.locationInfo.menuLocation === 0)\r\n {\r\n $scope.goTo('Documents/Account/Statements');\r\n }\r\n\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"DocumentSideMenu\");\r\n\r\n $scope.locationInfo.menuText = $routeParams.header;\r\n $scope.locationInfo.subMenuText = $routeParams.sub;\r\n if (!$scope.locationInfo.documents) $scope.locationInfo.documents = {};\r\n $scope.locationInfo.documents.minDate = new Date(1990, 0, 1);\r\n $scope.locationInfo.documents.name = $routeParams.side;\r\n\r\n //auto load non-transaction document types\r\n var thisMenu = $scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SideMenu.find({Name:$scope.locationInfo.documents.name});\r\n if(thisMenu && thisMenu.SourceType === 0)\r\n {\r\n getDocuments(\r\n '',\r\n '',\r\n '01/01/1900',\r\n '06/01/2075',\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.CustKey,\r\n thisMenu.SourceKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey\r\n );\r\n }\r\n\r\n };\r\n\r\n $scope.$parent.applyAction = function (documentType)\r\n {\r\n getDocuments($scope.locationInfo.sideMenuData.documents.referenceNumber,\r\n $scope.locationInfo.sideMenuData.documents.description,\r\n $scope.dateSelector.startDate,\r\n $scope.dateSelector.endDate,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.CustKey,\r\n documentType,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey\r\n );\r\n };\r\n })\r\n .controller(\"SectionSideMenuCtrl\", function ($scope)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.documents) $scope.locationInfo.sideMenuData.documents = {};\r\n $scope.locationInfo.sideMenuData.documents.referenceNumber = '';\r\n $scope.locationInfo.sideMenuData.documents.description = '';\r\n };\r\n });","/**\r\n * Created by rhampton on 3/11/14.\r\n */\r\nangular.module('pnHome', ['core.ajax', 'ngSanitize'])\r\n .config(['$routeProvider', function ($routeProvider) {\r\n var originalWhen = $routeProvider.when;\r\n var globalResolves = {\r\n webUser: function (WebUserSvc, WebProfileService) {\r\n return WebUserSvc.resolveWebUser().then(function () {\r\n var _user = WebUserSvc.getWebUser();\r\n if (!angular.isUndefinedOrNullOrEmpty(_user) &&\r\n !angular.isUndefinedOrNullOrEmpty(_user.CurrentWebProfile)) {\r\n WebProfileService.setProfileColor(_user.CurrentWebProfile.PrimaryColor);\r\n }\r\n return _user;\r\n });\r\n }\r\n };\r\n $routeProvider.when = function (path, route) {\r\n route.resolve = route.resolve || (route.resolve = {});\r\n angular.extend(route.resolve, globalResolves);\r\n return originalWhen.call($routeProvider, path, route);\r\n };\r\n }])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider.when(\"/Home\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Home\"),\r\n controller: \"homeCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"HomeLocalization\");\r\n }\r\n }\r\n }\r\n );\r\n })\r\n .controller('homeCtrl', function ($scope, $rootScope, ajax, $q, homeService, localStrings, $location, globalizationSvc)\r\n {\r\n 'use strict';\r\n $scope.locationInfo.menuLocation = 0;\r\n $scope.locationInfo.subMenuLocation = -1;\r\n $scope.locationInfo.sideMenu = '';\r\n $scope.modalInfo = {};\r\n $scope.curArticle = 0;\r\n $scope.checkForAppliedProfile();\r\n\r\n //Remove the impersonation GUID from the URL - we no longer need it once we get to Home\r\n $location.search('impersonationGuid', null);\r\n\r\n $scope.toggleModal = function (modalHeader, modalContent)\r\n {\r\n $scope.modalInfo.header = modalHeader;\r\n $scope.modalInfo.content = modalContent;\r\n $scope.modalInfo.shown = !$scope.modalInfo.shown;\r\n };\r\n\r\n $scope.updatePageInfo = function ()\r\n {\r\n if ($scope.appInfo.webUser && $scope.appInfo.webUser.CurrentAuthorization) {\r\n homeService.loadHomePageInformation($scope.appInfo.webUser.CurrentAuthorization.CustContKey).then(function (data)\r\n {\r\n $scope.PageInfo = data;\r\n $scope.formatArticles();\r\n $scope.formatCurrencies();\r\n });\r\n }\r\n else\r\n $scope.logout();\r\n };\r\n\r\n var accountChangeListener = $rootScope.$on('event:AccountChange', function (event, data)\r\n {\r\n $scope.updatePageInfo();\r\n });\r\n\r\n $scope.$on('$destroy', accountChangeListener);\r\n\r\n $scope.updatePageInfo();\r\n\r\n $scope.showLastCreditNotification = function (item)\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty(item) || angular.isUndefinedOrNullOrEmpty(item.DispType))\r\n return;\r\n\r\n switch ($scope.PageInfo.HomeInfo.LastCreditNotification.DispType) {\r\n case 0:\r\n $scope.emailPopUp = item;\r\n $scope.emailPopUp.show = true;\r\n break;\r\n\r\n case 1:\r\n case 2:\r\n if (item.EdocDtlKey > 0) $scope.openEdoc(item.EdocDtlKey);\r\n else\r\n scope.notifier.show(localStrings.getLocalizedString(\"DocumentNotRetrieved\"), 'error');\r\n break;\r\n\r\n case 3:\r\n if (item.AttachGUID !== null) $scope.openAttachment(item.AttachGUID);\r\n else\r\n scope.notifier.show(localStrings.getLocalizedString(\"AttachmentNotRetrieved\"), 'error');\r\n break;\r\n }\r\n\r\n };\r\n\r\n $scope.showAccountSummary = function ()\r\n {\r\n if ($scope.checkCurrentUserPermission($scope.webFunctions.ViewCreditInformation))\r\n return true;\r\n\r\n if (($scope.PageInfo.HomeInfo.DisplayPastDueMsgAt > 0 && ($scope.PageInfo.HomeInfo.Customer.CrStatus === 1 ||\r\n $scope.PageInfo.HomeInfo.Customer.CrStatus === 6 || $scope.PageInfo.HomeInfo.Customer.CrStatus === 7 ||\r\n $scope.PageInfo.HomeInfo.Customer.CrStatus === 8 || $scope.PageInfo.HomeInfo.Customer.CrStatus === 9)))\r\n return true;\r\n\r\n return ($scope.checkCurrentUserPermission($scope.webFunctions.AddandEditWebPaymentAccounts) && $scope.PageInfo.HomeInfo.AccountNeedingVerificationv);\r\n };\r\n\r\n $scope.showRecentActivity = function ()\r\n {\r\n if (!$scope.PageInfo) return false;\r\n if (!$scope.PageInfo.HomeInfo) return false;\r\n var homeInfo = $scope.PageInfo.HomeInfo;\r\n\r\n if (homeInfo.ScheduledPayment && homeInfo.ScheduledPayment.Amount > 0) return true;\r\n if (homeInfo.PendingEft && homeInfo.PendingEft.Amount > 0) return true;\r\n if (homeInfo.PostedEft && homeInfo.PostedEft.Amount > 0) return true;\r\n if (homeInfo.LastInvoice && homeInfo.LastInvoice.Amount > 0) return true;\r\n if (homeInfo.CustomerActivity && homeInfo.CustomerActivity.LastRcptAmt > 0) return true;\r\n if (homeInfo.CustomerActivity && homeInfo.CustomerActivity.LastStmtAmt > 0) return true;\r\n if (homeInfo.CustomerPriceNotice && homeInfo.CustomerPriceNotice.EdocDetails && homeInfo.CustomerPriceNotice.EdocDetails.DtlKey > 0) return true;\r\n if (homeInfo.LastCreditNotification && homeInfo.LastCreditNotification.DispType > 0) return true;\r\n return false;\r\n };\r\n\r\n $scope.getArticle = function (dir)\r\n {\r\n switch (dir) {\r\n case 'p':\r\n --$scope.curArticle;\r\n if ($scope.curArticle < 0)\r\n $scope.curArticle = $scope.PageInfo.HomeInfo.Announcements.length - 1;\r\n break;\r\n case 'n':\r\n ++$scope.curArticle;\r\n if ($scope.curArticle === $scope.PageInfo.HomeInfo.Announcements.length)\r\n $scope.curArticle = 0;\r\n break;\r\n }\r\n };\r\n\r\n $scope.formatArticles = function ()\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty($scope.PageInfo.HomeInfo) || angular.isUndefinedOrNullOrEmpty($scope.PageInfo.HomeInfo.Announcements))\r\n return;\r\n\r\n angular.forEach($scope.PageInfo.HomeInfo.Announcements, function (item)\r\n {\r\n item.Text = item.Text.trim().unescapeHTML().replace(/ /gi, ' ');\r\n });\r\n\r\n };\r\n\r\n // Format all of the currency fields on the home page to whatever the browser locale is\r\n $scope.formatCurrencies = function ()\r\n {\r\n var homeInfo = $scope.PageInfo.HomeInfo;\r\n \r\n var lastInv = homeInfo.LastInvoice.Amount;\r\n var lastStmt = homeInfo.CustomerActivity.LastStmtAmt*-1;\r\n var lastEft = homeInfo.PostedEft.Amount;\r\n var lastPmnt = homeInfo.CustomerActivity.LastRcptAmt;\r\n var pendEft = homeInfo.PendingEft.Amount;\r\n var nextSchPmnt = homeInfo.ScheduledPayment.Amount;\r\n var acctBalance = homeInfo.Customer.AccountBalance;\r\n var unbilledActivity = homeInfo.Customer.UnshippedBalance;\r\n var creditLimit = homeInfo.Customer.CrLimitTotal;\r\n var availableCred = homeInfo.Customer.AvailableCredit;\r\n\r\n homeInfo.LastInvoice.AmountDisplay = globalizationSvc.formatCurrency(lastInv);\r\n homeInfo.CustomerActivity.LastStmtAmtDisplay = globalizationSvc.formatCurrency(lastStmt);\r\n homeInfo.PostedEft.AmountDisplay = globalizationSvc.formatCurrency(lastEft);\r\n homeInfo.CustomerActivity.LastRcptAmtDisplay = globalizationSvc.formatCurrency(lastPmnt);\r\n homeInfo.PendingEft.AmountDisplay = globalizationSvc.formatCurrency(pendEft);\r\n homeInfo.ScheduledPayment.AmountDisplay = globalizationSvc.formatCurrency(nextSchPmnt);\r\n homeInfo.Customer.AccountBalanceDisplay = globalizationSvc.formatCurrency(acctBalance);\r\n homeInfo.Customer.UnshippedBalanceDisplay = globalizationSvc.formatCurrency(unbilledActivity);\r\n homeInfo.Customer.CrLimitTotalDisplay = globalizationSvc.formatCurrency(creditLimit);\r\n homeInfo.Customer.AvailableCreditDisplay = globalizationSvc.formatCurrency(availableCred);\r\n };\r\n });","/**\r\n * Created by rhampton on 5/27/2014.\r\n */\r\nangular.module(\"pnLogin\", [\r\n 'ngRoute',\r\n 'core.enums',\r\n 'core.security'\r\n])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider\r\n .when(\"/SignUp/:request?\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"SignUp\"),\r\n controller: \"signupCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"LoginLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/ResetPassword/:request?\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ResetPassword\"),\r\n controller: \"resetPasswordCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"LoginLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/SetPassword/:key\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"GetPasswordTemplate\"),\r\n controller: \"setNewPasswordCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"LoginLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/unsubscribe/:cont?\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Unsubscribe\"),\r\n controller: \"unsubscribeCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"LoginLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/SiteDisabled\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"SiteDisabled\"),\r\n controller: \"siteDisabledCtrl\"\r\n });\r\n })\r\n .controller(\"loginCtrl\", function loginCtrl($scope, $http, $q, $rootScope, $timeout, Authentication, WebUserSvc, WebProfileService, validatorSvc, constantLists, $routeParams, $location, localStrings)\r\n {\r\n 'use strict';\r\n $scope.logout();\r\n $scope.showLogin = false;\r\n $scope.showProfileSelector = false;\r\n $scope.showForgotPassword = false;\r\n\r\n $scope.initializeLogin = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n\r\n $scope.applySystemSettings();\r\n $scope.showLogin = true;\r\n\r\n if ($routeParams.impersonationGuid) {\r\n $rootScope.loginInfo.impersonationAccessGuid = $routeParams.impersonationGuid;\r\n $rootScope.loginInfo.userIsImpersonated = true;\r\n $rootScope.automatedLogin = true;\r\n }\r\n\r\n $scope.getRememberMe();\r\n };\r\n\r\n $scope.checkForAutomatedLogin = function () {\r\n if ($rootScope.automatedLogin) {\r\n $scope.loginInfo.userId = $rootScope.automatedLogin.userId || \"\";\r\n $scope.loginInfo.password = $rootScope.automatedLogin.password || \"\";\r\n $scope.authenticateUser();\r\n $rootScope.automatedLogin = undefined;\r\n }\r\n };\r\n\r\n $scope.authenticateUser = function ()\r\n {\r\n // Omit automated logins from triggering empty password / userid validations on elements\r\n if (!$rootScope.automatedLogin && !validatorSvc.executeValidations())\r\n return;\r\n\r\n $scope.error = \"\";\r\n $rootScope.passwordExpired = {};\r\n $rootScope.passwordDays = {};\r\n $scope.setRememberMe();\r\n\r\n // Reset the locked account display\r\n $scope.lockedAccount.hide();\r\n\r\n // Attempt to log the user in\r\n Authentication.login($scope.loginInfo.userId, $scope.loginInfo.password, $rootScope.loginInfo.impersonationAccessGuid).then(function (data)\r\n {\r\n // Store the token via LocalStorage (more secure than normal cookies)\r\n var user = data;\r\n var token = user.Token;\r\n amplify.store('pnuser-token', token, { expires: $rootScope.timeout });\r\n\r\n WebUserSvc.validatePasswordComplexity(user.Key, $scope.loginInfo.password, true).then(function (errorList) {\r\n if (errorList.length > 0)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"PasswordComplexityEnforced\"), 'error');\r\n return;\r\n }\r\n else\r\n {\r\n $scope.retrieveWebUser(user.Key);\r\n }\r\n });\r\n\r\n }, function (err)\r\n {\r\n $scope.error = err;\r\n });\r\n };\r\n\r\n $scope.retrieveWebUser = function (webUserKey)\r\n {\r\n if (Authentication.isAuthenticated())\r\n {\r\n WebUserSvc.retrieveWebUser(webUserKey).then(function (data)\r\n {\r\n data.Answer2 = data.Answer;\r\n $scope.appInfo.webUser = data;\r\n\r\n var _webProfileCount = $scope.appInfo.webUser.WebProfiles.length;\r\n if (_webProfileCount === 0) {\r\n $scope.showLogin = true;\r\n $scope.modalifier.show(\r\n localStrings.getLocalizedString(\"LogIn\"),\r\n localStrings.getLocalizedString(\"NoWebProfile\"));\r\n return;\r\n }\r\n\r\n if (_webProfileCount > 1) {\r\n $scope.showLogin = false;\r\n $scope.showProfileSelector = true;\r\n $scope.appInfo.profileKey = $scope.appInfo.webUser.WebProfiles[0].Key;\r\n return;\r\n }\r\n\r\n if ( _webProfileCount === 1 ) {\r\n $scope.appInfo.profileKey = $scope.appInfo.webUser.WebProfiles[0].Key;\r\n $scope.loadSelectedProfile();\r\n } \r\n return;\r\n });\r\n }\r\n };\r\n\r\n $scope.loadSelectedProfile = function ()\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty($scope.appInfo.profileKey) || $scope.appInfo.profileKey < 0) {\r\n $scope.appInfo.profileKey = WebUserSvc.getWebUserProfile();\r\n }\r\n\r\n WebUserSvc.retrieveSelectedProfile($scope.appInfo.webUser.Id, $scope.appInfo.profileKey).then(function (data)\r\n {\r\n amplify.store('pnAuthIndex', WebUserSvc.getCurrentAuthorization() || 0);\r\n amplify.store('pnWebProfile', $scope.appInfo.profileKey);\r\n $scope.applySelectedProfile();\r\n $scope.goTo('/Home');\r\n });\r\n };\r\n\r\n $scope.showForgotMyPassword = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n validatorSvc.addScopeToValidate($scope);\r\n\r\n $scope.showLogin = !$scope.showLogin;\r\n $scope.showForgotPassword = !$scope.showForgotPassword;\r\n };\r\n\r\n $scope.submitForgotMyPassword = function ()\r\n {\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n WebUserSvc.processForgotMyPassword($scope.loginInfo.userId).then(function (data)\r\n {\r\n if (data.Success)\r\n $scope.notifier.show(localStrings.getLocalizedString(\"RequestBeingProcessed\"), 'success');\r\n else\r\n $scope.notifier.show(localStrings.getLocalizedString(\"RequestNotProcessed\"), 'error');\r\n });\r\n $scope.showForgotMyPassword();\r\n };\r\n\r\n $scope.setRememberMe = function ()\r\n {\r\n if ($scope.loginInfo.rememberMe)\r\n amplify.store('pnLoginEmail', $rootScope.loginInfo.userId);\r\n else\r\n amplify.store('pnLoginEmail', null);\r\n };\r\n\r\n $scope.getRememberMe = function ()\r\n {\r\n var result = amplify.store('pnLoginEmail');\r\n if (angular.isUndefinedOrNullOrEmpty(result))\r\n {\r\n $rootScope.loginInfo.userId = '';\r\n $rootScope.loginInfo.rememberMe = false;\r\n }\r\n else\r\n {\r\n $rootScope.loginInfo.userId = result;\r\n $rootScope.loginInfo.rememberMe = true;\r\n }\r\n };\r\n })\r\n .controller(\"signupCtrl\", function ($scope, $rootScope, $routeParams, WebUserSvc, validatorSvc, constantLists, localStrings)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n\r\n //grab the branding information for the site\r\n $scope.applySystemSettings();\r\n\r\n $scope.signup = {\r\n displayControls: false,\r\n webUser: {\r\n Timestamp: '',\r\n Answer: '',\r\n AnswerClear: '',\r\n GUID: '',\r\n Id: '',\r\n Key: '',\r\n Password: '',\r\n PasswordClear: '',\r\n Question: '',\r\n QuestionClear: '',\r\n Reset: '',\r\n Validated: ''\r\n },\r\n error: [],\r\n controls: {\r\n password: '',\r\n confirmPassword: '',\r\n question: '',\r\n answer: '',\r\n confirmAnswer: '',\r\n valid: true,\r\n secretQuestions: constantLists.secretQuestions\r\n }\r\n };\r\n\r\n $scope.kendo = {instance: null};\r\n\r\n $scope.getWebUser();\r\n };\r\n\r\n $scope.getWebUser = function ()\r\n {\r\n if ($routeParams.request)\r\n {\r\n $scope.signup.webUser.GUID = $routeParams.request;\r\n WebUserSvc.getWebUserForSignup($scope.signup.webUser).then(\r\n function (data)\r\n {\r\n if (!angular.isUndefinedOrNullOrEmpty(data.Id))\r\n {\r\n $scope.signup.webUser = data;\r\n $scope.signup.displayControls = true;\r\n return;\r\n }\r\n else\r\n {\r\n $scope.signup.displayControls = false;\r\n $scope.notifier.show(localStrings.getLocalizedString(\"InvalidRequestContact\"), 'error');\r\n $scope.goTo('/');\r\n }\r\n }\r\n );\r\n }\r\n else\r\n {\r\n $scope.GUID = 0;\r\n $scope.notifier.show(localStrings.getLocalizedString(\"URLInvalid\"), \"error\");\r\n $scope.goTo('/');\r\n }\r\n };\r\n\r\n $scope.sendWebUser = function ()\r\n {\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n $scope.signup.webUser.PasswordClear = $scope.signup.controls.password;\r\n $scope.signup.webUser.QuestionClear = $scope.signup.controls.question;\r\n $scope.signup.webUser.AnswerClear = $scope.signup.controls.answer;\r\n\r\n WebUserSvc.signupWebUser($scope.signup.webUser).then(\r\n function (data)\r\n {\r\n if (data.Validated === true)\r\n {\r\n $rootScope.automatedLogin = {userId: data.Id, password: $scope.signup.controls.password};\r\n $scope.goTo(\"/\");\r\n }\r\n },\r\n function (err)\r\n {\r\n $scope.signup.errors = [];\r\n\r\n angular.forEach(err, function (item)\r\n {\r\n $scope.notifier.show(item, 'error');\r\n });\r\n }\r\n );\r\n\r\n };\r\n\r\n $scope.clearErrors = function ()\r\n {\r\n validatorSvc.clearAllValidations();\r\n };\r\n })\r\n .controller(\"resetPasswordCtrl\", function ($scope, $rootScope, $routeParams, WebUserSvc, validatorSvc, localStrings)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n\r\n //grab the branding information for the site\r\n $scope.applySystemSettings();\r\n\r\n $scope.resetPassword = {\r\n displayTitle: '',\r\n displayQuestion: false,\r\n displayPassword: false,\r\n displayButton: false,\r\n webUser: {\r\n Timestamp: '',\r\n Answer: '',\r\n AnswerClear: '',\r\n GUID: '',\r\n Id: '',\r\n Key: '',\r\n Password: '',\r\n PasswordClear: '',\r\n Question: '',\r\n QuestionClear: '',\r\n Reset: '',\r\n Validated: ''\r\n },\r\n error: [],\r\n controls: {\r\n password: '',\r\n confirmPassword: '',\r\n answer: '',\r\n valid: true,\r\n buttonText: 'Submit'\r\n }\r\n };\r\n\r\n $scope.getWebUser();\r\n };\r\n\r\n $scope.getWebUser = function ()\r\n {\r\n if ($routeParams.request)\r\n {\r\n $scope.resetPassword.webUser.GUID = $routeParams.request;\r\n WebUserSvc.getWebUserForPasswordReset($scope.resetPassword.webUser).then(\r\n function (data)\r\n {\r\n if (!angular.isUndefinedOrNullOrEmpty(data.Id))\r\n {\r\n $scope.resetPassword.webUser = data;\r\n $scope.resetPassword.displayTitle = localStrings.getLocalizedString(\"AnswerSecurityQuestion\");\r\n if ($rootScope.passwordExpired === true)\r\n {\r\n $scope.resetPassword.displayTitle = localStrings.getLocalizedString(\"PasswordExpired\") + '
' + $scope.resetPassword.displayTitle;\r\n }\r\n $scope.resetPassword.displayQuestion = true;\r\n $scope.resetPassword.displayButton = true;\r\n }\r\n else\r\n {\r\n $scope.resetPassword.displayQuestion = false;\r\n $scope.resetPassword.displayPassword = false;\r\n $scope.resetPassword.displayButton = false;\r\n $scope.resetPassword.displayTitle = localStrings.getLocalizedString(\"InvalidRequest\");\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ContactAdmin\"), \"error\");\r\n $scope.goTo('/');\r\n }\r\n }\r\n );\r\n }\r\n else\r\n {\r\n $scope.GUID = 0;\r\n $scope.notifier.show(localStrings.getLocalizedString(\"URLInvalid\"), \"error\");\r\n $scope.goTo('/');\r\n }\r\n };\r\n\r\n $scope.sendAnswer = function ()\r\n {\r\n $scope.resetPassword.webUser.AnswerClear = $scope.resetPassword.controls.answer;\r\n WebUserSvc.verifyWebUserSecretQuestionAnswer($scope.resetPassword.webUser).then(\r\n function (data)\r\n {\r\n if (data === 1)\r\n {\r\n $scope.resetPassword.displayQuestion = false;\r\n $scope.resetPassword.displayTitle = localStrings.getLocalizedString(\"EnterConfirmNewPassword\");\r\n $scope.resetPassword.controls.buttonText = localStrings.getLocalizedString(\"SaveAndLogin\");\r\n $scope.resetPassword.displayPassword = true;\r\n }\r\n else\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"AnswerNotCorrect\"), \"error\");\r\n }\r\n },\r\n function (err)\r\n {\r\n }\r\n );\r\n\r\n };\r\n\r\n $scope.setNewPassword = function ()\r\n {\r\n $scope.resetPassword.webUser.PasswordClear = $scope.resetPassword.controls.password;\r\n WebUserSvc.resetWebUserPassword($scope.resetPassword.webUser).then(\r\n function (data)\r\n {\r\n if (data.Validated === true)\r\n {\r\n $rootScope.automatedLogin = {userId: data.Id, password: $scope.resetPassword.controls.password};\r\n $scope.goTo(\"/\");\r\n }\r\n },\r\n function (err)\r\n {\r\n $scope.resetPassword.errors = [];\r\n\r\n angular.forEach(err, function (item)\r\n {\r\n $scope.notifier.show(item, \"error\");\r\n });\r\n }\r\n );\r\n };\r\n\r\n $scope.submitInfo = function ()\r\n {\r\n $scope.resetPassword.error = [];\r\n\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n if ($scope.resetPassword.displayQuestion)\r\n {\r\n $scope.sendAnswer();\r\n }\r\n\r\n if ($scope.resetPassword.displayPassword)\r\n {\r\n $scope.setNewPassword();\r\n }\r\n };\r\n\r\n $scope.clearErrors = function ()\r\n {\r\n validatorSvc.clearAllValidations();\r\n };\r\n })\r\n .controller(\"setNewPasswordCtrl\", function ($scope, $rootScope, $routeParams, WebUserSvc, validatorSvc, WebProfileService, localStrings)\r\n {\r\n 'use strict';\r\n $scope.webUserKey = -1;\r\n $scope.webUserToUpdate = {};\r\n\r\n $scope.initialize = function ()\r\n {\r\n var profileKey = ($scope.appInfo && $scope.appInfo.profileKey) ? $scope.appInfo.profileKey : 0;\r\n\r\n WebProfileService.getWebProfileMessage(profileKey, 27).then(function (data)\r\n {\r\n $scope.customMessage = data.isBlank() ? localStrings.getLocalizedString(\"PasswordExpiredNew\") : data;\r\n });\r\n\r\n if ($routeParams.key)\r\n {\r\n $scope.webUserToUpdate = {\r\n Timestamp: '',\r\n Answer: '',\r\n AnswerClear: '',\r\n GUID: '',\r\n Id: '',\r\n Key: $routeParams.key,\r\n Password: '',\r\n PasswordClear: '',\r\n Question: '',\r\n QuestionClear: '',\r\n Reset: '',\r\n Validated: ''\r\n };\r\n }\r\n\r\n validatorSvc.clearValidationScopes();\r\n\r\n };\r\n\r\n $scope.submitPassword = function ()\r\n {\r\n //$scope.resetPassword.error = [];\r\n\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n $scope.setNewPassword();\r\n };\r\n\r\n $scope.setNewPassword = function ()\r\n {\r\n $scope.webUserToUpdate.OldPassword = $scope.appInfo.pageInfo.controls.oldPassword;\r\n $scope.webUserToUpdate.PasswordClear = $scope.appInfo.pageInfo.controls.password;\r\n\r\n WebUserSvc.resetWebUserPassword($scope.webUserToUpdate).then(\r\n function (data)\r\n {\r\n $scope.appInfo.pageInfo.success = true;\r\n if (data.Validated === true)\r\n {\r\n $rootScope.automatedLogin = {userId: data.Id, password: $scope.webUserToUpdate.PasswordClear};\r\n $scope.goTo(\"/\");\r\n }\r\n },\r\n function (err)\r\n {\r\n angular.forEach(err, function (item)\r\n {\r\n $scope.notifier.show(item, \"error\");\r\n });\r\n }\r\n );\r\n };\r\n\r\n $scope.clearErrors = function ()\r\n {\r\n validatorSvc.clearAllValidations();\r\n };\r\n })\r\n .controller(\"unsubscribeCtrl\", function ($scope, $routeParams, validatorSvc, userAccountService, localStrings)\r\n {\r\n 'use strict';\r\n\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n\r\n //apply the branding information for the site\r\n $scope.applySystemSettings();\r\n\r\n $scope.resultMessage = localStrings.getLocalizedString(\"UnsubscribeRequest\");\r\n\r\n if ($routeParams.cont)\r\n {\r\n userAccountService.unsubscribeContact($routeParams.cont).then(\r\n function (data)\r\n {\r\n if (data.Successful && !data.Unsubscibed)\r\n {\r\n $scope.resultMessage = localStrings.getLocalizedString(\"UnsubscribeSuccessful\");\r\n }\r\n else\r\n {\r\n $scope.resultMessage = localStrings.getLocalizedString(\"UnsubscribeNotSuccessful\");\r\n }\r\n },\r\n function (data) //http request failed\r\n {\r\n $scope.resultMessage = localStrings.getLocalizedString(\"UnsubscribeNotSuccessful\");\r\n });\r\n }\r\n else\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"InvalidRequestContact\"), 'error');\r\n $scope.goTo('/Home');\r\n }\r\n };\r\n })\r\n .controller(\"siteDisabledCtrl\", function siteDisabledCtrl($scope, $window)\r\n {\r\n 'use strict';\r\n\r\n $scope.initializePage = function ()\r\n {\r\n $scope.applySystemSettingsSiteDisabled();\r\n };\r\n });","/**\r\n * Created by rhampton on 4/25/2014.\r\n */\r\nangular.module('pnHeader', ['core.enums'])\r\n .controller(\"headerMenuCtrl\", function ($scope, $rootScope, WebUserSvc, $filter, $timeout, PaymentService)\r\n {\r\n 'use strict';\r\n $scope.showAccounts = false;\r\n $scope.showUserOpt = false;\r\n $scope.locationInfo.menuLocation = $scope.locationInfo.menuLocation || 0;\r\n $scope.locationInfo.subMenuLocation = $scope.locationInfo.subMenuLocation || -1;\r\n\r\n $scope.setMenuLocation = function (menuLocation)\r\n {\r\n $scope.locationInfo.menuLocation = menuLocation;\r\n $scope.locationInfo.subMenuLocation = -1;\r\n };\r\n $scope.setSubMenuLocation = function (subMenuLocation)\r\n {\r\n $scope.locationInfo.subMenuLocation = subMenuLocation;\r\n };\r\n $scope.checkUserMenuSecurity = function (securityGroup)\r\n {\r\n $scope.checkForAppliedProfile();\r\n if (!$scope.appInfo.webUser) return false;\r\n if (!$scope.appInfo.webUser.CurrentAuthorization) return false;\r\n if ($scope.appInfo.webUser.CurrentAuthorization)\r\n {\r\n return $scope.checkCurrentUserPermissions(securityGroup);\r\n }\r\n return false;\r\n };\r\n $scope.setNewCurrentAuthorization = function (index)\r\n {\r\n let previousIndex = $scope.appInfo.authorizationIndex;\r\n let previousAuthorization = $scope.appInfo.webUser.WebAuthorizations[previousIndex];\r\n $scope.appInfo.authorizationIndex = index;\r\n amplify.store('pnAuthIndex', $scope.appInfo.authorizationIndex);\r\n $scope.showAccounts = false;\r\n\r\n WebUserSvc.retrieveSelectedProfile($scope.appInfo.webUser.Id, $scope.appInfo.profileKey).then(function (data)\r\n {\r\n amplify.store('pnWebProfile', $scope.appInfo.profileKey);\r\n $scope.applySelectedProfile();\r\n PaymentService.unLockPayments(previousAuthorization.CustContKey,\r\n previousAuthorization.CustomerContact.EmailAddress,\r\n previousAuthorization.CustKey);\r\n PaymentService.unlockInvoices(previousAuthorization.CustContKey,\r\n previousAuthorization.CustomerContact.EmailAddress,\r\n previousAuthorization.CustKey);\r\n amplify.store(\"paymentLockData\", null);\r\n $scope.appInfo.webUser.CurrentAuthorization = $scope.appInfo.webUser.WebAuthorizations[$scope.appInfo.authorizationIndex];\r\n $rootScope.$broadcast('event:AccountChange', {});\r\n $scope.goTo('/Home');\r\n });\r\n };\r\n\r\n $scope.showAccountList = function ()\r\n {\r\n $scope.showUserOpt = false;\r\n $scope.showAccounts = !$scope.showAccounts;\r\n };\r\n\r\n $scope.editUser = function ()\r\n {\r\n $scope.showUserOpt = false;\r\n $scope.goTo('/Account/Profile/YourProfile');\r\n };\r\n\r\n $scope.changePassword = function ()\r\n {\r\n $scope.showUserOpt = false;\r\n $scope.goTo('/Account/Profile/ResetPassword');\r\n };\r\n\r\n $scope.showUserOptions = function ()\r\n {\r\n $scope.showAccounts = false;\r\n $scope.showUserOpt = !$scope.showUserOpt;\r\n };\r\n\r\n $scope.headerTimer = {};\r\n $scope.subMenuWaiter = function (menuKey)\r\n {\r\n var barWidth = document.getElementById(\"hdr-submenu\").clientWidth;\r\n var acctWidth = document.getElementById(\"hdr-acctInfo\").clientWidth;\r\n document.getElementById(\"subMenu\" + menuKey).style.width = (barWidth - acctWidth - 30) + 'px';\r\n document.getElementById(\"subMenu\" + menuKey).style.overflowX = \"hidden\";\r\n\r\n $scope.startIndex = 0;\r\n $scope.endIndex = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SubMenu, {ParentKey: menuKey}).length - 1;\r\n $scope.menuLength = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SubMenu, {ParentKey: menuKey}).length - 1;\r\n\r\n $scope.headerTimer = $timeout(function ()\r\n {\r\n $scope.setMenuVisibility(menuKey);\r\n }, 100);\r\n };\r\n\r\n $scope.setMenuVisibility = function (menuKey)\r\n {\r\n var subMenu = $filter(\"filter\")($scope.appInfo.webUser.CurrentAuthorization.SiteLayout.SubMenu, {ParentKey: menuKey});\r\n var barWidth = document.getElementById(\"hdr-submenu\").clientWidth;\r\n var acctWidth = document.getElementById(\"hdr-acctInfo\").clientWidth;\r\n var maxMenuWidth = barWidth - acctWidth - 80;\r\n var currentMenuWidth = 0;\r\n for (var x = 0; x < subMenu.length; x++)\r\n {\r\n var menuItem = subMenu[x];\r\n menuItem.visible = true;\r\n $scope.$apply();\r\n if (x < $scope.startIndex)\r\n {\r\n menuItem.visible = false;\r\n continue;\r\n }\r\n currentMenuWidth += document.getElementById(menuItem.Key).clientWidth + 50;\r\n menuItem.visible = currentMenuWidth < maxMenuWidth;\r\n if (menuItem.visible)\r\n $scope.endIndex = x;\r\n }\r\n };\r\n $scope.moveMenuLeft = function (menuKey)\r\n {\r\n if ($scope.startIndex === 0)\r\n return;\r\n $scope.startIndex -= 1;\r\n $scope.setMenuVisibility(menuKey);\r\n };\r\n $scope.moveMenuRight = function (menuKey)\r\n {\r\n if ($scope.startIndex === $scope.menuLength)\r\n return;\r\n $scope.startIndex += 1;\r\n $scope.setMenuVisibility(menuKey);\r\n };\r\n });","angular.module(\"pnPages\", ['core.objects', 'services.pages', 'core.directives'])\n .config(function ($routeProvider, templateProvider) {\n $routeProvider\n .when(\"/Pages/\",\n {\n templateUrl: templateProvider.getTemplate(\"Pages\"),\n controller: \"customPagesCtrl\",\n controllerAs: \"ctrl\"\n })\n .when(\"/Pages/Detail/:key\",\n {\n templateUrl: templateProvider.getTemplate(\"PagesDetail\"),\n controller: \"customPagesDetailCtrl\",\n controllerAs: \"customPagesDetailCtrl\",\n resolve: {\n localStrings: function (localizationSvc) {\n return localizationSvc.getCachedLocalizationsContainer(\"PagesLocalization\");\n }\n }\n })\n ;\n })\n .filter('encodeURIComponent', ['$window', function ($window) {\n return function (input) {\n return encodeURIComponent(input);\n };\n }])\n .controller('customPagesCtrl', function ($scope, templates, PagesService, WebFunctions) {\n 'use strict';\n var ctrl = this;\n ctrl.Context = {\n Pages: [],\n Tokens: []\n };\n\n ctrl.initialize = function () {\n if (!$scope.checkCurrentUserPermission(WebFunctions.ViewCustomPages)) {\n $scope.goTo(\"/Home\");\n }\n $scope.locationInfo.menuLocation = 7;\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PagesSideMenu\");\n if (!$scope.locationInfo.sideMenuData)\n $scope.locationInfo.sideMenuData = {};\n $scope.locationInfo.sideMenuData.subMenu = \"0\";\n\n $scope.checkForAppliedProfile();\n PagesService.getWebProfileSiteLayout($scope.appInfo.profileKey).then(function (response) {\n if (response.Successful) {\n //get custom pages key\n var customPagesMenuNode = response.SiteLayout.MenuNodes.filter(function (val, index) {\n return val.Name === 'Custom Pages';\n });\n if (!angular.isUndefinedOrNullOrEmpty(customPagesMenuNode) && customPagesMenuNode.length === 1) {\n ctrl.Context.Pages = response.SiteLayout.MenuNodes.filter(function (val, index) {\n return val.ParentKey === customPagesMenuNode[0].Key;\n });\n }\n }\n });\n };\n })\n .controller('customPagesDetailCtrl', function ($scope, $routeParams, PagesService, $sce, WebFunctions, templates, $http, localStrings, $rootScope, $timeout, $interval) {\n 'use strict';\n var ctrl = this;\n ctrl.reloadInterval = 0;\n ctrl.selectedPage = {};\n ctrl.initialize = function (conf) {\n if (!$scope.checkCurrentUserPermission(WebFunctions.ViewCustomPages)) {\n $scope.goTo(\"/Home\");\n }\n\n $scope.locationInfo.menuLocation = 7;\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PagesSideMenu\");\n if (!$scope.locationInfo.sideMenuData)\n $scope.locationInfo.sideMenuData = {};\n $scope.locationInfo.sideMenuData.subMenu = \"0\";\n PagesService.getWebProfileSiteLayout($scope.appInfo.profileKey).then(function (response) {\n if (response.Successful) {\n //get custom pages key\n var customPagesMenuNode = response.SiteLayout.MenuNodes.filter(function (val, index) {\n return val.Name === 'Custom Pages';\n });\n if (!angular.isUndefinedOrNullOrEmpty(customPagesMenuNode) && customPagesMenuNode.length === 1) {\n var pages = response.SiteLayout.MenuNodes.filter(function (val, index) {\n return val.ParentKey === customPagesMenuNode[0].Key;\n });\n var key = $routeParams.key;\n if (!angular.isUndefinedOrNullOrEmpty(key)) {\n var selectedIndex = 0;\n var foundPage = pages.filter(function (val, index) {\n if (val.Key.toString() === key) {\n selectedIndex = index;\n return true;\n }\n return false;\n });\n if (!angular.isUndefinedOrNullOrEmpty(foundPage) && foundPage.length > 0) {\n ctrl.selectedPage = foundPage[0];\n $scope.locationInfo.sideMenuData.subMenu = selectedIndex;\n retrieveToken(conf);\n }\n }\n }\n }\n });\n };\n\n function retrieveToken(conf) {\n PagesService.getAccessToken($scope.appInfo.profileKey, ctrl.selectedPage.Key).then(\n function (response) {\n if (response && response.Successful && response.AccessToken.Success) {\n if (angular.isUndefinedOrNullOrEmpty(response.MenuNode.ClientAuthMethod)) {\n var url = $sce.trustAsResourceUrl(ctrl.selectedPage.PageURL);\n angular.element(\"#customPageWrapper\").attr('src', url);\n }\n else {\n if (!angular.isUndefinedOrNullOrEmpty(response.AccessToken.access_token)) {\n switch (response.MenuNode.ClientAuthMethod) {\n case conf.AuthMethods.Header:\n var req = {\n method: 'GET',\n url: ctrl.selectedPage.PageURL,\n headers: {\n 'Authorization': 'Bearer ' + response.AccessToken.access_token\n }\n };\n $http(req).then(\n function (response) {\n // A response status code between 200 and 299 is considered a success status\n if (response.status >= 200 && response.status < 300) {\n var data = response.data || '';\n if (response.data && response.data.indexOf('', '');\n }\n var frame = document.querySelector('#customPageWrapper');\n \n frame.contentWindow.document.open('text/html', 'replace');\n frame.contentWindow.document.write(data);\n frame.contentWindow.document.close();\n }\n },\n function (failed) {\n var msg = localStrings.getLocalizedString(\"UnableProcessPage\").replace('{0}', ctrl.selectedPage.Name);\n $rootScope.notifier.show(msg, 'error');\n }\n );\n break;\n case conf.AuthMethods.URL:\n var glue = (ctrl.selectedPage.PageURL.includes('?') ? '&' : '?');\n var params = glue + 'access_token=' + encodeURIComponent(response.AccessToken.access_token) + '&token_type=' + response.AccessToken.token_type;\n angular.element(\"#customPageWrapper\").attr('src', $sce.trustAsResourceUrl(ctrl.selectedPage.PageURL + params));\n break;\n }\n }\n else {\n var msg = localStrings.getLocalizedString(\"UnableProcessPage\").replace('{0}', ctrl.selectedPage.Name);\n $rootScope.notifier.show(msg, 'error');\n }\n }\n // register auto refresh - force to reload iFrame when approaching token expiration\n if (!angular.isUndefinedOrNullOrEmpty(response.AccessToken.expires_in) && !angular.isUndefinedOrNullOrEmpty(response.AccessToken.access_token)) {\n $timeout(function () {\n retrieveToken(conf);\n }, (response.AccessToken.expires_in * 1000));\n }\n }\n },\n function (failure) {\n var msg = localStrings.getLocalizedString(\"UnableProcessPage\").replace('{0}', ctrl.selectedPage.Name);\n $rootScope.notifier.show(msg, 'error');\n });\n }\n })\n .controller('customPagesSideMenuCtrl', function ($scope, $rootScope, $routeParams, PagesService) {\n 'use strict';\n var ctrl = this;\n ctrl.Context = {\n Pages: []\n };\n ctrl.isSelected = function (index) {\n var retval = $scope.locationInfo.sideMenuData.subMenu === index;\n if (retval) {\n ctrl.selectedPage = ctrl.Context.Pages[index];\n }\n return retval;\n };\n ctrl.initialize = function () {\n PagesService.getWebProfileSiteLayout($scope.appInfo.profileKey).then(function (response) {\n if (response.Successful) {\n //get custom pages key\n var customPagesMenuNode = response.SiteLayout.MenuNodes.filter(function (val, index) {\n return val.Name === 'Custom Pages';\n });\n if (!angular.isUndefinedOrNullOrEmpty(customPagesMenuNode) && customPagesMenuNode.length === 1) {\n ctrl.Context.Pages = response.SiteLayout.MenuNodes.filter(function (val, index) {\n return val.ParentKey === customPagesMenuNode[0].Key;\n });\n }\n }\n });\n };\n });\n","/**\r\n * Created by rhampton on 8/19/2014.\r\n */\r\nangular.module(\"pnPaperwork\", ['core.objects'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n\r\n $routeProvider\r\n .when(\"/Paperwork/EnterPaperwork/\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"EnterPaperwork\"),\r\n controller: \"enterPaperworkStartCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/EnterPaperwork/:paperworkKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"EnterPaperworkMeters\"),\r\n controller: \"enterPaperworkCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/EnterPaperworkDeliveries/:paperworkKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"EnterPaperworkDeliveries\"),\r\n controller: \"enterPaperworkDeliveriesCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/EnterPaperworkTanks/:paperworkKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"EnterPaperworkTanks\"),\r\n controller: \"enterPaperworkTanksCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/EnterPaperworkDealerForms/:paperworkKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"EnterPaperworkDealerForms\"),\r\n controller: \"enterPaperworkDealerFormsCtrl\"\r\n })\r\n .when(\"/Paperwork/ReviewPaperwork\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ReviewPaperwork\"),\r\n controller: \"reviewPaperworkCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/Reports\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ReportsPaperwork\"),\r\n controller: \"reportsPaperworkStartCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/Reports/:reportName\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ReportsPaperwork\"),\r\n controller: \"paperworkReportCtrl\"\r\n })\r\n .when(\"/Paperwork/ViewPaperwork/:paperworkKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ViewPaperwork\"),\r\n controller: \"enterPaperworkCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/ViewPaperworkTanks/:paperworkKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ViewPaperworkTanks\"),\r\n controller: \"enterPaperworkTanksCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/ViewPaperworkDeliveries/:paperworkKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ViewPaperworkDeliveries\"),\r\n controller: \"enterPaperworkDeliveriesCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/Paperwork/ViewPaperworkDealerForms/:paperworkKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ViewPaperworkDealerForms\"),\r\n controller: \"enterPaperworkDealerFormsCtrl\"\r\n })\r\n .when(\"/Paperwork/InventorySummary\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"InventorySummary\"),\r\n controller: \"inventorySummaryCtrl\"\r\n })\r\n .when(\"/Paperwork/InventorySummary/:sitekey/:paperworkDate\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"InventorySummary\"),\r\n controller: \"inventorySummaryCtrl\"\r\n });\r\n })\r\n .controller('reviewPaperworkSideMenuCtrl', function ($scope, PaperworkService, PaperworkReportsService, WebFunctions, $location)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $scope.appInfo.paperwork.context = $scope.appInfo.paperwork.context || {};\r\n $scope.appInfo.paperwork.reports = $scope.appInfo.paperwork.reports || {};\r\n $scope.locationInfo.sideMenuData.reviewPaperwork = {};\r\n $scope.locationInfo.sideMenuData.reviewPaperwork.loaded = false;\r\n $scope.locationInfo.sideMenuData.reviewPaperwork.unposted = true;\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n\r\n // There is a race condition when reloading the page\r\n // Check if the date selector is undefined, if it is then initialize it\r\n if (angular.isUndefinedOrNullOrEmpty($scope.dateSelector)) {\r\n $scope.initializeDateSelector();\r\n }\r\n\r\n $scope.dateSelector.overrideDefaults = true;\r\n $scope.dateSelector.displaySelector = true;\r\n $scope.dateSelector.maxNumOfDays = 90;\r\n $scope.dateSelector.selection = 11;\r\n\r\n PaperworkService.getPaperworkContext($scope.appInfo.webUser.CurrentAuthorization.CustContKey, true).then(\r\n function (data) {\r\n $scope.appInfo.paperwork.context.paperworkSites = data.PaperworkSites;\r\n $scope.appInfo.paperwork.context.selectedSite = data.SelectedSiteKey;\r\n $scope.locationInfo.sideMenuData.reviewPaperwork.loaded = true;\r\n $scope.appInfo.paperwork.context.lockPaperworkAfterDru = data.LockPaperworkAfterDru;\r\n\r\n $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance = data.CalculatedPriceToPriorDaysPriceVariance;\r\n $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance = data.CalculatedPriceToCapturedRetailPriceVariance;\r\n $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance = data.NetSalesDollarsToCapturedRetailPriceNetUnitsVariance;\r\n $scope.setSiteDescByKey();\r\n\r\n $scope.locationInfo.showEnterPaperworkMenuItem = $scope.appInfo.paperwork.context.paperworkSites[0] ?\r\n $scope.appInfo.paperwork.context.paperworkSites[0].CanEnterPaperwork :\r\n false;\r\n\r\n if (!$scope.locationInfo.showEnterPaperworkMenuItem) {\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n }\r\n },\r\n function (err) {\r\n $scope.locationInfo.sideMenuData.reviewPaperwork.loaded = true;\r\n //TODO: notify somebody\r\n }\r\n );\r\n\r\n PaperworkReportsService\r\n .getPaperworkReports($scope.appInfo.webUser.CurrentAuthorization.CustContKey, false)\r\n .then(function (data) {\r\n if (data.Successful && !angular.isUndefinedOrNullOrEmpty(data.PaperworkReports)) {\r\n $scope.appInfo.paperwork.reports.paperworkReports = data.PaperworkReports;\r\n }\r\n }\r\n );\r\n };\r\n\r\n $scope.setSiteDescByKey = function ()\r\n {\r\n angular.forEach($scope.appInfo.paperwork.context.paperworkSites, function (site, index)\r\n {\r\n if (site.SiteKey === $scope.appInfo.paperwork.context.selectedSite)\r\n $scope.appInfo.paperwork.context.selectedSiteObj = site;\r\n });\r\n };\r\n })\r\n .controller('enterPaperworkSideMenuCtrl', function ($scope, PaperworkService, $filter, WebFunctions, $rootScope, localizationSvc, setupNav, $location)\r\n {\r\n 'use strict';\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n $scope.retailWarningMessage = localStrings.getLocalizedString(\"WarningRetailPrice\");\r\n $scope.averageWarningMessage = localStrings.getLocalizedString(\"WarningAveragePrice\");\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenuData.paperwork = {};\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n };\r\n\r\n $scope.setupAppNavigation = function ()\r\n {\r\n angular.forEach($scope.appInfo.paperwork.apps, function (app, index)\r\n {\r\n if (app.MenuCode === 'DREFD')\r\n {\r\n $scope.locationInfo.sideMenuData.paperwork.deliveries = app;\r\n }\r\n if (app.MenuCode === 'DREGM')\r\n {\r\n $scope.locationInfo.sideMenuData.paperwork.meters = app;\r\n }\r\n if (app.MenuCode === 'DREGS')\r\n {\r\n $scope.locationInfo.sideMenuData.paperwork.tanks = app;\r\n }\r\n if (app.DealerFormVersionKey > 0)\r\n {\r\n app.MenuCode = 'DRDFE';\r\n $scope.locationInfo.sideMenuData.paperwork.forms = app;\r\n $scope.appInfo.paperwork.form.AppKey = app.Key;\r\n }\r\n });\r\n };\r\n\r\n $scope.openNewPaperworkBatch = function ()\r\n {\r\n PaperworkService.OpenPaperworkBatch(\r\n $scope.appInfo.paperwork.context.selectedSite,\r\n $scope.urlFormatDate($scope.locationInfo.sideMenuData.paperwork.date, true),\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.Id,\r\n false\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.paperwork.batch = data.PaperworkBatch.PaperworkBatch;\r\n $scope.appInfo.paperwork.apps = data.PaperworkBatch.PaperworkApps;\r\n $scope.appInfo.paperwork.form = data.PaperworkBatch.PaperworkForm;\r\n $scope.appInfo.paperwork.siteInfo = data.PaperworkBatch.PaperworkSiteInfo;\r\n $scope.appInfo.paperwork.paperworkKey = $scope.appInfo.paperwork.batch.Key;\r\n $scope.setupAppNavigation();\r\n \r\n $rootScope.$broadcast('event:NewPaperworkBatchLoaded', {});\r\n });\r\n };\r\n\r\n var pwLoadedListener = $rootScope.$on('event:PaperworkLoaded', function (event, viewOnly, data)\r\n {\r\n $scope.setupAppNavigation();\r\n });\r\n $scope.$on('$destroy', pwLoadedListener);\r\n\r\n $scope.navPg = function (menuCode)\r\n {\r\n $scope.appInfo.paperwork.viewOnly = false;\r\n\r\n if ($location.$$path.indexOf('/ViewPaperwork/') > -1) $scope.appInfo.paperwork.viewOnly = true;\r\n if ($location.$$path.indexOf('/ViewPaperworkDeliveries/') > -1) $scope.appInfo.paperwork.viewOnly = true;\r\n if ($location.$$path.indexOf('/ViewPaperworkTanks/') > -1) $scope.appInfo.paperwork.viewOnly = true;\r\n if ($location.$$path.indexOf('/ViewPaperworkDealerForms/') > -1) $scope.appInfo.paperwork.viewOnly = true;\r\n \r\n // Broadcast the current module menu code this will trigger save in each controller when paperwork is in Enter mode before going to another menu\r\n if($scope.appInfo.paperwork.viewOnly) $rootScope.$broadcast('event:PageStage', setupNav.resolveCurrentPageMenuCode($location.$$path));\r\n\r\n $scope.goTo(setupNav.getSinglePath(menuCode,$scope.appInfo.paperwork.paperworkKey, $scope.appInfo.paperwork.viewOnly, false));\r\n };\r\n\r\n })\r\n .controller('inventorySummarySideMenuCtrl', function ($scope, PaperworkService, PaperworkReportsService, $routeParams, WebFunctions, reportingService, validatorSvc)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n $scope.$root.reportSettings.reportKey = 19;\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.inventorySummary = {};\r\n $scope.locationInfo.sideMenuData.subMenu = '3';\r\n $scope.locationInfo.sideMenuData.inventorySummary.reportType = 'PaperworkSummary ';\r\n $scope.appInfo = $scope.appInfo || {};\r\n $scope.appInfo.paperwork = $scope.appInfo.paperwork || {};\r\n $scope.appInfo.paperwork.context = $scope.appInfo.paperwork.context || {};\r\n $scope.appInfo.paperwork.reports = $scope.appInfo.paperwork.reports || {};\r\n\r\n $scope.appInfo.paperwork.context.selectedSiteObj = { SiteKey: -1 };\r\n\r\n // There is a race condition when reloading the page\r\n // Check if the date selector is undefined, if it is then initialize it\r\n if (angular.isUndefinedOrNullOrEmpty($scope.dateSelector)) {\r\n $scope.initializeDateSelector();\r\n }\r\n\r\n $scope.dateSelector.overrideDefaults = true;\r\n $scope.dateSelector.displaySelector = false;\r\n $scope.dateSelector.maxNumOfDays = 90;\r\n $scope.dateSelector.selection = 14;\r\n\r\n PaperworkService\r\n .getPaperworkContext($scope.appInfo.webUser.CurrentAuthorization.CustContKey, true)\r\n .then(function (data)\r\n {\r\n $scope.appInfo.paperwork.context.paperworkSites = data.PaperworkSites;\r\n $scope.appInfo.paperwork.context.lockPaperworkAfterDru = data.LockPaperworkAfterDru;\r\n\r\n $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance = data.CalculatedPriceToPriorDaysPriceVariance;\r\n $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance = data.CalculatedPriceToCapturedRetailPriceVariance;\r\n $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance = data.NetSalesDollarsToCapturedRetailPriceNetUnitsVariance;\r\n\r\n if (!$scope.setSiteAndDate())\r\n {\r\n $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey = data.SelectedSiteKey;\r\n $scope.dateSelector.startDate = $scope.formatDate(data.NextPaperworkDate);\r\n }\r\n\r\n $scope.locationInfo.showEnterPaperworkMenuItem = $scope.appInfo.paperwork.context.paperworkSites[0] ?\r\n $scope.appInfo.paperwork.context.paperworkSites[0].CanEnterPaperwork :\r\n false;\r\n\r\n if (!$scope.locationInfo.showEnterPaperworkMenuItem)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n }\r\n $scope.applyAction();\r\n },\r\n function (err)\r\n {\r\n $scope.locationInfo.sideMenuData.reviewPaperwork.loaded = true;\r\n //TODO: notify somebody\r\n }\r\n );\r\n\r\n PaperworkReportsService\r\n .getPaperworkReports($scope.appInfo.webUser.CurrentAuthorization.CustContKey, false)\r\n .then(function (data) {\r\n if (data.Successful && !angular.isUndefinedOrNullOrEmpty(data.PaperworkReports)) {\r\n $scope.appInfo.paperwork.reports.paperworkReports = data.PaperworkReports;\r\n }\r\n }\r\n );\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.inventorySummary = $scope.reportSettings.loadOptions.controls;\r\n $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey = $scope.reportSettings.loadOptions.selectedSite;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.inventorySummary;\r\n $scope.reportSettings.saveOptions.selectedSite = $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n\r\n $scope.setNextPaperworkDate = function (e)\r\n {\r\n if ($scope.setSiteAndDate())\r\n return;\r\n\r\n PaperworkService.getNextPaperworkDate(e.sender.dataItem(e.sender.select()).SiteKey, true).then(\r\n function (data)\r\n {\r\n $scope.dateSelector.startDate = $scope.formatDate(data);\r\n }\r\n );\r\n };\r\n\r\n $scope.setSiteAndDate = function ()\r\n {\r\n if ($routeParams.sitekey && $routeParams.paperworkDate)\r\n {\r\n $scope.appInfo.paperwork.context.selectedSiteObj = {SiteKey: -1};\r\n\r\n $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey = parseInt($routeParams.sitekey, 10);\r\n $scope.dateSelector.startDate = $scope.formatDate($routeParams.paperworkDate);\r\n return true;\r\n }\r\n else\r\n return false;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n PaperworkService.ValidatePaperworkSiteDateForContact(\r\n $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey,\r\n $scope.urlFormatDate($scope.dateSelector.startDate, true),\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n false // not for entry\r\n ).then(function (data)\r\n {\r\n var qs = \"reportName=\" + $scope.locationInfo.sideMenuData.inventorySummary.reportType +\r\n \"&RP-SiteKey=\" + $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey +\r\n \"&RP-PWDate=\" + $scope.dateSelector.startDate;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n });\r\n\r\n };\r\n })\r\n .controller('reportsPaperworkStartCtrl', function ($scope, WebFunctions, templates, localStrings, PaperworkReportsService)\r\n {\r\n 'use strict';\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n \r\n $scope.appInfo = $scope.appInfo || {};\r\n $scope.appInfo.paperwork = {\r\n context: {},\r\n paperworkKey: 0,\r\n reports: {}\r\n };\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.appInfo.paperwork.reports.paperworkReports = [];\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportsSideMenu\");\r\n $scope.locationInfo.sideMenuData.paperwork = {};\r\n $scope.locationInfo.showEnterPaperworkMenuItem = false;\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 31;\r\n\r\n PaperworkReportsService\r\n .getPaperworkReports($scope.appInfo.webUser.CurrentAuthorization.CustContKey, false)\r\n .then(function (data) {\r\n if (data.Successful && !angular.isUndefinedOrNullOrEmpty(data.PaperworkReports)) {\r\n $scope.appInfo.paperwork.reports.paperworkReports = $scope.localizeReports(data.PaperworkReports).sort($scope.compareDisplayNames);\r\n }\r\n else {\r\n $scope.goTo(\"/Paperwork/EnterPaperwork\");\r\n $scope.modalifier.showSetupError();\r\n }\r\n }\r\n );\r\n };\r\n\r\n $scope.localizeReports = function (reports) {\r\n angular.forEach(reports, function (report) {\r\n report.DisplayName = localStrings.getLocalizedString('SSRSReport' + report.Name);\r\n });\r\n\r\n return reports;\r\n };\r\n\r\n $scope.compareDisplayNames = function (a, b) {\r\n return a.DisplayName.localeCompare(b.DisplayName);\r\n };\r\n })\r\n .controller('enterPaperworkStartCtrl', function ($scope, $location, PaperworkService, PaperworkReportsService, WebFunctions, validatorSvc, templates, localStrings, setupNav)\r\n {\r\n 'use strict';\r\n $scope.averageWarningMessage = localStrings.getLocalizedString(\"WarningAveragePrice\");\r\n $scope.retailWarningMessage = localStrings.getLocalizedString(\"WarningRetailPrice\");\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n validatorSvc.clearValidationScopes();\r\n\r\n $scope.appInfo = $scope.appInfo || {};\r\n $scope.appInfo.paperwork = {\r\n context: {},\r\n paperworkKey: 0,\r\n reports: {}\r\n };\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.appInfo.paperwork.reports.paperworkReports = [];\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaperworkSideMenu\");\r\n $scope.locationInfo.sideMenuData.paperwork = {};\r\n $scope.locationInfo.sideMenuData.isFirstPage = false;\r\n $scope.locationInfo.sideMenuData.isLastPage = false;\r\n $scope.locationInfo.sideMenuData.subMenu = '1';\r\n $scope.locationInfo.showEnterPaperworkMenuItem = false;\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n\r\n // There is a race condition when reloading the page\r\n // Check if the date selector is undefined, if it is then initialize it\r\n if (angular.isUndefinedOrNullOrEmpty($scope.dateSelector)) {\r\n $scope.initializeDateSelector();\r\n }\r\n\r\n $scope.dateSelector.displaySelector = true;\r\n $scope.dateSelector.overrideDefaults = true;\r\n $scope.dateSelector.maxNumOfDays = 90;\r\n $scope.dateSelector.selection = 11;\r\n\r\n PaperworkService.getPaperworkContext($scope.appInfo.webUser.CurrentAuthorization.CustContKey, false).then(\r\n function (data)\r\n {\r\n if (data.Successful && !angular.isUndefinedOrNullOrEmpty(data.PaperworkSites))\r\n {\r\n $scope.appInfo.paperwork.context.paperworkSites = data.PaperworkSites;\r\n $scope.appInfo.paperwork.context.selectedSite = data.SelectedSiteKey;\r\n $scope.appInfo.paperwork.context.lockPaperworkAfterDru = data.LockPaperworkAfterDru;\r\n $scope.locationInfo.sideMenuData.paperwork.date = $scope.formatDate(data.NextPaperworkDate);\r\n $scope.locationInfo.sideMenuData.paperwork.minDate = $scope.formatDate(data.HistoryLimit);\r\n $scope.locationInfo.sideMenuData.paperwork.maxDate = $scope.formatDate(data.FutureLimit);\r\n $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance = data.CalculatedPriceToPriorDaysPriceVariance;\r\n $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance = data.CalculatedPriceToCapturedRetailPriceVariance;\r\n $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance = data.NetSalesDollarsToCapturedRetailPriceNetUnitsVariance;\r\n $scope.setSiteDescByKey();\r\n\r\n $scope.locationInfo.showEnterPaperworkMenuItem = $scope.appInfo.paperwork.context.paperworkSites[0] ?\r\n $scope.appInfo.paperwork.context.paperworkSites[0].CanEnterPaperwork :\r\n false;\r\n\r\n if (!$scope.locationInfo.showEnterPaperworkMenuItem)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n }\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n }\r\n );\r\n\r\n PaperworkReportsService\r\n .getPaperworkReports($scope.appInfo.webUser.CurrentAuthorization.CustContKey, false)\r\n .then(function (data) {\r\n if (data.Successful && !angular.isUndefinedOrNullOrEmpty(data.PaperworkReports)) {\r\n $scope.appInfo.paperwork.reports.paperworkReports = data.PaperworkReports;\r\n }\r\n }\r\n );\r\n };\r\n\r\n $scope.setNextPaperworkDate = function (e)\r\n {\r\n PaperworkService.getNextPaperworkDate(e.sender.dataItem(e.sender.select()).SiteKey, false).then(\r\n function (data)\r\n {\r\n $scope.dateSelector.startDate = $scope.formatDate(data);\r\n $scope.locationInfo.sideMenuData.paperwork.date = $scope.dateSelector.startDate;\r\n }\r\n );\r\n };\r\n\r\n $scope.setSiteDescByKey = function ()\r\n {\r\n angular.forEach($scope.appInfo.paperwork.context.paperworkSites, function (site, index)\r\n {\r\n if (site.SiteKey === $scope.appInfo.paperwork.context.selectedSite)\r\n $scope.appInfo.paperwork.context.selectedSiteObj = site;\r\n });\r\n };\r\n\r\n $scope.openNewPaperworkBatch = function ()\r\n {\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n PaperworkService.OpenPaperworkBatch(\r\n $scope.appInfo.paperwork.context.selectedSite,\r\n $scope.urlFormatDate($scope.locationInfo.sideMenuData.paperwork.date, true),\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.Id,\r\n false\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.paperwork.batch = data.PaperworkBatch.PaperworkBatch;\r\n $scope.appInfo.paperwork.apps = data.PaperworkBatch.PaperworkApps;\r\n $scope.appInfo.paperwork.form = data.PaperworkBatch.PaperworkForm;\r\n $scope.appInfo.paperwork.siteInfo = data.PaperworkBatch.PaperworkSiteInfo;\r\n $scope.appInfo.paperwork.paperworkKey = $scope.appInfo.paperwork.batch.Key;\r\n \r\n $scope.goTo(setupNav.getRouterPath($scope.appInfo.paperwork.apps[0],$scope.appInfo.paperwork.paperworkKey, ($scope.appInfo.paperwork.batch.SubmitStatus >= \"3\")));\r\n });\r\n };\r\n })\r\n .controller('reviewPaperworkCtrl', function ($scope, $rootScope, validatorSvc, $location, PaperworkService, WebFunctions, $filter, templates, localStrings, globalizationSvc, setupNav)\r\n {\r\n 'use strict';\r\n validatorSvc.clearValidationScopes();\r\n $scope.kendo = {};\r\n $scope.kendo.paperworkHistoryGrid = {};\r\n $scope.kendo.paperworkHistoryGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"PaperworkDateFormatted\",\r\n title: localStrings.getLocalizedString(\"PaperworkDate\"),\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"SubmitStatusDesc\",\r\n title: localStrings.getLocalizedString(\"Status\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"TotalFuelSales\",\r\n title: localStrings.getLocalizedString(\"DailyTotal\"),\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: [],\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true,\r\n width: '50%'\r\n };\r\n\r\n $scope.kendo.paperworkHistoryGridInit = function (ds)\r\n {\r\n $scope.kendo.paperworkHistoryGridDS = new kendo.data.DataSource({\r\n data: ds\r\n });\r\n\r\n $scope.kendo.paperworkHistoryGridDS.read();\r\n $scope.kendo.paperworkHistoryGrid.dataSource.data($scope.kendo.paperworkHistoryGridDS.data());\r\n };\r\n\r\n $scope.reviewPaperwork = {};\r\n $scope.selectedReviewSite = {};\r\n $scope.viewPaperworkHistory = false;\r\n $scope.reviewLoaded = false;\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.noRecordsFound = false;\r\n $scope.appInfo = $scope.appInfo || {};\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaperworkSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $scope.reviewLoaded = true;\r\n };\r\n\r\n $scope.allEntry = function (batch)\r\n {\r\n return (batch.PaperworkDate > batch.InvtyCOGSDate) &&\r\n (batch.PaperworkDate > batch.FuelCOGSDate) &&\r\n (batch.SubmitStatus < 3 || !$scope.appInfo.paperwork.context.lockPaperworkAfterDru);\r\n };\r\n\r\n $scope.$parent.applyAction = function ()\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n\r\n $scope.modalifier.hide();\r\n PaperworkService.getPaperworkBatchesByDate(\r\n $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey,\r\n $scope.urlFormatDate($scope.dateSelector.startDate, true),\r\n $scope.urlFormatDate($scope.dateSelector.endDate, true),\r\n $scope.locationInfo.sideMenuData.reviewPaperwork.unposted ? 1 : 0\r\n ).then(function (data)\r\n {\r\n if (data.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"PaperworkHistory\"));\r\n }\r\n\r\n data.each(function (item)\r\n {\r\n item.PaperworkDateFormatted = globalizationSvc.formatDateTime(item.PaperworkDate, 'd');\r\n item.TotalFuelSales = globalizationSvc.formatCurrency(item.TotalFuelSales);\r\n });\r\n\r\n $scope.kendo.paperworkHistoryGridInit(data);\r\n $scope.viewPaperworkHistory = true;\r\n });\r\n };\r\n\r\n $scope.loadPaperwork = function (item, isEntry)\r\n {\r\n PaperworkService.ValidatePaperworkSiteDateForContact(\r\n $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey,\r\n item.PaperworkDateFormatted,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n isEntry || false\r\n );\r\n\r\n PaperworkService.OpenPaperworkBatch(\r\n $scope.appInfo.paperwork.context.selectedSiteObj.SiteKey,\r\n item.PaperworkDateFormatted,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.Id,\r\n !isEntry || false\r\n ).then(function (data)\r\n {\r\n data.PaperworkBatch.PaperworkApps.find(function (item){\r\n if (item.DealerFormVersionKey > 0) {\r\n item.MenuCode = 'DRDFE';\r\n }\r\n });\r\n \r\n $location.path(setupNav.getSinglePath(data.PaperworkBatch.PaperworkApps[0].MenuCode, item.Key, !isEntry, false));\r\n });\r\n };\r\n })\r\n .controller('enterPaperworkCtrl', function ($scope, $rootScope, $routeParams, PaperworkService, $filter, $location, $timeout, WebFunctions,\r\n PaperworkMetersService, validatorSvc, templates, localStrings, globalizationSvc, setupNav)\r\n {\r\n 'use strict';\r\n $scope.averageWarningMessage = localStrings.getLocalizedString(\"WarningAveragePrice\");\r\n $scope.retailWarningMessage = localStrings.getLocalizedString(\"WarningRetailPrice\");\r\n $scope.appInfo.paperwork.paperworkKey = 0;\r\n $scope.appInfo.paperwork.showRetailPrice = false;\r\n $scope.appInfo.paperwork.showEndingDollar = false;\r\n $scope.appInfo.paperwork.showNetDollars = false;\r\n $scope.appInfo.paperwork.showEndingUnits = false;\r\n $scope.appInfo.paperwork.showNetUnits = false;\r\n $scope.appInfo.paperwork.showAvgPrice = false;\r\n $scope.appInfo.paperwork.showBeginMeters = false;\r\n\r\n $scope.appInfo.paperwork.meters = {};\r\n\r\n $scope.modalInfo = {};\r\n $scope.metersLoaded = false;\r\n\r\n $scope.kendo = {};\r\n\r\n $scope.kInputOptions = {\r\n culture: globalizationSvc.getLocale(),\r\n format: \"n\",\r\n decimals: 2,\r\n spinners: false\r\n };\r\n\r\n $scope.MaxUnits = 100000000;\r\n\r\n // controller destructor\r\n $scope.$on(\"$destroy\", function handler()\r\n {\r\n $rootScope.scopesToValidate = [];\r\n });\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n $scope.appInfo.paperwork.viewOnly = $location.$$path.indexOf('/ViewPaperwork/') > -1;\r\n\r\n $scope.metersEditable = true;\r\n\r\n if ($routeParams.paperworkKey)\r\n {\r\n $scope.appInfo.paperwork.paperworkKey = $routeParams.paperworkKey;\r\n }\r\n\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaperworkSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = '1';\r\n // $scope.getWebProfileMessage(19);\r\n $scope.appInfo.paperwork.batch = {};\r\n\r\n if (!$scope.appInfo.paperwork.context)\r\n {\r\n PaperworkService.getPaperworkContext($scope.appInfo.webUser.CurrentAuthorization.CustContKey, true).then(\r\n function (data)\r\n {\r\n $scope.appInfo.paperwork.context = {};\r\n $scope.appInfo.paperwork.context.paperworkSites = data.PaperworkSites;\r\n $scope.appInfo.paperwork.context.selectedSite = data.SelectedSiteKey;\r\n $scope.appInfo.paperwork.context.lockPaperworkAfterDru = data.LockPaperworkAfterDru;\r\n\r\n $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance = data.CalculatedPriceToPriorDaysPriceVariance;\r\n $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance = data.CalculatedPriceToCapturedRetailPriceVariance;\r\n $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance = data.NetSalesDollarsToCapturedRetailPriceNetUnitsVariance;\r\n\r\n $scope.locationInfo.showEnterPaperworkMenuItem = $scope.appInfo.paperwork.context.paperworkSites[0] ?\r\n $scope.appInfo.paperwork.context.paperworkSites[0].CanEnterPaperwork :\r\n false;\r\n\r\n if (!$scope.locationInfo.showEnterPaperworkMenuItem)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n }\r\n }\r\n );\r\n } else\r\n {\r\n\r\n }\r\n\r\n\r\n if ($scope.appInfo.paperwork.paperworkKey > 0)\r\n {\r\n //We are loading a known existing paperwork batch\r\n PaperworkService.OpenPaperworkBatchByKey(\r\n $scope.appInfo.paperwork.paperworkKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.Id,\r\n $scope.appInfo.paperwork.viewOnly\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.paperwork.batch = data.PaperworkBatch.PaperworkBatch;\r\n $scope.appInfo.paperwork.apps = data.PaperworkBatch.PaperworkApps;\r\n $scope.appInfo.paperwork.form = data.PaperworkBatch.PaperworkForm;\r\n $scope.appInfo.paperwork.siteInfo = data.PaperworkBatch.PaperworkSiteInfo;\r\n \r\n // resolve if this is the first or last page\r\n var res = setupNav.firstLastPage('DREGM',$scope.appInfo.paperwork.apps);\r\n $scope.locationInfo.sideMenuData.isFirstPage = res.isFirstPage;\r\n $scope.locationInfo.sideMenuData.isLastPage = res.isLastPage;\r\n\r\n $rootScope.$broadcast('event:PaperworkLoaded', $scope.appInfo.paperwork.viewOnly, $scope.appInfo.paperwork.paperworkKey);\r\n\r\n var nextApp = true;\r\n angular.forEach($scope.appInfo.paperwork.apps, function (app, index)\r\n {\r\n if (app.MenuCode === 'DREGM')\r\n {\r\n $scope.loadMeters();\r\n nextApp = false;\r\n }\r\n });\r\n if (nextApp)\r\n {\r\n $scope.goTo(setupNav.navigateToPage('DREGM',$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, $scope.appInfo.paperwork.viewOnly, false));\r\n }\r\n }, function ()\r\n {\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n });\r\n }\r\n $scope.locationInfo.sideMenuData.pwSubMenu = '1';\r\n $scope.appInfo.paperwork.meterIndex = 0;\r\n\r\n\r\n };\r\n\r\n var gridColEditorInput = function (container, options)\r\n {\r\n\r\n var fieldName = \"'\" + options.field + \"'\";\r\n\r\n var required = $(container).attr('required'); // field is required\r\n\r\n // For some browsers, `attr` is undefined; for others,\r\n // `attr` is false. Check for both.\r\n\r\n var input = $('');\r\n input.kendoNumericTextBox({\r\n culture: globalizationSvc.getLocale(),\r\n format: 'n3',\r\n decimals: 3,\r\n max: $scope.MaxUnits,\r\n min: -$scope.MaxUnits\r\n });\r\n\r\n input.attr('name', options.field);\r\n input.attr('data-bind', 'value:' + options.field);\r\n input.attr('ng-blur', 'gridInputCellOnBlur(dataItem, ' + fieldName + ')');\r\n input.attr('style', 'border: \"none\"');\r\n\r\n if (typeof required !== typeof undefined && required !== false)\r\n {\r\n input.attr('required');\r\n input.attr('data-Required-msg=\"Required\"');\r\n }\r\n\r\n input.appendTo(container);\r\n };\r\n\r\n var cellIndex = \"\";\r\n var rowIndex = \"\";\r\n\r\n var gridColNumber = function (field, format)\r\n {\r\n return '';\r\n };\r\n\r\n $scope.initializeMetersGrid = function ()\r\n {\r\n\r\n $scope.metersGridDS = new kendo.data.DataSource({\r\n schema: {\r\n model: {\r\n id: \"DispenserNo\",\r\n fields: {\r\n DispenserNo: {type: 'number', editable: false},\r\n FuelPositionNo: {type: 'number', editable: false},\r\n ProductDescription: {type: 'string', editable: false},\r\n RtlPrice: {type: \"number\", format: \"{n3}\", editable: true},\r\n EndAmount: {type: \"number\", editable: true},\r\n NetAmount: {type: \"number\", editable: true},\r\n EndUnits: {type: \"number\", editable: true},\r\n NetUnits: {type: \"number\", editable: true},\r\n CalcPrice: {type: \"number\", editable: false}\r\n }\r\n }\r\n },\r\n data: $scope.appInfo.paperwork.meters,\r\n batch: true,\r\n aggregate: [{ field: \"RtlPrice\", aggregate: \"sum\" }, { field: \"NetUnits\", aggregate: \"sum\" }, { field: \"NetAmount\", aggregate: \"sum\" }]\r\n });\r\n\r\n $scope.metersGridOptions = {\r\n dataSource: $scope.metersGridDS,\r\n columns: [\r\n {\r\n title: localStrings.getLocalizedString(\"Fuel\"),\r\n columns: [\r\n {\r\n field: \"DispenserNo\",\r\n title: localStrings.getLocalizedString(\"Disp\"),\r\n width: 40,\r\n attributes: {\"data-field\": \"DispenserNo\", \"class\": \"tableCellDisabled\"}\r\n },\r\n {\r\n field: \"FuelPositionNo\",\r\n title: localStrings.getLocalizedString(\"Pos\"),\r\n width: 40,\r\n attributes: {\"data-field\": \"FuelPosition\", \"class\": \"tableCellDisabled\"}\r\n },\r\n {\r\n field: \"ProductDescription\",\r\n title: localStrings.getLocalizedString(\"Description\"),\r\n attributes: {\r\n \"data-field\": \"ProductDescription\",\r\n \"class\": \"tableCellDisabled description\"\r\n },\r\n footerTemplate: localStrings.getLocalizedString(\"Totals\")\r\n }\r\n ]\r\n },\r\n {\r\n field: \"RtlPrice\",\r\n width: 80,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"RtlPrice\", \"n3\"),\r\n headerTemplate: \"\" + localStrings.getLocalizedString(\"RetailPrice\") +\"\",\r\n attributes: {\"data-field\": \"RtlPrice\", \"class\": \"k-editable-cell\", \"required\": \"true\"},\r\n hidden: !$scope.appInfo.paperwork.showRetailPrice,\r\n aggregates: [\"sum\"],\r\n footerTemplate: \"
#=sum.toLocaleString('en-US', {minimumFractionDigits: 3})#
\"\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"Dollars\"),\r\n columns: [\r\n {\r\n field: \"EndAmount\",\r\n title: localStrings.getLocalizedString(\"EndingMeter\"),\r\n width: 110,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"EndAmount\", \"n2\"),\r\n attributes: {\"data-field\": \"EndAmount\", \"class\": \"k-editable-cell\", \"required\": \"true\"},\r\n hidden: !$scope.appInfo.paperwork.showEndingDollar\r\n },\r\n {\r\n field: \"NetAmount\",\r\n title: localStrings.getLocalizedString(\"Net\"),\r\n width: 110,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"NetAmount\", \"n2\"),\r\n attributes: {\"data-field\": \"NetAmount\", \"class\": \"k-editable-cell\", \"required\": \"true\"},\r\n hidden: !$scope.appInfo.paperwork.showNetDollars,\r\n aggregates: [\"sum\"],\r\n footerTemplate: \"
#= sum.toLocaleString('en-US', { minimumFractionDigits: 2 })#
\"\r\n }\r\n ]\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"Units\"),\r\n columns: [\r\n {\r\n field: \"EndUnits\",\r\n title: localStrings.getLocalizedString(\"EndingMeter\"),\r\n width: 110,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"EndUnits\", \"n3\"),\r\n attributes: {\"data-field\": \"EndUnits\", \"class\": \"k-editable-cell\", \"required\": \"true\"},\r\n hidden: !$scope.appInfo.paperwork.showEndingUnits\r\n },\r\n {\r\n field: \"NetUnits\",\r\n title: localStrings.getLocalizedString(\"Net\"),\r\n width: 110,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"NetUnits\", \"n3\"),\r\n attributes: {\"data-field\": \"NetUnits\", \"class\": \"k-editable-cell\", \"required\": \"true\"},\r\n hidden: !$scope.appInfo.paperwork.showNetUnits,\r\n aggregates: [\"sum\"],\r\n footerTemplate: \"
#=sum.toLocaleString('en-US', {minimumFractionDigits: 3})#
\"\r\n }\r\n ]\r\n },\r\n {\r\n field: \"CalcPrice\",\r\n width: 110,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"CalcPrice\", \"n3\"),\r\n headerTemplate: \"\" + localStrings.getLocalizedString(\"CalcAvgPrice\") + \"\",\r\n attributes: {\"data-field\": \"CalcPrice\", \"class\": \"tableCellDisabled\"},\r\n hidden: !$scope.appInfo.paperwork.showAvgPrice\r\n },\r\n {\r\n template: \"\",\r\n headerTemplate: \"\" + localStrings.getLocalizedString(\"BeginMeter\") + \"\",\r\n width: 60,\r\n attributes: {\"data-field\": \"BeginMeterBtn\"},\r\n hidden: !$scope.appInfo.paperwork.showBeginMeters\r\n },\r\n {\r\n template: \"\",\r\n headerTemplate: \"\" + localStrings.getLocalizedString(\"PumpTest\") + \"\",\r\n width: 60,\r\n attributes: {\"data-field\": \"PumpTestBtn\"}\r\n }\r\n ],\r\n pageable: false,\r\n sortable: false,\r\n editable: true,\r\n navigatable: true,\r\n scrollable: false,\r\n dataBinding: function (e) {\r\n var current = e.sender.current() || [];\r\n if (current[0]) {\r\n cellIndex = current.index();\r\n rowIndex = current.parent().index();\r\n }\r\n },\r\n dataBound: function (e)\r\n {\r\n $scope.setupMetersRows();\r\n },\r\n edit: function (e)\r\n {\r\n var $input = e.container.find(\"input\");\r\n var fieldName = $input.attr(\"name\");\r\n\r\n // alternative (if you don't have the name attribute in your editable):\r\n // var columnIndex = this.cellIndex(e.container);\r\n // var fieldName = this.thead.find(\"th\").eq(columnIndex).data(\"field\");\r\n\r\n if (!meterGridColIsEditable(fieldName, e.model))\r\n {\r\n $input.prop('readonly', true);\r\n //this.closeCell(); // prevent editing\r\n } else\r\n {\r\n $input.select();\r\n $input.addClass('k-cell-state-selected');\r\n }\r\n\r\n var grid = $(\"#metersGrid\").data(\"kendoGrid\");\r\n var currentCell = $(grid.tbody.children().find(\".k-edit-cell\"));\r\n\r\n grid.current(currentCell);\r\n }\r\n };\r\n };\r\n\r\n function meterGridColIsEditable(fieldName, model)\r\n {\r\n if (fieldName === \"RtlPrice\") {\r\n if (!$scope.appInfo.paperwork.showRetailPrice)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n if (fieldName === \"EndAmount\")\r\n {\r\n if (model.DollarsEndingState !== 1)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n if (fieldName === \"NetAmount\")\r\n {\r\n if (model.DollarsNetState !== 1)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n if (fieldName === \"EndUnits\")\r\n {\r\n if (model.UnitsEndingState !== 1)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n if (fieldName === \"NetUnits\")\r\n {\r\n if (model.UnitsNetState !== 1)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n if (fieldName === \"BeginMeterBtn\")\r\n {\r\n if (model.FuelPositionUnitReading !== 1 && model.FuelPositionDollarReading !== 1)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true; // default to editable\r\n }\r\n\r\n function onGridKeydown(e)\r\n {\r\n if (e.keyCode === kendo.keys.TAB) {\r\n //check for shift key being down\r\n if (e.shiftKey) {\r\n $scope.focusPreviousEditableCell();\r\n }\r\n else {\r\n $scope.focusNextEditableCell();\r\n }\r\n }\r\n }\r\n\r\n $scope.gridInputCellOnBlur = function (dataItem, fieldName)\r\n {\r\n if (fieldName === \"RtlPrice\")\r\n {\r\n $scope.retailChange(dataItem);\r\n }\r\n\r\n if (fieldName === \"EndAmount\")\r\n {\r\n $scope.endAmountChange(dataItem);\r\n }\r\n\r\n if (fieldName === \"NetAmount\")\r\n {\r\n $scope.netAmountChange(dataItem);\r\n }\r\n\r\n if (fieldName === \"EndUnits\")\r\n {\r\n $scope.endUnitsChange(dataItem);\r\n }\r\n\r\n if (fieldName === \"NetUnits\")\r\n {\r\n $scope.netUnitsChange(dataItem);\r\n }\r\n };\r\n\r\n $scope.setupMetersRows = function ()\r\n {\r\n\r\n $(\"#metersGrid tr\").each(function (index, row)\r\n {\r\n\r\n if (index > 1)\r\n { // skip header rows\r\n var dataItem = $(\"#metersGrid\").data(\"kendoGrid\").dataItem(this);\r\n\r\n var $row = $(row);\r\n var $rowColumns = $row.find('td');\r\n\r\n $rowColumns.each(function (index, col)\r\n {\r\n var $col = $(col);\r\n var fieldName = $col.attr('data-field');\r\n if (!meterGridColIsEditable(fieldName, dataItem))\r\n {\r\n $col.addClass(\"tableCellDisabled\");\r\n $col.removeClass(\"k-editable-cell\");\r\n\r\n if (fieldName === \"BeginMeterBtn\")\r\n {\r\n $col.find('i').hide();\r\n }\r\n }\r\n\r\n //setup checkbox columns\r\n /* if (fieldName === \"BeginMeterBtn\") {\r\n $col.on(\"click\", \"input.elecChkBox\", function (e) {\r\n $scope.openBeginMeter(dataItem)\r\n });\r\n }*/\r\n\r\n $scope.setupGridColumnValidationNotificationUI($col);\r\n });\r\n\r\n }\r\n });\r\n };\r\n\r\n $scope.setupMetersGridColumns = function ()\r\n {\r\n\r\n var showDispenserNo = $scope.appInfo.paperwork.meters.some(function (meter)\r\n {\r\n return meter.DispenserNo > 0;\r\n });\r\n\r\n if (!showDispenserNo)\r\n {\r\n $scope.kendo.metersGrid.hideColumn(\"DispenserNo\");\r\n }\r\n\r\n if (!$scope.appInfo.paperwork.showRetailPrice)\r\n {\r\n $scope.kendo.metersGrid.hideColumn(\"RtlPrice\");\r\n }\r\n };\r\n\r\n $scope.$on(\"kendoWidgetCreated\", function (event, widget)\r\n {\r\n\r\n var grid = $(\"#metersGrid\").data(\"kendoGrid\");\r\n\r\n // the event is emitted for every widget; if we have multiple\r\n // widgets in this controller, we need to check that the event\r\n // is for the one we're interested in.\r\n\r\n if (widget === $scope.kendo.metersGrid)\r\n {\r\n grid.dataSource.data($scope.appInfo.paperwork.meters);\r\n $(\"#metersGrid\").find(\"table\").on(\"keydown\", onGridKeydown);\r\n $scope.setupMetersGridColumns();\r\n\r\n $scope.calculatePageTotals();\r\n }\r\n });\r\n\r\n $scope.setupGridColumnValidationNotificationUI = function ($col)\r\n {\r\n\r\n var fieldName = $col.attr('data-field');\r\n\r\n $col.qtip({\r\n id: \"qtip-\" + fieldName,\r\n content: {\r\n text: \"\"\r\n },\r\n position: {\r\n adjust: {\r\n x: -10, y: -10\r\n }\r\n },\r\n style: {\r\n classes: \"toolTipStyle\"\r\n }\r\n });\r\n\r\n $col.qtip('disable', true);\r\n\r\n };\r\n\r\n $scope.processGridColumnValidationNotification = function ($row, fieldName, errorMessages, warningMessages)\r\n {\r\n\r\n var idx = 0;\r\n\r\n var hasErrors = (errorMessages.length > 0);\r\n var hasWarnings = (warningMessages.length > 0);\r\n\r\n var $col = $row.find(\"[data-field='\" + fieldName + \"']\");\r\n\r\n //clear classes\r\n $col.removeClass(\"td-error\");\r\n $col.removeClass(\"td-warning\");\r\n\r\n if (hasErrors || hasWarnings)\r\n {\r\n\r\n var messageList = $(\"
\");\r\n\r\n if (hasErrors)\r\n {\r\n var errorList = $(\"
\" + localStrings.getLocalizedString(\"Error\") + \" :
\");\r\n for (idx = 0; idx < errorMessages.length; idx++)\r\n {\r\n errorList.append(\"
  • \" + errorMessages[idx] + \"
  • \");\r\n }\r\n\r\n messageList.append(errorList);\r\n }\r\n\r\n if (hasWarnings)\r\n {\r\n var warningList = $(\"
    \" + localStrings.getLocalizedString(\"Warning\") + \" :
    \");\r\n for (idx = 0; idx < warningMessages.length; idx++)\r\n {\r\n warningList.append(\"
  • \" + warningMessages[idx] + \"
  • \");\r\n }\r\n\r\n messageList.append(warningList);\r\n }\r\n\r\n $col.qtip('option', 'content.text', messageList);\r\n\r\n if (hasErrors)\r\n {\r\n $col.addClass(\"td-error\");\r\n $col.qtip('option', 'style.classes', 'toolTipStyle-error');\r\n } else\r\n {\r\n $col.addClass(\"td-warning\");\r\n $col.qtip('option', 'style.classes', 'toolTipStyle-warning');\r\n }\r\n\r\n $col.qtip('disable', false);\r\n }\r\n else\r\n {\r\n $col.qtip('disable', true);\r\n }\r\n };\r\n\r\n var meterRowValidation =\r\n {\r\n validator: function (meter, parms)\r\n {\r\n var isValid = true;\r\n\r\n var $row = $(\"#metersGrid\").data(\"kendoGrid\").tbody.find(\"tr[data-uid='\" + meter.uid + \"']\");\r\n \r\n // retail price validation\r\n if ($scope.appInfo.paperwork.showRetailPrice)\r\n {\r\n\r\n var errorRtlPrice = [], warningRtlPrice = [];\r\n \r\n // retail price errors\r\n if ((angular.isUndefinedOrNullOrEmpty(meter.RtlPrice) || meter.RtlPrice === 0) && (meter.NetAmount > 0 && meter.NetUnits > 0))\r\n {\r\n isValid = false;\r\n\r\n errorRtlPrice.push(localStrings.getLocalizedString(\"GTZeroError\"));\r\n }\r\n\r\n // retail price warnings\r\n if ($scope.appInfo.paperwork.showRetailPrice && !angular.isUndefinedOrNullOrEmpty(meter.CalcPrice) && !angular.isUndefinedOrNullOrEmpty(meter.PriorCalcPrice))\r\n {\r\n\r\n var calcTotalSales = (meter.RtlPrice * meter.NetUnits);\r\n\r\n if ((Math.abs(calcTotalSales - meter.NetAmount) > $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance) && calcTotalSales > 0 && meter.NetAmount > 0 && $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance > 0)\r\n {\r\n warningRtlPrice.push(localStrings.getLocalizedString(\"CapturedTotalOutside\"));\r\n }\r\n\r\n if ((Math.abs(meter.RtlPrice - meter.CalcPrice) > $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance) && meter.RtlPrice > 0 && meter.CalcPrice > 0 && $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance > 0)\r\n {\r\n warningRtlPrice.push(localStrings.getLocalizedString(\"CapturedRetailPrice\"));\r\n }\r\n }\r\n\r\n $scope.processGridColumnValidationNotification($row, 'RtlPrice', errorRtlPrice, warningRtlPrice);\r\n }\r\n\r\n //end units validation\r\n var errorEndUnits = [], warningEndUnits = [];\r\n if (meter.EndUnits > 0)\r\n {\r\n if (meter.EndUnits < meter.BeginUnits && $scope.appInfo.paperwork.showBeginMeters)\r\n {\r\n warningEndUnits.push(localStrings.getLocalizedString(\"UnitsRolled\"));\r\n }\r\n if (meter.EndUnits >= $scope.MaxUnits) {\r\n isValid = false;\r\n errorEndUnits.push(localStrings.getLocalizedString(\"UnitsMaxExceeded\"));\r\n }\r\n }\r\n $scope.processGridColumnValidationNotification($row, 'EndUnits', errorEndUnits, warningEndUnits);\r\n\r\n //end amount validation\r\n var errorEndAmount = [], warningEndAmount = [];\r\n if (meter.EndAmount > 0)\r\n {\r\n if (meter.EndAmount < meter.BeginAmount && $scope.appInfo.paperwork.showBeginMeters)\r\n {\r\n warningEndAmount.push(localStrings.getLocalizedString(\"UnitsRolled\"));\r\n }\r\n if (meter.EndAmount >= $scope.MaxUnits) {\r\n isValid = false;\r\n errorEndAmount.push(localStrings.getLocalizedString(\"DollarsMaxExceeded\"));\r\n }\r\n }\r\n $scope.processGridColumnValidationNotification($row, 'EndAmount', errorEndAmount, warningEndAmount);\r\n\r\n //calc price validation\r\n var errorCalcPrice = [], warningCalcPrice = [];\r\n if (!angular.isUndefinedOrNullOrEmpty(meter.CalcPrice) && !angular.isUndefinedOrNullOrEmpty(meter.PriorCalcPrice))\r\n {\r\n if (Math.abs(meter.CalcPrice) >= $scope.MaxUnits || (Math.abs(meter.CalcPrice - meter.PriorCalcPrice) > $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance) && meter.CalcPrice > 0 && meter.PriorCalcPrice > 0 && $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance > 0)\r\n {\r\n warningCalcPrice.push(localStrings.getLocalizedString(\"CalculatedPriceOutside\"));\r\n }\r\n }\r\n $scope.processGridColumnValidationNotification($row, 'CalcPrice', errorCalcPrice, warningCalcPrice);\r\n\r\n return isValid;\r\n }\r\n };\r\n\r\n $scope.validateMeters = function ()\r\n {\r\n\r\n var isValid = true;\r\n\r\n var metersGrid = $(\"#metersGrid\").data(\"kendoGrid\");\r\n\r\n angular.forEach(metersGrid.dataSource.data(), function (meter)\r\n {\r\n isValid = isValid && meterRowValidation.validator(meter);\r\n });\r\n\r\n return isValid;\r\n };\r\n\r\n var newPWBatchLoadedListener = $rootScope.$on('event:NewPaperworkBatchLoaded', function (event, data)\r\n {\r\n if ($scope.locationInfo.sideMenuData.paperwork.meters)\r\n $scope.loadMeters();\r\n else if ($scope.locationInfo.sideMenuData.paperwork.tanks)\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n $scope.goTo(\"/Paperwork/ViewPaperworkTanks/\" + $scope.appInfo.paperwork.paperworkKey);\r\n else\r\n $scope.goTo(\"/Paperwork/EnterPaperworkTanks/\" + $scope.appInfo.paperwork.paperworkKey);\r\n }\r\n else if ($scope.locationInfo.sideMenuData.paperwork.deliveries)\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n $scope.goTo(\"/Paperwork/ViewPaperworkDeliveries/\" + $scope.appInfo.paperwork.paperworkKey);\r\n else\r\n $scope.goTo(\"/Paperwork/EnterPaperworkDeliveries/\" + $scope.appInfo.paperwork.paperworkKey);\r\n }\r\n else\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n $scope.goTo(\"/Paperwork/ViewPaperworkDealerForms/\" + $scope.appInfo.paperwork.paperworkKey);\r\n else\r\n $scope.goTo(\"/Paperwork/EnterPaperworkDealerForms/\" + $scope.appInfo.paperwork.paperworkKey);\r\n }\r\n });\r\n\r\n // $scope $destroy\r\n $scope.$on('$destroy', newPWBatchLoadedListener);\r\n\r\n $scope.loadMeters = function ()\r\n {\r\n $scope = this;\r\n\r\n angular.forEach($scope.appInfo.paperwork.context.paperworkSites, function (site, index)\r\n {\r\n if (site.SiteKey === $scope.appInfo.paperwork.batch.SiteKey)\r\n $scope.appInfo.paperwork.context.selectedSiteObj = site;\r\n });\r\n PaperworkMetersService.loadMetersForEntry(\r\n $scope.appInfo.paperwork.batch.Key,\r\n $scope.appInfo.paperwork.context.selectedSiteObj.PCKey,\r\n $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true)\r\n ).then(function (data)\r\n {\r\n // if(data.count == 0){\r\n // TODO: No meters, do something...\r\n //\r\n // }\r\n $scope.appInfo.paperwork.meters = data.PaperworkMeters;\r\n $scope.appInfo.paperwork.priceToleranceAmount = data.PriceToleranceAmount;\r\n $scope.appInfo.paperwork.showRetailPrice = data.ShowRetailPrice;\r\n $scope.appInfo.paperwork.showEndingDollar = data.ShowEndingDollar;\r\n $scope.appInfo.paperwork.showNetDollars = data.ShowNetDollars;\r\n $scope.appInfo.paperwork.showEndingUnits = data.ShowEndingUnits;\r\n $scope.appInfo.paperwork.showNetUnits = data.ShowNetUnits;\r\n $scope.appInfo.paperwork.showAvgPrice = data.ShowAvgPrice;\r\n $scope.appInfo.paperwork.showBeginMeters = data.ShowBeginMeters;\r\n\r\n $scope.initializeMetersGrid();\r\n\r\n $scope.metersLoaded = true;\r\n\r\n if ($scope.appInfo.paperwork.meters.length > 0) {\r\n $scope.metersEditable = !(($scope.appInfo.paperwork.context.lockPaperworkAfterDru && $scope.appInfo.paperwork.meters[0].DRUPosted) || $scope.appInfo.paperwork.meters[0].Status === 1);\r\n }\r\n\r\n //If entering a new paperwork batch create the default header form in the database\r\n //if (!$scope.appInfo.paperwork.viewOnly && $scope.metersEditable && $scope.appInfo.paperwork.form.PaperworkBatchKey === 0) {\r\n // var paperworkMeterHeader =\r\n // {\r\n // Key: $scope.appInfo.paperwork.meters[0].FuelMtrKey,\r\n // SiteKey: $scope.appInfo.paperwork.batch.SiteKey,\r\n // SiteDesc: $scope.appInfo.paperwork.context.selectedSiteObj.SiteDesc,\r\n // ProfCtrKey: $scope.appInfo.paperwork.context.selectedSiteObj.PCKey,\r\n // PaperworkBatchKey: $scope.appInfo.paperwork.batch.Key,\r\n // PaperworkDate: $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true),\r\n // UserName: $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n // SourceKey: 0,\r\n // Ts: $scope.appInfo.paperwork.meters[0].HeaderTimeStamp,\r\n // AppKey: $scope.locationInfo.sideMenuData.paperwork.meters.Key\r\n // };\r\n\r\n //Pass in default meters data since the grid has not yet been modified\r\n //PaperworkMetersService.savePaperworkMeters(paperworkMeterHeader, $scope.appInfo.paperwork.meters, true);\r\n //}\r\n\r\n //$scope.metersLoaded = true;\r\n });\r\n };\r\n\r\n var PageStage = $rootScope.$on('event:PageStage', function (event, args)\r\n {\r\n if (args === 'DREGM' && !$scope.appInfo.paperwork.viewOnly && $scope.metersEditable && $scope.metersGridDS.hasChanges())\r\n {\r\n $scope.saveMeters('', false, false);\r\n } \r\n });\r\n $scope.$on('$destroy', PageStage);\r\n\r\n $scope.next = function (path)\r\n {\r\n if (!$scope.appInfo.paperwork.viewOnly && $scope.metersEditable && $scope.metersGridDS.hasChanges())\r\n {\r\n $scope.saveMeters(path, false, false);\r\n } else {\r\n $scope.goTo(setupNav.navigateToPage(path, $scope.appInfo.paperwork.apps, $scope.appInfo.paperwork.paperworkKey, $scope.appInfo.paperwork.viewOnly, false));\r\n }\r\n };\r\n\r\n $scope.previous = function (path)\r\n {\r\n if (!$scope.appInfo.paperwork.viewOnly && $scope.metersEditable && $scope.metersGridDS.hasChanges())\r\n {\r\n $scope.saveMeters(path, false, false, true);\r\n } else {\r\n $scope.goTo(setupNav.navigateToPage(path, $scope.appInfo.paperwork.apps, $scope.appInfo.paperwork.paperworkKey, $scope.appInfo.paperwork.viewOnly, true));\r\n }\r\n };\r\n\r\n $scope.close = function ()\r\n {\r\n if (!$scope.appInfo.paperwork.viewOnly && $scope.metersEditable)\r\n {\r\n $scope.saveMeters(\"\", false, false);\r\n } else\r\n {\r\n $scope.goTo(\"/Paperwork/EnterPaperwork/\");\r\n }\r\n\r\n };\r\n\r\n $scope.submit = function ()\r\n {\r\n $scope.submitClicked = true;\r\n $scope.saveMeters(\"\", true, false);\r\n };\r\n\r\n $scope.processSubmit = function (submit, skipNav) {\r\n\r\n var submitPaperworkCmdParms =\r\n {\r\n SiteKey: $scope.appInfo.paperwork.batch.SiteKey,\r\n PaperworkDate: $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true),\r\n EmailAddress: $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n SubmitPaperwork: submit,\r\n PreviouslySubmitted: $scope.appInfo.paperwork.batch.HasBeenSubmitted\r\n };\r\n\r\n PaperworkService.GetPaperworkBatchErrorWarning(submitPaperworkCmdParms).then(function (data) {\r\n //If warnings - show confirm dialog\r\n if (data.HasWarnings) {\r\n if (!angular.isUndefinedOrNullOrEmpty(data.Warnings[0])) {\r\n $scope.notifier.show(data.Warnings[0], \"warning\");\r\n\r\n var yes = function () {\r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data) {\r\n if (submit && !skipNav)\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n });\r\n };\r\n\r\n $scope.modalifier.confirm(data.Warnings[0] + \"
    \" + localStrings.getLocalizedString(\"WishToContinue\"), yes);\r\n }\r\n }\r\n else { \r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data) {\r\n if (submit && !skipNav)\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n });\r\n }\r\n });\r\n };\r\n\r\n $scope.submitPaperwork = function (submit, skipNav)\r\n {\r\n var fuelMetersAppInfo = $scope.appInfo.paperwork.apps[0];\r\n\r\n //If we have fuelMeters and fuelMeters are required, but not saved; then throw error\r\n if (fuelMetersAppInfo.HasData === 0 && fuelMetersAppInfo.IsRequired !== 0)\r\n {\r\n $timeout(function () {\r\n $scope.modalifier.showSavedError();\r\n }, 100);\r\n return;\r\n }\r\n\r\n $scope.processSubmit(submit, skipNav);\r\n };\r\n\r\n $scope.saveMeters = function (path, submit, close, isPrevious, skipNav)\r\n {\r\n if (!$scope.validateMeters()) {\r\n return;\r\n }\r\n \r\n $scope.resetDirtyFlags($scope.metersForm);\r\n isPrevious = isPrevious ? isPrevious: false;\r\n skipNav = skipNav ? skipNav : false;\r\n\r\n var paperworkMeterHeader =\r\n {\r\n Key: $scope.appInfo.paperwork.meters[0].FuelMtrKey,\r\n SiteKey: $scope.appInfo.paperwork.batch.SiteKey,\r\n SiteDesc: $scope.appInfo.paperwork.context.selectedSiteObj.SiteDesc,\r\n ProfCtrKey: $scope.appInfo.paperwork.context.selectedSiteObj.PCKey,\r\n PaperworkBatchKey: $scope.appInfo.paperwork.batch.Key,\r\n PaperworkDate: $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true),\r\n UserName: $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n SourceKey: 0,\r\n Ts: $scope.appInfo.paperwork.meters[0].HeaderTimeStamp,\r\n AppKey: $scope.locationInfo.sideMenuData.paperwork.meters.Key\r\n };\r\n\r\n angular.copy($scope.metersGridDS.data().toJSON(), $scope.appInfo.paperwork.meters);\r\n\r\n // Call these functions to translate the french numeric value to a actual number value.\r\n PaperworkMetersService.updateMeters($scope.appInfo.paperwork.meters);\r\n \r\n PaperworkMetersService.savePaperworkMeters(paperworkMeterHeader, $scope.appInfo.paperwork.meters).then(function (data) {\r\n var grid = $(\"#metersGrid\").data(\"kendoGrid\");\r\n $scope.appInfo.paperwork.meters = data.PaperworkMeters;\r\n if (grid) {\r\n grid.dataSource.data(data.PaperworkMeters);\r\n\r\n $scope.validateMeters(); // call validate to re add any warnings after save\r\n }\r\n\r\n $scope.appInfo.paperwork.apps[0].HasData = -1;\r\n\r\n if (submit) {\r\n $scope.submitPaperwork(true, skipNav);\r\n return;\r\n }\r\n if (close) {\r\n $scope.submitPaperwork(false, skipNav);\r\n return;\r\n }\r\n if (path.length > 0){\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, false, isPrevious));\r\n }\r\n });\r\n };\r\n\r\n $scope.retailChange = function (dataItem)\r\n {\r\n PaperworkMetersService.netAmountCalc(dataItem);\r\n PaperworkMetersService.calcPerUnit(dataItem,\r\n $scope.appInfo.paperwork.priceToleranceAmount,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceToRetail,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceOverDay);\r\n $scope.calculatePageTotals();\r\n };\r\n\r\n $scope.endAmountChange = function (dataItem)\r\n {\r\n PaperworkMetersService.calculateNetAmountFromEnd(dataItem);\r\n PaperworkMetersService.calcPerUnit(dataItem,\r\n $scope.appInfo.paperwork.priceToleranceAmount,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceToRetail,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceOverDay,\r\n $scope.appInfo.paperwork.showRetailPrice);\r\n $scope.calculatePageTotals();\r\n };\r\n\r\n $scope.netAmountChange = function (dataItem)\r\n {\r\n PaperworkMetersService.calcPerUnit(dataItem,\r\n $scope.appInfo.paperwork.priceToleranceAmount,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceToRetail,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceOverDay,\r\n $scope.appInfo.paperwork.showRetailPrice);\r\n $scope.calculatePageTotals();\r\n };\r\n\r\n $scope.netUnitsChange = function (dataItem)\r\n {\r\n PaperworkMetersService.netAmountCalc(dataItem);\r\n PaperworkMetersService.calcPerUnit(dataItem,\r\n $scope.appInfo.paperwork.priceToleranceAmount,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceToRetail,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceOverDay,\r\n $scope.appInfo.paperwork.showRetailPrice);\r\n $scope.calculatePageTotals();\r\n };\r\n\r\n $scope.endUnitsChange = function (dataItem)\r\n {\r\n PaperworkMetersService.calculateNetUnitsFromEnd(dataItem);\r\n PaperworkMetersService.netAmountCalc(dataItem);\r\n PaperworkMetersService.calcPerUnit(dataItem,\r\n $scope.appInfo.paperwork.priceToleranceAmount,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceToRetail,\r\n $scope.appInfo.paperwork.siteInfo.CheckAveragePriceOverDay,\r\n $scope.appInfo.paperwork.showRetailPrice);\r\n $scope.calculatePageTotals();\r\n };\r\n\r\n $scope.calculatePageTotals = function ()\r\n {\r\n var metersGrid = $(\"#metersGrid\").data(\"kendoGrid\");\r\n\r\n $scope.appInfo.paperwork.totalAmount = PaperworkMetersService.calculatePageAmountTotals(metersGrid.dataSource.data());\r\n $scope.appInfo.paperwork.totalUnits = PaperworkMetersService.calculatePageUnitTotals(metersGrid.dataSource.data());\r\n\r\n // update the grid and make sure it has the latest data\r\n metersGrid.dataSource.data(metersGrid.dataSource.data());\r\n };\r\n\r\n $scope.focusNextEditableCell = function () {\r\n var metersGrid = $(\"#metersGrid\").data(\"kendoGrid\");\r\n\r\n if (!isNaN(cellIndex)) {\r\n var current = metersGrid.current(metersGrid.tbody.children().eq(rowIndex).children().eq(cellIndex));\r\n\r\n rowIndex = cellIndex = null;\r\n \r\n if (current.hasClass(\"k-editable-cell\"))\r\n {\r\n var nextCell = current.nextAll(\".k-editable-cell\");\r\n if (!nextCell[0])\r\n {\r\n //search the next row\r\n nextCell = current.parent().next().children(\".k-editable-cell:first\");\r\n }\r\n metersGrid.current(nextCell);\r\n metersGrid.editCell(nextCell[0]);\r\n }\r\n }\r\n };\r\n\r\n $scope.focusPreviousEditableCell = function () {\r\n var metersGrid = $(\"#metersGrid\").data(\"kendoGrid\");\r\n\r\n if (!isNaN(cellIndex)) {\r\n var current = metersGrid.current(metersGrid.tbody.children().eq(rowIndex).children().eq(cellIndex));\r\n\r\n rowIndex = cellIndex = null;\r\n\r\n if (current.hasClass(\"k-editable-cell\")) {\r\n var nextCell = current.prevAll(\".k-editable-cell\");\r\n if (!nextCell[0]) {\r\n //search the previous row\r\n nextCell = current.parent().prev().children(\".k-editable-cell:last\");\r\n }\r\n metersGrid.current(nextCell);\r\n metersGrid.editCell(nextCell[0]);\r\n }\r\n }\r\n };\r\n\r\n $scope.openBeginMeter = function (dataItem)\r\n {\r\n \r\n $scope.modalInfo.dataItem = dataItem;\r\n $scope.modalInfo.beginAmount = dataItem.BeginAmount;\r\n $scope.modalInfo.beginUnits = dataItem.BeginUnits;\r\n $scope.modalInfo.useBeginUnits = (dataItem.FuelPositionUnitReading === 1);\r\n $scope.modalInfo.useBeginAmount = (dataItem.FuelPositionDollarReading === 1);\r\n $scope.modalInfo.type = 0;\r\n $scope.modalInfo.header = localStrings.getLocalizedString(\"BeginMeter\");\r\n $scope.modalInfo.shown = true;\r\n };\r\n\r\n $scope.openPumpTest = function (dataItem)\r\n {\r\n $scope.modalInfo.dataItem = dataItem;\r\n $scope.modalInfo.beginAmount = dataItem.TestAmount;\r\n $scope.modalInfo.beginUnits = dataItem.TestUnits;\r\n $scope.modalInfo.useBeginUnits = true;\r\n $scope.modalInfo.useBeginAmount = true;\r\n $scope.modalInfo.type = 1;\r\n $scope.modalInfo.header = localStrings.getLocalizedString(\"PumpTest\");\r\n $scope.modalInfo.shown = true;\r\n };\r\n\r\n $scope.saveModalValues = function ()\r\n {\r\n if ($scope.modalInfo.beginAmount < 0 || $scope.modalInfo.beginUnits < 0)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"GTZeroError2\"), 'error');\r\n return;\r\n }\r\n if ($scope.modalInfo.beginUnits >= $scope.MaxUnits) {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"UnitsMaxExceeded\"), 'error');\r\n return;\r\n }\r\n if ($scope.modalInfo.beginAmount >= $scope.MaxUnits) {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"DollarsMaxExceeded\"), 'error');\r\n return;\r\n }\r\n\r\n switch ($scope.modalInfo.type)\r\n {\r\n case 0:\r\n $scope.modalInfo.dataItem.BeginAmountOverride =\r\n ($scope.modalInfo.dataItem.BeginAmount === $scope.modalInfo.beginAmount);\r\n $scope.modalInfo.dataItem.BeginAmount = $scope.modalInfo.beginAmount;\r\n $scope.modalInfo.dataItem.BeginUnitsOverride =\r\n ($scope.modalInfo.dataItem.BeginUnits === $scope.modalInfo.beginUnits);\r\n $scope.modalInfo.dataItem.BeginUnits = $scope.modalInfo.beginUnits;\r\n $scope.endAmountChange($scope.modalInfo.dataItem);\r\n $scope.endUnitsChange($scope.modalInfo.dataItem);\r\n break;\r\n\r\n case 1:\r\n $scope.modalInfo.dataItem.TestAmount = $scope.modalInfo.beginAmount;\r\n $scope.modalInfo.dataItem.TestUnits = $scope.modalInfo.beginUnits;\r\n $scope.calculatePageTotals();\r\n break;\r\n }\r\n\r\n // Need to do this so our prompt/change detector knows we made a change to form\r\n var metersGrid = $(\"#metersGrid\").data(\"kendoGrid\");\r\n\r\n if (!isNaN(cellIndex)) {\r\n var current = metersGrid.current(metersGrid.tbody.children().eq(rowIndex).children().eq(cellIndex));\r\n\r\n rowIndex = cellIndex = null;\r\n current[0].classList.add(\"k-dirty-cell\");\r\n }\r\n\r\n $scope.modalInfo = {};\r\n $scope.modalInfo.shown = false;\r\n };\r\n })\r\n .controller('enterPaperworkTanksCtrl', function ($scope, $rootScope, $routeParams, PaperworkService, $filter, $timeout, PaperworkTanksService,\r\n $location, WebFunctions, validatorSvc, templates, localStrings, globalizationSvc, setupNav)\r\n {\r\n 'use strict';\r\n\r\n $scope.kendo = {};\r\n\r\n $scope.appInfo.paperwork.paperworkKey = 0;\r\n $scope.modalInfo = {};\r\n $scope.tanksLoaded = false;\r\n $scope.postedReadingsExist = false;\r\n\r\n // controller destructor\r\n $scope.$on(\"$destroy\", function handler()\r\n {\r\n $rootScope.scopesToValidate = [];\r\n });\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n $scope.appInfo = $scope.appInfo || {};\r\n\r\n $scope.appInfo.paperwork.viewOnly = $location.$$path.indexOf('/ViewPaperworkTanks/') > -1;\r\n if ($routeParams.paperworkKey)\r\n {\r\n $scope.appInfo.paperwork.paperworkKey = $routeParams.paperworkKey;\r\n }\r\n $scope.appInfo.paperwork.NewOSComments = '';\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaperworkSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = '1';\r\n $scope.appInfo.paperwork.batch = {};\r\n $scope.appInfo.paperwork.tanks = [];\r\n $scope.appInfo.paperwork.postedTanks = [];\r\n\r\n if (!$scope.appInfo.paperwork.context)\r\n {\r\n PaperworkService.getPaperworkContext($scope.appInfo.webUser.CurrentAuthorization.CustContKey, true).then(\r\n function (data)\r\n {\r\n $scope.appInfo.paperwork.context = {};\r\n $scope.appInfo.paperwork.context.paperworkSites = data.PaperworkSites;\r\n $scope.appInfo.paperwork.context.selectedSite = data.SelectedSiteKey;\r\n $scope.appInfo.paperwork.context.lockPaperworkAfterDru = data.LockPaperworkAfterDru;\r\n\r\n $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance = data.CalculatedPriceToPriorDaysPriceVariance;\r\n $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance = data.CalculatedPriceToCapturedRetailPriceVariance;\r\n $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance = data.NetSalesDollarsToCapturedRetailPriceNetUnitsVariance;\r\n\r\n $scope.locationInfo.showEnterPaperworkMenuItem = $scope.appInfo.paperwork.context.paperworkSites[0] ?\r\n $scope.appInfo.paperwork.context.paperworkSites[0].CanEnterPaperwork :\r\n false;\r\n\r\n if (!$scope.locationInfo.showEnterPaperworkMenuItem)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n }\r\n }\r\n );\r\n }\r\n\r\n if ($scope.appInfo.paperwork.paperworkKey > 0)\r\n {\r\n //We are loading a known existing paperwork batch\r\n PaperworkService.OpenPaperworkBatchByKey(\r\n $scope.appInfo.paperwork.paperworkKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.Id,\r\n $scope.appInfo.paperwork.viewOnly\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.paperwork.batch = data.PaperworkBatch.PaperworkBatch;\r\n $scope.appInfo.paperwork.apps = data.PaperworkBatch.PaperworkApps;\r\n $scope.appInfo.paperwork.form = data.PaperworkBatch.PaperworkForm;\r\n $scope.appInfo.paperwork.siteInfo = data.PaperworkBatch.PaperworkSiteInfo;\r\n\r\n // resolve if this is the first or last page\r\n var res = setupNav.firstLastPage('DREGS',$scope.appInfo.paperwork.apps);\r\n $scope.locationInfo.sideMenuData.isFirstPage = res.isFirstPage;\r\n $scope.locationInfo.sideMenuData.isLastPage = res.isLastPage;\r\n\r\n $rootScope.$broadcast('event:PaperworkLoaded', $scope.appInfo.paperwork.viewOnly, $scope.appInfo.paperwork.paperworkKey);\r\n\r\n var nextApp = true;\r\n angular.forEach($scope.appInfo.paperwork.apps, function (app, index)\r\n {\r\n if (app.MenuCode === 'DREGS')\r\n {\r\n $scope.loadTanks(false);\r\n nextApp = false;\r\n }\r\n });\r\n if (nextApp)\r\n {\r\n $scope.goTo(setupNav.navigateToPage('DREGS',$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, $scope.appInfo.paperwork.viewOnly, false));\r\n }\r\n }, function ()\r\n {\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n });\r\n } else\r\n {\r\n //todo: goback...\r\n }\r\n $scope.locationInfo.sideMenuData.pwSubMenu = '2';\r\n $scope.appInfo.paperwork.tankIndex = 0;\r\n };\r\n\r\n var newPWBatchLoadedListener = $rootScope.$on('event:NewPaperworkBatchLoaded', function (event, data)\r\n {\r\n if ($scope.locationInfo.sideMenuData.paperwork.tanks)\r\n $scope.loadTanks(false);\r\n else\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n $scope.goTo(\"/Paperwork/ViewPaperworkDeliveries/\" + $scope.appInfo.paperwork.paperworkKey);\r\n else\r\n $scope.goTo(\"/Paperwork/EnterPaperworkDeliveries/\" + $scope.appInfo.paperwork.paperworkKey);\r\n }\r\n });\r\n\r\n // $scope $destroy\r\n $scope.$on('$destroy', newPWBatchLoadedListener);\r\n\r\n var gridColEditorInput = function (container, options)\r\n {\r\n var fieldName = \"'\" + options.field + \"'\";\r\n\r\n var required = $(container).attr('required'); // field is required\r\n\r\n // For some browsers, `attr` is undefined; for others,\r\n // `attr` is false. Check for both.\r\n if (typeof required !== typeof undefined && required !== false)\r\n {\r\n $('')\r\n .appendTo(container)\r\n .kendoNumericTextBox({\r\n decimals: 2,\r\n format: \"#\",\r\n max: 100000000,\r\n min: 0,\r\n spinners: false,\r\n selectOnFocus: true\r\n });\r\n } else\r\n {\r\n $('')\r\n .appendTo(container)\r\n .kendoNumericTextBox({\r\n decimals: 2,\r\n format: \"#\",\r\n max: 100000000,\r\n min: 0,\r\n spinners: false,\r\n selectOnFocus: true\r\n });\r\n }\r\n\r\n };\r\n\r\n var gridColNumber = function (field, format)\r\n {\r\n return '';\r\n };\r\n\r\n var partialUnitsEditor = function (container, options)\r\n {\r\n $(\"\")\r\n\r\n .appendTo(container)\r\n .kendoComboBox({\r\n id: \"partialUnits\",\r\n dataSource: {\r\n data: $scope.appInfo.paperwork.partialUnits\r\n },\r\n filter: \"contains\",\r\n dataTextField: localStrings.getLocalizedString(\"Key\"),\r\n dataValueField: \"Value\",\r\n change: function (e)\r\n {\r\n\r\n var selectionElement = $(e.sender.element[0]).parent().find(\".k-dropdown-wrap\");\r\n\r\n // check if valid\r\n if ($(e.sender.element[0]).hasClass(\"k-invalid\"))\r\n {\r\n selectionElement.addClass(\"k-selection-invalid\");\r\n } else\r\n {\r\n selectionElement.removeClass(\"k-selection-invalid\");\r\n\r\n var grid = $(\"#tanksGrid\").data(\"kendoGrid\");\r\n\r\n var selectedRow = $(\".k-grid-edit-row\");\r\n //Get the item from the grid\r\n var selectedRowData = grid.dataItem(selectedRow);\r\n\r\n if (options.field === \"PartialUnits\")\r\n {\r\n $scope.calculateTankValues(selectedRowData);\r\n } else\r\n {\r\n $scope.calculateWaterVolumeValues(selectedRowData);\r\n }\r\n }\r\n\r\n if (this.value() && this.selectedIndex === -1)\r\n {\r\n this.value('');\r\n this._filterSource({\r\n value: \"\",\r\n field: this.options.dataTextField,\r\n operator: \"contains\"\r\n });\r\n return;\r\n }\r\n },\r\n select: function (e)\r\n {\r\n\r\n var dataItem = this.dataItem(e.item.index());\r\n }\r\n });\r\n\r\n $('').appendTo(container);\r\n\r\n };\r\n\r\n function getPartialDescFromValue(dataItem)\r\n {\r\n return $scope.appInfo.paperwork.partialUnits.find({Value: dataItem.PartialUnits}).Key;\r\n }\r\n\r\n //If No Reading checkbox is selected ,set fields to 0\r\n $scope.noReadingChkClick = function (dataItem) {\r\n var modelRow = $(\"#tanksGrid\").data(\"kendoGrid\").dataSource.getByUid(dataItem.uid);\r\n\r\n if (!dataItem.NoReading) { \r\n modelRow.set('NoReading', true);\r\n modelRow.set('LargeUnits', 0);\r\n modelRow.set('SmallUnits', 0);\r\n modelRow.set('Quantity', 0);\r\n modelRow.set('WaterSmallUnit', 0);\r\n modelRow.set('WaterQuantity', 0);\r\n }\r\n };\r\n\r\n $scope.initializeTanksGrid = function ()\r\n {\r\n\r\n $scope.tanksGridDS = new kendo.data.DataSource({\r\n schema: {\r\n model: {\r\n fields: {\r\n TankNo: {type: \"number\", editable: false},\r\n ProductId: {type: \"string\", editable: false},\r\n ProductDescription: {type: \"string\", editable: false},\r\n NoReading: {type: \"boolean\"},\r\n LargeUnits: {type: \"number\"},\r\n SmallUnits: {type: \"number\"},\r\n PartialUnits: {type: \"number\"},\r\n Quantity: {type: \"number\"},\r\n WaterSmallUnits: {type: \"number\"},\r\n WaterPartialUnits: {type: \"number\"},\r\n WaterQuantity: {type: \"number\"},\r\n Temperature: {type: \"number\"},\r\n NetQuantity: {type: \"number\"},\r\n Electronic: {type: \"boolean\"},\r\n Depth: {type: \"number\"}\r\n }\r\n }\r\n },\r\n data: $scope.appInfo.paperwork.tanks,\r\n batch: true\r\n });\r\n\r\n $scope.tanksGridOptions = {\r\n dataSource: $scope.tanksGridDS,\r\n columns: [\r\n {\r\n title: localStrings.getLocalizedString(\"Tanks\"),\r\n columns: [\r\n {\r\n field: \"TankNo\",\r\n title: localStrings.getLocalizedString(\"No\"),\r\n width: 40,\r\n attributes: {\"data-field\": \"TankNo\", \"class\": \"tableCellDisabled\"},\r\n template: \"#=TankNo#\"\r\n },\r\n {\r\n field: \"ProductId\",\r\n title: localStrings.getLocalizedString(\"Product\"),\r\n width: 65,\r\n attributes: {\"data-field\": \"ProductId\", \"class\": \"tableCellDisabled description\"},\r\n template: \"#=ProductId#\"\r\n },\r\n {\r\n field: \"ProductDescription\",\r\n title: localStrings.getLocalizedString(\"Description\"),\r\n attributes: {\r\n \"data-field\": \"ProductDescription\",\r\n \"class\": \"tableCellDisabled description\"\r\n },\r\n template: \"#=ProductDescription#\" \r\n }\r\n ]\r\n },\r\n {\r\n field: \"NoReading\",\r\n width: 40,\r\n template: \"\",\r\n headerTemplate: \"\" + localStrings.getLocalizedString(\"NoRdg\") + \"\",\r\n attributes: {\"data-field\": \"NoReading\", \"class\": \"k-editable-cell grid-checkbox\", \"ng-click\":\"noReadingChkClick(dataItem);\"}\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"Fuel\"),\r\n columns: [\r\n {\r\n field: \"LargeUnits\",\r\n width: 50,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"LargeUnits\", \"n2\"),\r\n headerTemplate: \"ft.m.\",\r\n attributes: {\"data-field\": \"LargeUnits\", \"class\": \"k-editable-cell\"}\r\n },\r\n {\r\n field: \"SmallUnits\",\r\n width: 50,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"SmallUnits\", \"n2\"),\r\n headerTemplate: \"in.cm.\",\r\n attributes: {\"data-field\": \"SmallUnits\", \"class\": \"k-editable-cell\"}\r\n },\r\n {\r\n field: \"PartialUnits\",\r\n title: localStrings.getLocalizedString(\"Partial\"),\r\n width: 70,\r\n editor: partialUnitsEditor,\r\n template: function (dataItem)\r\n {\r\n return getPartialDescFromValue(dataItem);\r\n },\r\n attributes: {\"data-field\": \"PartialUnits\", \"class\": \"k-editable-cell\"}\r\n },\r\n {\r\n field: \"Quantity\",\r\n title: localStrings.getLocalizedString(\"Qty\"),\r\n width: 120,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"Quantity\", \"n2\"),\r\n attributes: {\"data-field\": \"Quantity\", \"class\": \"k-editable-cell\"}\r\n }\r\n ]\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"Water\"),\r\n columns: [\r\n {\r\n field: \"WaterSmallUnits\",\r\n width: 50,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"WaterSmallUnits\", \"n\"),\r\n headerTemplate: \"in.cm.\",\r\n attributes: {\"data-field\": \"WaterSmallUnits\", \"class\": \"k-editable-cell\"}\r\n },\r\n {\r\n field: \"WaterPartialUnits\", title: localStrings.getLocalizedString(\"Partial\"), width: 70, editor: partialUnitsEditor,\r\n template: function (dataItem)\r\n {\r\n return getPartialDescFromValue(dataItem);\r\n },\r\n attributes: {\"data-field\": \"WaterPartialUnits\", \"class\": \"k-editable-cell\"}\r\n },\r\n {\r\n field: \"WaterQuantity\",\r\n title: localStrings.getLocalizedString(\"Qty\"),\r\n width: 120,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"WaterQuantity\", \"n2\"),\r\n attributes: {\"data-field\": \"WaterQuantity\", \"class\": \"k-editable-cell\"}\r\n }\r\n ]\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"TempCorrection\"),\r\n columns: [\r\n {\r\n field: \"Temperature\",\r\n width: 50,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"Temperature\", \"n\"),\r\n headerTemplate: \"°F°C\",\r\n attributes: {\"data-field\": \"Temperature\", \"class\": \"k-editable-cell\"}\r\n },\r\n {\r\n field: \"NetQuantity\",\r\n title: localStrings.getLocalizedString(\"Net\"),\r\n width: 50,\r\n editor: gridColEditorInput,\r\n template: gridColNumber(\"NetQuantity\", \"n2\"),\r\n attributes: {\"data-field\": \"NetQuantity\", \"class\": \"k-editable-cell\"}\r\n }\r\n ]\r\n },\r\n {\r\n field: \"Electronic\",\r\n width: 40,\r\n template: \"\",\r\n headerTemplate: \"\" + localStrings.getLocalizedString(\"ElectRdg\") + \"\",\r\n attributes: {\"data-field\": \"Electronic\", \"class\": \"k-editable-cell grid-checkbox\"}\r\n }\r\n\r\n ],\r\n pageable: false,\r\n sortable: false,\r\n editable: true,\r\n scrollable: false,\r\n navigatable: true,\r\n dataBound: function (e)\r\n {\r\n $timeout(function ()\r\n {\r\n $scope.setupTankRows();\r\n },100);\r\n\r\n },\r\n edit: function (e)\r\n {\r\n var $input;\r\n if (e.container.find(\"input\").length > 1) {\r\n $input = e.container.find(\"input.k-input\").last(); // find(\"input\") returns two input elements which causes issue.\r\n }\r\n else {\r\n $input = e.container.find(\"input\");\r\n }\r\n var fieldName = $input.attr(\"name\");\r\n\r\n $input.select();\r\n $input.addClass('k-cell-state-selected');\r\n \r\n var grid = $(\"#tanksGrid\").data(\"kendoGrid\");\r\n var currentCell = $(grid.tbody.children().find(\".k-edit-cell\"));\r\n\r\n grid.current(currentCell);\r\n }\r\n\r\n };\r\n }; \r\n \r\n $scope.$on(\"kendoWidgetCreated\", function (event, widget)\r\n {\r\n\r\n var grid = $(\"#tanksGrid\").data(\"kendoGrid\");\r\n\r\n // the event is emitted for every widget; if we have multiple\r\n // widgets in this controller, we need to check that the event\r\n // is for the one we're interested in.\r\n\r\n if (widget === $scope.kendo.tanksGrid)\r\n {\r\n grid.dataSource.data($scope.appInfo.paperwork.tanks);\r\n\r\n $(\"#tanksGrid\").find(\"table\").on(\"keydown\", onGridKeydown);\r\n\r\n $scope.setupTankGridColumns(grid);\r\n\r\n }\r\n });\r\n \r\n $scope.setupTankRows = function ()\r\n {\r\n\r\n $(\"#tanksGrid tr\").each(function (index, row)\r\n {\r\n\r\n if (index > 1)\r\n { // skip header rows\r\n var dataItem = $(\"#tanksGrid\").data(\"kendoGrid\").dataItem(this);\r\n\r\n var $row = $(row);\r\n var $rowColumns = $row.find('td');\r\n\r\n $rowColumns.each(function (index, col)\r\n {\r\n var $col = $(col);\r\n var fieldName = $col.attr('data-field');\r\n var $inputElm;\r\n\r\n $scope.setupGridColumnValidationNotificationUI($col);\r\n\r\n //setup checkbox columns\r\n if (fieldName === \"Electronic\")\r\n {\r\n //check to see if grid is editable\r\n if ($(\"#tanksGrid\").attr(\"k-editable\") === \"false\")\r\n {\r\n $col.removeClass(\"k-editable-cell\");\r\n\r\n $inputElm = $col.find(\"input\");\r\n $inputElm.attr(\"disabled\", true);\r\n\r\n } else\r\n {\r\n $col.on(\"change\", \"input.elecChkBox\", function (e)\r\n {\r\n var grid = $(\"#tanksGrid\").data(\"kendoGrid\"),\r\n dataItem = grid.dataItem($(e.target).closest(\"tr\"));\r\n\r\n dataItem.set(\"Electronic\", this.checked);\r\n });\r\n }\r\n }\r\n\r\n if (fieldName === \"NoReading\")\r\n {\r\n //check to see if grid is editable\r\n if ($(\"#tanksGrid\").attr(\"k-editable\") === \"false\")\r\n {\r\n $col.removeClass(\"k-editable-cell\");\r\n\r\n $inputElm = $col.find(\"input\");\r\n $inputElm.attr(\"disabled\", true);\r\n\r\n } else\r\n {\r\n $col.on(\"change\", \"input.noReadChkBox\", function (e)\r\n {\r\n var grid = $(\"#tanksGrid\").data(\"kendoGrid\"),\r\n dataItem = grid.dataItem($(e.target).closest(\"tr\"));\r\n\r\n });\r\n }\r\n }\r\n });\r\n\r\n }\r\n });\r\n };\r\n\r\n function onGridKeydown(e)\r\n {\r\n if (e.keyCode === kendo.keys.TAB)\r\n {\r\n var grid = $(\"#tanksGrid\").data(\"kendoGrid\");\r\n\r\n var current = grid.current();\r\n\r\n if (!current.hasClass(\"k-editable-cell\"))\r\n {\r\n var nextCell = current.nextAll(\".k-editable-cell\");\r\n if (!nextCell[0])\r\n {\r\n //search the next row\r\n var nextRow = current.parent().next();\r\n nextCell = current.parent().next().children(\".k-editable-cell:first\");\r\n }\r\n grid.current(nextCell);\r\n grid.editCell(nextCell[0]);\r\n }\r\n }\r\n }\r\n\r\n $scope.setupTankGridColumns = function (grid) {\r\n\r\n if (!($scope.appInfo.paperwork.useLargeUnits && !$scope.appInfo.paperwork.quantityOnly)) {\r\n grid.hideColumn(\"LargeUnits\");\r\n }\r\n\r\n if ($scope.appInfo.paperwork.quantityOnly) {\r\n grid.hideColumn(\"SmallUnits\");\r\n grid.hideColumn(\"PartialUnits\");\r\n }\r\n\r\n if (!($scope.appInfo.paperwork.trackWaterLevels && !$scope.appInfo.paperwork.quantityOnly)) {\r\n grid.hideColumn(\"WaterSmallUnits\");\r\n grid.hideColumn(\"WaterPartialUnits\");\r\n }\r\n\r\n if (!$scope.appInfo.paperwork.trackWaterLevels) {\r\n grid.hideColumn(\"WaterQuantity\");\r\n }\r\n\r\n if (!$scope.appInfo.paperwork.useTempCorrections) {\r\n grid.hideColumn(\"Temperature\");\r\n grid.hideColumn(\"NetQuantity\");\r\n }\r\n\r\n };\r\n\r\n $scope.gridInputCellOnBlur = function (dataItem, fieldName)\r\n {\r\n if (fieldName === \"LargeUnits\")\r\n {\r\n dataItem.LargeUnits = (!dataItem.LargeUnits || dataItem.LargeUnits === \"\") ? 0 : dataItem.LargeUnits;\r\n $scope.calculateTankValues(dataItem);\r\n }\r\n\r\n if (fieldName === \"SmallUnits\")\r\n {\r\n dataItem.SmallUnits = (!dataItem.SmallUnits || dataItem.SmallUnits === \"\") ? 0 : dataItem.SmallUnits;\r\n $scope.calculateTankValues(dataItem);\r\n }\r\n\r\n if (fieldName === \"Quantity\")\r\n {\r\n dataItem.Quantity = (!dataItem.Quantity || dataItem.Quantity === \"\") ? 0 : dataItem.Quantity;\r\n $scope.calculateVolumeForTemperature(dataItem);\r\n }\r\n\r\n if (fieldName === \"WaterSmallUnits\") \r\n {\r\n dataItem.WaterSmallUnits = (!dataItem.WaterSmallUnits || dataItem.WaterSmallUnits === \"\") ? 0 : dataItem.WaterSmallUnits;\r\n $scope.calculateWaterVolumeValues(dataItem);\r\n }\r\n\r\n if (fieldName === \"WaterQuantity\")\r\n {\r\n dataItem.WaterQuantity = (!dataItem.WaterQuantity || dataItem.WaterQuantity === \"\") ? 0 : dataItem.WaterQuantity;\r\n $scope.calculateVolumeForTemperature(dataItem);\r\n }\r\n\r\n if (fieldName === \"Temperature\")\r\n {\r\n dataItem.Temperature = (!dataItem.Temperature || dataItem.Temperature === \"\") ? 0 : dataItem.Temperature;\r\n $scope.calculateVolumeForTemperature(dataItem);\r\n }\r\n\r\n\r\n };\r\n\r\n $scope.calculateTankValues = function (dataItem)\r\n {\r\n var modelRow = $(\"#tanksGrid\").data(\"kendoGrid\").dataSource.getByUid(dataItem.uid); \r\n\r\n if (dataItem.LargeUnits !== 0 || dataItem.SmallUnits !== 0 || dataItem.Quantity !== 0 || dataItem.WaterSmallUnits !== 0 || dataItem.WaterQuantity !== 0 || dataItem.Temperature !== 0) {\r\n modelRow.set('NoReading', false);\r\n }\r\n \r\n var depth = PaperworkTanksService.calculateTankDepth(dataItem,\r\n $scope.appInfo.paperwork.metric);\r\n\r\n modelRow.set('Depth', depth);\r\n\r\n var quantity = PaperworkTanksService.getVolumeFromTankChart(dataItem,\r\n $scope.appInfo.paperwork.tankCharts);\r\n\r\n modelRow.set('Quantity', quantity);\r\n\r\n $scope.calculateVolumeForTemperature(dataItem);\r\n };\r\n\r\n $scope.calculateVolumeForTemperature = function (dataItem)\r\n {\r\n var modelRow = $(\"#tanksGrid\").data(\"kendoGrid\").dataSource.getByUid(dataItem.uid);\r\n\r\n var netQuantity = PaperworkTanksService.adjustVolumeForTemperature($scope.appInfo.paperwork.useTempCorrections,\r\n dataItem, $scope.appInfo.paperwork.tempCharts); \r\n\r\n if (dataItem.LargeUnits !== 0 || dataItem.SmallUnits !== 0 || dataItem.Quantity !== 0 || dataItem.WaterSmallUnits !== 0 || dataItem.WaterQuantity !== 0 ) {\r\n modelRow.set('NoReading', false);\r\n }\r\n\r\n };\r\n\r\n $scope.calculateWaterVolumeValues = function (dataItem)\r\n {\r\n var modelRow = $(\"#tanksGrid\").data(\"kendoGrid\").dataSource.getByUid(dataItem.uid);\r\n\r\n if (dataItem.LargeUnits !== 0 || dataItem.SmallUnits !== 0 || dataItem.Quantity !== 0 || dataItem.WaterSmallUnits !== 0 || dataItem.WaterQuantity !== 0) {\r\n modelRow.set('NoReading', false);\r\n }\r\n\r\n var depth = PaperworkTanksService.calculateWaterDepth(dataItem);\r\n\r\n modelRow.set('WaterDepth', depth);\r\n\r\n var quantity = PaperworkTanksService.getWaterVolumeFromTankChart(dataItem,\r\n $scope.appInfo.paperwork.tankCharts);\r\n\r\n modelRow.set('WaterQuantity', quantity);\r\n\r\n $scope.calculateVolumeForTemperature(dataItem);\r\n\r\n };\r\n\r\n $scope.validateTankOverShort = function (referenceTank)\r\n {\r\n var hasWarning = false;\r\n\r\n //First check to see if we even care.\r\n if (!$scope.appInfo.paperwork.UseOSWarnings)\r\n {\r\n return {\r\n HasWarning: false,\r\n Min: 0,\r\n Max: 0\r\n };\r\n }\r\n\r\n //Figure out what the base tank is going to be.\r\n if (referenceTank.InventoryTankNo !== referenceTank.TankNo)\r\n {\r\n for (var x = 0; x < $scope.appInfo.paperwork.tanks.length; x++)\r\n {\r\n if ($scope.appInfo.paperwork.tanks[x].TankNo === referenceTank.InventoryTankNo)\r\n {\r\n referenceTank = $scope.appInfo.paperwork.tanks[x];\r\n break;\r\n }\r\n }\r\n }\r\n //Then find the tolerance\r\n var tolerance = (referenceTank.EndQty * ($scope.appInfo.paperwork.OSWarningPct / 100)) + $scope.appInfo.paperwork.OSWarningUnits;\r\n var min = referenceTank.EndQty - tolerance;\r\n var max = referenceTank.EndQty + tolerance;\r\n //Find the total value of all tanks manifolded togather then check the tolerances.\r\n var totalValue = $scope.calculateTankEndQuantity(referenceTank);\r\n hasWarning = (totalValue < min || totalValue > max) && !referenceTank.NoReading;\r\n\r\n if (hasWarning)\r\n {\r\n $scope.tankCommentIsRequired = true;\r\n }\r\n \r\n return {\r\n HasWarning: hasWarning,\r\n Min: min,\r\n Max: max\r\n } ;\r\n };\r\n\r\n $scope.calculateTankEndQuantity = function (tank)\r\n {\r\n if (tank.TankNo === tank.InventoryTankNo)\r\n return tank.Quantity;\r\n var inventoryTankNo = tank.InventoryTankNo;\r\n var quantity = 0.00;\r\n for (var x = 0; x < $scope.appInfo.paperwork.tanks.length; x++)\r\n {\r\n if ($scope.appInfo.paperwork.tanks[x].InventoryTankNo === inventoryTankNo)\r\n quantity += $scope.appInfo.paperwork.tanks[x].Quantity;\r\n }\r\n return quantity;\r\n };\r\n\r\n $scope.setupGridColumnValidationNotificationUI = function ($col)\r\n {\r\n\r\n var fieldName = $col.attr('data-field');\r\n\r\n $col.qtip({\r\n id: \"qtip-\" + fieldName,\r\n content: {\r\n text: \"\"\r\n },\r\n position: {\r\n adjust: {\r\n x: -10, y: -10\r\n }\r\n },\r\n style: {\r\n classes: \"toolTipStyle\"\r\n }\r\n });\r\n\r\n $col.qtip('disable', true);\r\n\r\n };\r\n\r\n $scope.processGridColumnValidationNotification = function ($row, fieldName, errorMessages, warningMessages)\r\n {\r\n\r\n var idx = 0;\r\n\r\n var hasErrors = (errorMessages.length > 0);\r\n var hasWarnings = (warningMessages.length > 0);\r\n\r\n var $col = $row.find(\"[data-field='\" + fieldName + \"']\");\r\n\r\n //clear classes\r\n $col.removeClass(\"td-error\");\r\n $col.removeClass(\"td-warning\");\r\n\r\n if (hasErrors || hasWarnings)\r\n {\r\n\r\n var messageList = $(\"
    \");\r\n\r\n if (hasErrors)\r\n {\r\n var errorList = $(\"
    \" + localStrings.getLocalizedString(\"Error\") + \" :
    \");\r\n for (idx = 0; idx < errorMessages.length; idx++)\r\n {\r\n errorList.append(\"
  • \" + errorMessages[idx] + \"
  • \");\r\n }\r\n\r\n messageList.append(errorList);\r\n }\r\n\r\n if (hasWarnings)\r\n {\r\n var warningList = $(\"
    \" + localStrings.getLocalizedString(\"Warning\") + \" :
    \");\r\n for (idx = 0; idx < warningMessages.length; idx++)\r\n {\r\n warningList.append(\"
  • \" + warningMessages[idx] + \"
  • \");\r\n }\r\n\r\n messageList.append(warningList);\r\n }\r\n\r\n $col.qtip('option', 'content.text', messageList);\r\n\r\n if (hasErrors)\r\n {\r\n $col.addClass(\"td-error\");\r\n $col.qtip('option', 'style.classes', 'toolTipStyle-error');\r\n } else\r\n {\r\n $col.addClass(\"td-warning\");\r\n $col.qtip('option', 'style.classes', 'toolTipStyle-warning');\r\n }\r\n\r\n $col.qtip('disable', false);\r\n }\r\n else\r\n {\r\n $col.qtip('disable', true);\r\n }\r\n };\r\n\r\n var tankRowValidation =\r\n {\r\n validator: function (tank, parms)\r\n {\r\n var isValid = true;\r\n\r\n var $row = $(\"#tanksGrid\").data(\"kendoGrid\").tbody.find(\"tr[data-uid='\" + tank.uid + \"']\");\r\n\r\n var errorFuelQty = [], warningFuelQty = [];\r\n\r\n // fuel quantity validation\r\n var maxTankVolume = PaperworkTanksService.getMaxVolumeFromTankChart(tank, $scope.appInfo.paperwork.tankCharts);\r\n if (tank.Quantity > maxTankVolume)\r\n {\r\n errorFuelQty.push(localStrings.getLocalizedString(\"TankReadingExceeds\"));\r\n isValid = false;\r\n }\r\n\r\n var result = $scope.validateTankOverShort(tank);\r\n if (result.HasWarning)\r\n {\r\n warningFuelQty.push(localStrings.getLocalizedString(\"FuelMeasurementsEntered\") + \" \" + result.Min + \" \" + localStrings.getLocalizedString(\"And\") + \" \" + result.Max);\r\n }\r\n\r\n $scope.processGridColumnValidationNotification($row, 'Quantity', errorFuelQty, warningFuelQty);\r\n\r\n return isValid;\r\n }\r\n };\r\n\r\n $scope.validateTanks = function ()\r\n {\r\n\r\n var isValid = true;\r\n\r\n var tanksGrid = $(\"#tanksGrid\").data(\"kendoGrid\");\r\n\r\n $scope.tankCommentIsRequired = false;\r\n $scope.tankCommentRequiredError = false;\r\n angular.forEach(tanksGrid.dataSource.data(), function (tank)\r\n {\r\n isValid = isValid && tankRowValidation.validator(tank);\r\n });\r\n\r\n return isValid;\r\n };\r\n\r\n $scope.loadTanks = function (refreshDataSource)\r\n {\r\n if (!$scope.locationInfo.sideMenuData.paperwork.tanks)\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n $scope.goTo(\"/Paperwork/ViewPaperworkDealerForms/\" + $scope.appInfo.paperwork.paperworkKey);\r\n else\r\n $scope.goTo(\"/Paperwork/EnterPaperworkDealerForms/\" + $scope.appInfo.paperwork.paperworkKey);\r\n }\r\n\r\n angular.forEach($scope.appInfo.paperwork.context.paperworkSites, function (site, index)\r\n {\r\n if (site.SiteKey === $scope.appInfo.paperwork.batch.SiteKey)\r\n $scope.appInfo.paperwork.context.selectedSiteObj = site;\r\n });\r\n\r\n PaperworkTanksService.loadTanks(\r\n $scope.appInfo.paperwork.batch.Key,\r\n $scope.appInfo.paperwork.batch.SiteKey,\r\n $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true)\r\n ).then(function (data)\r\n {\r\n // if(data.count == 0){\r\n // TODO: No tanks, do something...\r\n // }\r\n $scope.appInfo.paperwork.tanks = data.PaperworkTanks;\r\n $scope.appInfo.paperwork.postedTanks = data.PostedPaperworkTanks;\r\n $scope.appInfo.paperwork.partialUnits = data.PartialUnitsList;\r\n $scope.appInfo.paperwork.metric = data.Metric;\r\n $scope.appInfo.paperwork.quantityOnly = data.QuantityOnly;\r\n $scope.appInfo.paperwork.useLargeUnits = data.UseLargeUnits;\r\n $scope.appInfo.paperwork.useTempCorrections = data.UseTempCorrections;\r\n $scope.appInfo.paperwork.trackWaterLevels = data.TrackWaterLevels;\r\n $scope.appInfo.paperwork.tankCharts = data.TankCharts;\r\n $scope.appInfo.paperwork.tempCharts = data.TempCharts;\r\n $scope.appInfo.paperwork.OSComments = data.OSComments;\r\n $scope.appInfo.paperwork.UseOSWarnings = data.UseOSWarnings;\r\n $scope.appInfo.paperwork.OSWarningUnits = data.OSWarningUnits;\r\n $scope.appInfo.paperwork.OSWarningPct = data.OSWarningPct;\r\n $scope.appInfo.paperwork.RequireOSComments = data.RequireOSComments;\r\n\r\n if (!refreshDataSource)\r\n {\r\n $scope.initializeTanksGrid();\r\n } else\r\n {\r\n var grid = $(\"#tanksGrid\").data(\"kendoGrid\");\r\n if(angular.isUndefinedOrNullOrEmpty(grid)) return;\r\n grid.dataSource.data(data.PaperworkTanks);\r\n\r\n $scope.validateTanks(); // call00 validate to re add any warnings after save\r\n }\r\n\r\n $scope.tanksLoaded = true;\r\n\r\n if ($scope.appInfo.paperwork.postedTanks.length > 0) {\r\n $scope.postedReadingsExist = true;\r\n }\r\n\r\n if ($scope.appInfo.paperwork.tanks.length > 0) {\r\n $scope.tanksEditable = !($scope.appInfo.paperwork.context.lockPaperworkAfterDru && $scope.appInfo.paperwork.tanks[0].DRUPosted);\r\n }\r\n });\r\n };\r\n\r\n $scope.tankCommentIsRequired = false;\r\n $scope.tankCommentRequiredError = false;\r\n\r\n $scope.tankCommentValidation =\r\n {\r\n name: 'validateTankComment',\r\n validationMessage: localStrings.getLocalizedString(\"FuelMeasurementsNotInToleranceComment\"),\r\n validatorError: function ()\r\n {\r\n $scope.tankCommentRequiredError = false;\r\n\r\n if (!$scope.appInfo.paperwork.UseOSWarnings || !$scope.appInfo.paperwork.RequireOSComments || !$scope.tankCommentIsRequired)\r\n {\r\n return true; // not required or not overshort warning\r\n }\r\n\r\n\r\n if ($scope.appInfo.paperwork.NewOSComments.length > 0 || ($scope.appInfo.paperwork.OSComments.Text && $scope.appInfo.paperwork.OSComments.Text.length > 0))\r\n {\r\n return true;\r\n }\r\n\r\n $scope.tankCommentRequiredError = true;\r\n return false;\r\n }\r\n };\r\n\r\n $scope.tankCommentErrorOnBlur = function ()\r\n {\r\n $(\"#tankCommmentValidationMessage\").attr('style', 'display: none !important;');\r\n };\r\n\r\n $scope.tankCommentErrorOnFocus = function ()\r\n {\r\n $(\"#tankCommmentValidationMessage\").attr('style', 'display: inline-block !important;');\r\n };\r\n\r\n var PageStage = $rootScope.$on('event:PageStage', function (event, args)\r\n {\r\n if (args === 'DREGS' && !$scope.appInfo.paperwork.viewOnly)\r\n {\r\n $scope.savePaperworkTanks('', false, false);\r\n } \r\n });\r\n $scope.$on('$destroy', PageStage);\r\n\r\n $scope.next = function (path)\r\n {\r\n if (!validatorSvc.executeValidations()) {\r\n return;\r\n }\r\n\r\n if (!$scope.appInfo.paperwork.viewOnly && $scope.tanksEditable)\r\n {\r\n $scope.savePaperworkTanks(path, false, false);\r\n } else {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, true, false));\r\n }\r\n };\r\n\r\n $scope.previous = function (path)\r\n {\r\n if (!validatorSvc.executeValidations()) {\r\n return;\r\n }\r\n\r\n if (!$scope.appInfo.paperwork.viewOnly && $scope.tanksEditable)\r\n {\r\n $scope.savePaperworkTanks(path, false, false, true);\r\n } else {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, true, true));\r\n }\r\n };\r\n\r\n $scope.close = function (path)\r\n {\r\n if (!$scope.appInfo.paperwork.viewOnly && $scope.tanksEditable)\r\n {\r\n $scope.savePaperworkTanks(\"\", false, false);\r\n } else {\r\n $scope.goTo(\"/Paperwork/EnterPaperwork/\");\r\n }\r\n };\r\n\r\n $scope.submit = function ()\r\n {\r\n $scope.submitClicked = true;\r\n $scope.savePaperworkTanks(\"\", true, false);\r\n };\r\n\r\n function initPopup() {\r\n var popupTitle = localStrings.getLocalizedString(\"PostedFuelTankReadings\");\r\n var postedHtml = '
    ';\r\n\r\n $scope.modalifier.show(popupTitle, postedHtml);\r\n\r\n setTimeout(function () {\r\n //get and modify the original grids options\r\n $scope.gridOptions = {};\r\n angular.copy($scope.tanksGridOptions, $scope.gridOptions);\r\n $scope.gridOptions.editable = false;\r\n\r\n // manually update imperial/metric units in header (large units, small units, temperature) - angular directives are not evaluated in popup\r\n $scope.gridOptions.columns[2].columns[0].headerTemplate = $scope.appInfo.paperwork.metric ? \"m.\" : \"ft.\";\r\n $scope.gridOptions.columns[2].columns[1].headerTemplate = $scope.appInfo.paperwork.metric ? \"cm.\" : \"in.\";\r\n $scope.gridOptions.columns[3].columns[0].headerTemplate = $scope.appInfo.paperwork.metric ? \"cm.\" : \"in.\";\r\n $scope.gridOptions.columns[4].columns[0].headerTemplate = $scope.appInfo.paperwork.metric ? \"°C\" : \"°F\";\r\n\r\n // grab the empty element and make it a kendo grid\r\n var el = $('div.popupTanksTable');\r\n el.kendoGrid($scope.gridOptions);\r\n\r\n // checkbox imputs must be manually disabled\r\n el.find('.grid-checkbox').attr('readonly', true);\r\n //$('input.noReadChkBox').Attr('disabled', true);\r\n\r\n // hide columns based on record type\r\n var grid = el.data('kendoGrid');\r\n $scope.setupTankGridColumns(grid);\r\n\r\n // set datasource\r\n grid.dataSource.data($scope.appInfo.paperwork.postedTanks);\r\n grid.refresh();\r\n }, 0);\r\n }\r\n\r\n $scope.showPostedReadings = function () {\r\n if ($('div.popupTanksTable').length > 0)\r\n $scope.modalifier.display = true;\r\n else\r\n initPopup();\r\n };\r\n\r\n $scope.processSubmit = function (submit, skipNav) {\r\n\r\n var submitPaperworkCmdParms =\r\n {\r\n SiteKey: $scope.appInfo.paperwork.batch.SiteKey,\r\n PaperworkDate: $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true),\r\n EmailAddress: $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n SubmitPaperwork: submit,\r\n PreviouslySubmitted: $scope.appInfo.paperwork.batch.HasBeenSubmitted\r\n };\r\n\r\n PaperworkService.GetPaperworkBatchErrorWarning(submitPaperworkCmdParms).then(function (data) {\r\n //If warnings - show confirm dialog\r\n if (data.HasWarnings) {\r\n if (!angular.isUndefinedOrNullOrEmpty(data.Warnings[0])) {\r\n $scope.notifier.show(data.Warnings[0], \"warning\");\r\n\r\n var yes = function () {\r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data) {\r\n if (submit && !skipNav)\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n });\r\n };\r\n\r\n $scope.modalifier.confirm(data.Warnings[0] + \"
    \" + localStrings.getLocalizedString(\"WishToContinue\"), yes);\r\n }\r\n }\r\n else {\r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data) {\r\n if (submit && !skipNav)\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n });\r\n }\r\n });\r\n };\r\n\r\n $scope.submitPaperwork = function (submit, skipNav)\r\n {\r\n var fuelMetersAppInfo = $scope.appInfo.paperwork.apps[0];\r\n\r\n //If we have fuelMeters and fuelMeters are required, but not saved; then throw error\r\n if (fuelMetersAppInfo.HasData === 0 && fuelMetersAppInfo.IsRequired !== 0) {\r\n $timeout(function () {\r\n $scope.modalifier.showSavedError();\r\n }, 100);\r\n return;\r\n }\r\n\r\n $scope.processSubmit(submit, skipNav);\r\n };\r\n\r\n $scope.savePaperworkTanks = function (path, submit, close, isPrevious, skipNav)\r\n {\r\n isPrevious = isPrevious ? isPrevious : false;\r\n skipNav = skipNav ? skipNav : false;\r\n \r\n //Allow saving first time when just visiting page without cliking anything on page\r\n if ($('#tanksGrid .k-dirty-cell').length > 0 || $scope.appInfo.paperwork.tanks[0].HeaderKey === 0) {\r\n\r\n if (!$scope.validateTanks()) {\r\n return;\r\n } else {\r\n if ($scope.tankCommentIsRequired) {\r\n var commentIsValid = $scope.tankCommentValidation.validatorError();\r\n\r\n if (!commentIsValid) {\r\n return;\r\n }\r\n }\r\n }\r\n\r\n $scope.resetDirtyFlags($scope.tanksForm);\r\n\r\n angular.copy($scope.tanksGridDS.data().toJSON(), $scope.appInfo.paperwork.tanks);\r\n\r\n var tankHeader = {\r\n Key: $scope.appInfo.paperwork.tanks[0].HeaderKey,\r\n SiteKey: $scope.appInfo.paperwork.batch.SiteKey,\r\n PaperworkDate: $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true),\r\n Status: $scope.appInfo.paperwork.tanks[0].Status,\r\n StickType: $scope.appInfo.paperwork.tanks[0].StickType,\r\n Ts: $scope.appInfo.paperwork.tanks[0].HeaderTimeStamp,\r\n PaperworkBatchKey: $scope.appInfo.paperwork.batch.Key,\r\n AppKey: $scope.locationInfo.sideMenuData.paperwork.tanks.Key,\r\n UserName: $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n OSComments: {\r\n Key: $scope.appInfo.paperwork.OSComments.Key,\r\n FuelStkHdrKey: $scope.appInfo.paperwork.OSComments.FuelStkHdrKey,\r\n Text: $scope.appInfo.paperwork.OSComments.Text,\r\n NewText: $scope.appInfo.paperwork.NewOSComments,\r\n Ts: $scope.appInfo.paperwork.OSComments.Ts,\r\n Timestamp: $scope.appInfo.paperwork.OSComments.Timestamp\r\n }\r\n };\r\n\r\n PaperworkTanksService.savePaperworkTanks(tankHeader, $scope.appInfo.paperwork.tanks).then(function (data) {\r\n //get updated data\r\n $scope.loadTanks(true);\r\n\r\n $scope.appInfo.paperwork.NewOSComments = \"\";\r\n //Submit after saving for Fuel Tank Reading \r\n if (submit) {\r\n $scope.submitPaperwork(true, skipNav);\r\n return;\r\n }\r\n });\r\n }\r\n else {\r\n if (submit) {\r\n $scope.submitPaperwork(true, skipNav);\r\n return;\r\n }\r\n }\r\n\r\n if (close) {\r\n $scope.submitPaperwork(false, skipNav);\r\n return;\r\n }\r\n if (path.length > 0){\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, false, isPrevious));\r\n }\r\n };\r\n\r\n $scope.getPartialValue = function (value)\r\n {\r\n for (var x in $scope.appInfo.paperwork.partialUnits)\r\n {\r\n if ($scope.appInfo.paperwork.partialUnits[x] === value)\r\n return $scope.appInfo.paperwork.partialUnits[x];\r\n }\r\n };\r\n\r\n })\r\n .controller('enterPaperworkDeliveriesCtrl', function ($scope, $rootScope, $routeParams, PaperworkService, $filter, PaperworkDeliveriesService,\r\n $location, WebFunctions, validatorSvc, $timeout, $q, $compile, templates, localStrings, globalizationSvc,setupNav)\r\n {\r\n 'use strict';\r\n $scope.kendo = {};\r\n $scope.appInfo.paperwork.paperworkKey = 0;\r\n $scope.appInfo.paperwork.deliveries = {};\r\n $scope.appInfo.paperwork.deliveriesList = {};\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery = {};\r\n $scope.appInfo.paperwork.deliveries.context = {};\r\n $scope.appInfo.paperwork.deliveries.context.AuthorizedVendors = [];\r\n $scope.appInfo.paperwork.deliveries.context.AuthorizedTerminals = [];\r\n $scope.appInfo.paperwork.deliveries.context.AuthorizedCarriers = [];\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryFreight = [];\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery.VendKey = -1;\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery.TrmnlKey = -1;\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery.CarrierKey = -1;\r\n $scope.deliveriesLoaded = false;\r\n $scope.deliveryFilteredTanks = [];\r\n\r\n $scope.currentView = 0; // 0 = record selector; 1= entry\r\n\r\n $scope.changeView = function (view)\r\n {\r\n\r\n // 0 = record selector; 1= entry\r\n\r\n if (view === 1)\r\n { // chnange to entry\r\n $scope.currentView = 1;\r\n } else\r\n {\r\n $scope.currentView = 0;\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery = {}; // clear delivery\r\n }\r\n };\r\n\r\n $scope.freightModalFormDelegate = {};\r\n\r\n //grid validations\r\n $scope.productValidation = {hasErrors: false, errorDescription: \"\"};\r\n\r\n // controller destructor\r\n $scope.$on(\"$destroy\", function handler()\r\n {\r\n $rootScope.scopesToValidate = [];\r\n });\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n $scope.appInfo = $scope.appInfo || {};\r\n\r\n $scope.appInfo.paperwork.viewOnly = $location.$$path.indexOf('/ViewPaperworkDeliveries/') > -1;\r\n if ($routeParams.paperworkKey)\r\n {\r\n $scope.appInfo.paperwork.paperworkKey = $routeParams.paperworkKey;\r\n }\r\n $scope.appInfo.paperwork.NewOSComments = '';\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaperworkSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = '1';\r\n // $scope.getWebProfileMessage(19);\r\n $scope.globalizationSvc = globalizationSvc;\r\n\r\n $scope.newDeliveryProduct = {};\r\n\r\n $scope.appInfo.paperwork.batch = {};\r\n\r\n if (!$scope.appInfo.paperwork.context)\r\n {\r\n PaperworkService.getPaperworkContext($scope.appInfo.webUser.CurrentAuthorization.CustContKey, true).then(\r\n function (data)\r\n {\r\n $scope.appInfo.paperwork.context = {};\r\n $scope.appInfo.paperwork.context.paperworkSites = data.PaperworkSites;\r\n $scope.appInfo.paperwork.context.selectedSite = data.SelectedSiteKey;\r\n $scope.appInfo.paperwork.context.lockPaperworkAfterDru = data.LockPaperworkAfterDru;\r\n\r\n $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance = data.CalculatedPriceToPriorDaysPriceVariance;\r\n $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance = data.CalculatedPriceToCapturedRetailPriceVariance;\r\n $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance = data.NetSalesDollarsToCapturedRetailPriceNetUnitsVariance;\r\n\r\n $scope.locationInfo.showEnterPaperworkMenuItem = $scope.appInfo.paperwork.context.paperworkSites[0] ?\r\n $scope.appInfo.paperwork.context.paperworkSites[0].CanEnterPaperwork :\r\n false;\r\n\r\n if (!$scope.locationInfo.showEnterPaperworkMenuItem)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n }\r\n }\r\n );\r\n }\r\n\r\n if ($scope.appInfo.paperwork.paperworkKey > 0)\r\n {\r\n //We are loading a known existing paperwork batch\r\n PaperworkService.OpenPaperworkBatchByKey(\r\n $scope.appInfo.paperwork.paperworkKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.Id,\r\n $scope.appInfo.paperwork.viewOnly\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.paperwork.batch = data.PaperworkBatch.PaperworkBatch;\r\n $scope.appInfo.paperwork.apps = data.PaperworkBatch.PaperworkApps;\r\n $scope.appInfo.paperwork.form = data.PaperworkBatch.PaperworkForm;\r\n $scope.appInfo.paperwork.siteInfo = data.PaperworkBatch.PaperworkSiteInfo;\r\n \r\n // resolve if this is the first or last page\r\n var res = setupNav.firstLastPage('DREFD',$scope.appInfo.paperwork.apps);\r\n $scope.locationInfo.sideMenuData.isFirstPage = res.isFirstPage;\r\n $scope.locationInfo.sideMenuData.isLastPage = res.isLastPage;\r\n\r\n $rootScope.$broadcast('event:PaperworkLoaded', $scope.appInfo.paperwork.viewOnly, $scope.appInfo.paperwork.paperworkKey);\r\n\r\n var nextApp = true;\r\n angular.forEach($scope.appInfo.paperwork.apps, function (app, index)\r\n {\r\n if (app.MenuCode === 'DREFD')\r\n {\r\n $scope.getDeliveriesWithContext();\r\n nextApp = false;\r\n }\r\n });\r\n if (nextApp)\r\n {\r\n $scope.goTo(setupNav.navigateToPage('DREFD',$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, $scope.appInfo.paperwork.viewOnly, false));\r\n }\r\n }, function ()\r\n {\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n });\r\n } else\r\n {\r\n //todo: goback...\r\n }\r\n $scope.locationInfo.sideMenuData.pwSubMenu = '4';\r\n\r\n $scope.hideModals();\r\n };\r\n\r\n var newPWBatchLoadedListener = $rootScope.$on('event:NewPaperworkBatchLoaded', function (event, data)\r\n {\r\n if ($scope.locationInfo.sideMenuData.paperwork.tanks)\r\n $scope.getDeliveriesWithContext();\r\n else\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n $scope.goTo(\"/Paperwork/ViewPaperworkDealerForms/\" + $scope.appInfo.paperwork.paperworkKey);\r\n else\r\n $scope.goTo(\"/Paperwork/EnterPaperworkDealerForms/\" + $scope.appInfo.paperwork.paperworkKey);\r\n }\r\n });\r\n\r\n // $scope $destroy\r\n $scope.$on('$destroy', newPWBatchLoadedListener);\r\n\r\n $scope.getDeliveriesWithContext = function ()\r\n {\r\n if (!$scope.locationInfo.sideMenuData.paperwork.deliveries)\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n $scope.goTo(\"/Paperwork/ViewPaperworkDealerForms/\" + $scope.appInfo.paperwork.paperworkKey);\r\n else\r\n $scope.goTo(\"/Paperwork/EnterPaperworkDealerForms/\" + $scope.appInfo.paperwork.paperworkKey);\r\n }\r\n\r\n angular.forEach($scope.appInfo.paperwork.context.paperworkSites, function (site, index)\r\n {\r\n if (site.SiteKey === $scope.appInfo.paperwork.batch.SiteKey)\r\n {\r\n $scope.appInfo.paperwork.context.selectedSiteObj = site;\r\n }\r\n });\r\n\r\n PaperworkDeliveriesService.getDeliveriesWithContext(\r\n $scope.appInfo.paperwork.batch.Key, $scope.appInfo.paperwork.viewOnly\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.paperwork.deliveries = {};\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery = {};\r\n $scope.appInfo.paperwork.deliveries.context = data.Context;\r\n $scope.appInfo.paperwork.deliveries.deliveriesList = data.FuelDeliveriesList;\r\n\r\n // if there are no deliveries for this paperwork batch then drop in to add mode for new delivery\r\n if (data.FuelDeliveriesList.length === 0)\r\n {\r\n // currently petronet can only edit petronet source fuel delivery so expect on one row returned\r\n data.NewDelivery.LiftDatetime = globalizationSvc.formatDateTime(data.NewDelivery.LiftDatetime, 'g');\r\n data.NewDelivery.DelivDateTime = globalizationSvc.formatDateTime($scope.appInfo.paperwork.batch.PaperworkDate, 'g');\r\n\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery = data.NewDelivery;\r\n\r\n $scope.fuelDeliveriesCount = data.FuelDeliveriesList.length;\r\n\r\n $scope.initializeDeliveriesGrid();\r\n\r\n $scope.changeView(1);\r\n }\r\n\r\n $scope.deliveriesLoaded = true;\r\n });\r\n };\r\n\r\n var gridColEditorInput = function (container, options)\r\n {\r\n\r\n var fieldName = \"'\" + options.field + \"'\";\r\n\r\n var required = $(container).attr('required'); // field is required\r\n\r\n // For some browsers, `attr` is undefined; for others,\r\n // `attr` is false. Check for both.\r\n if (typeof required !== typeof undefined && required !== false)\r\n {\r\n $('')\r\n .appendTo(container)\r\n .kendoNumericTextBox({\r\n format: \"#\",\r\n max: 100000000,\r\n min: -100000000,\r\n });\r\n } else\r\n {\r\n $('')\r\n .appendTo(container)\r\n .kendoNumericTextBox({\r\n format: \"#\",\r\n max: 100000000,\r\n min: -100000000,\r\n });\r\n }\r\n\r\n };\r\n\r\n var gridColNumber = function (field, format)\r\n {\r\n return '';\r\n };\r\n\r\n var productEditor = function (container, options)\r\n {\r\n $(\"\")\r\n\r\n .appendTo(container)\r\n .kendoComboBox({\r\n id: \"productList\",\r\n dataSource: {\r\n data: $scope.appInfo.paperwork.deliveries.context.SiteTankProducts\r\n },\r\n filter: \"contains\",\r\n dataTextField: localStrings.getLocalizedString(\"ID\"),\r\n dataValueField: \"Key\",\r\n template: \"
    ${ Id }${ Description }
    \",\r\n change: function (e)\r\n {\r\n\r\n var selectionElement = $(e.sender.element[0]).parent().find(\".k-dropdown-wrap\");\r\n\r\n // check if valid\r\n if ($(e.sender.element[0]).hasClass(\"k-invalid\"))\r\n {\r\n selectionElement.addClass(\"k-selection-invalid\");\r\n } else\r\n {\r\n selectionElement.removeClass(\"k-selection-invalid\");\r\n }\r\n\r\n if (this.value() && this.selectedIndex === -1)\r\n {\r\n this.value('');\r\n this._filterSource({\r\n value: \"\",\r\n field: this.options.dataTextField,\r\n operator: \"contains\"\r\n });\r\n return;\r\n }\r\n\r\n var dataItem = e.sender.dataItem();\r\n options.model.set(\"ProdId\", dataItem.Id);\r\n options.model.set(\"ProdDesc\", dataItem.Description);\r\n },\r\n open: function(e) {\r\n var width = $(\".k-combobox\").width() + 300;\r\n $(\".k-animation-container\").width(width);\r\n $(\".k-list-container\").width(width - 4);\r\n }\r\n });\r\n\r\n $('').appendTo(container);\r\n\r\n };\r\n\r\n var tankEditor = function (container, options)\r\n {\r\n $(\"\")\r\n\r\n .appendTo(container)\r\n .kendoComboBox({\r\n id: \"tankList\",\r\n filter: \"contains\",\r\n dataSource: {\r\n data: $scope.getFilteredTanksList(options.model.ProdKey)\r\n },\r\n dataTextField: \"TankNo\",\r\n dataValueField: \"TankNo\",\r\n change: function (e)\r\n {\r\n\r\n var selectionElement = $(e.sender.element[0]).parent().find(\".k-dropdown-wrap\");\r\n\r\n // check if valid\r\n if ($(e.sender.element[0]).hasClass(\"k-invalid\"))\r\n {\r\n selectionElement.addClass(\"k-selection-invalid\");\r\n } else\r\n {\r\n selectionElement.removeClass(\"k-selection-invalid\");\r\n }\r\n\r\n if (this.value() && this.selectedIndex === -1)\r\n {\r\n this.value('');\r\n this._filterSource({\r\n value: \"\",\r\n field: this.options.dataTextField,\r\n operator: \"contains\"\r\n });\r\n return;\r\n }\r\n\r\n var dataItem = e.sender.dataItem();\r\n options.model.set(\"SelectedTank\", dataItem);\r\n }\r\n });\r\n\r\n $('').appendTo(container);\r\n };\r\n\r\n $scope.getProductByKey = function (prodKey)\r\n {\r\n return $scope.appInfo.paperwork.deliveries.context.SiteTankProducts.find({Key: prodKey});\r\n };\r\n\r\n $scope.initializeDeliveriesGrid = function ()\r\n {\r\n\r\n $scope.deliveriesGridDS = new kendo.data.DataSource({\r\n schema: {\r\n model: {\r\n fields: {\r\n ProdKey: {type: \"number\"},\r\n ProdId: {type: \"string\"},\r\n ProdDesc: {type: \"string\"},\r\n TankNo: {type: \"number\"},\r\n DelivGrossQty: {type: \"number\"},\r\n DelivNetQty: {type: \"number\"},\r\n SelectedTank: {}\r\n }\r\n }\r\n },\r\n data: $scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryProducts,\r\n batch: true\r\n });\r\n\r\n $scope.deliveriesGridOptions = {\r\n dataSource: $scope.deliveriesGridDS,\r\n columns: [\r\n {\r\n title: localStrings.getLocalizedString(\"Product\"),\r\n columns: [\r\n {\r\n field: \"ProdKey\",\r\n title: localStrings.getLocalizedString(\"ID\"),\r\n width: 100,\r\n attributes: {\"data-field\": \"ProdKey\", \"class\": \"k-editable-cell\", \"required\": \"true\"},\r\n template: \"#=ProdId#\",\r\n editor: productEditor\r\n },\r\n {\r\n field: \"ProdDesc\",\r\n title: localStrings.getLocalizedString(\"Description\"),\r\n attributes: {\"data-field\": \"ProdDesc\", \"class\": \"tableCellDisabled description\"},\r\n template: \"#=ProdDesc#\",\r\n editor: function (element, options)\r\n {\r\n element.text(options.model.ProdDesc);\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n field: \"FuelDeliveryTanks[0].TankNo\",\r\n width: 100,\r\n template: \"#= FuelDeliveryTanks[0].TankNo #\",\r\n editor: tankEditor,\r\n headerTemplate: localStrings.getLocalizedString(\"Tank\"),\r\n attributes: {\"data-field\": \"TankNo\", \"class\": \"k-editable-cell\", \"required\": \"true\"}\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"Units\"),\r\n columns: [\r\n {\r\n field: \"DelivGrossQty\",\r\n title: localStrings.getLocalizedString(\"Gross\"),\r\n width: 80,\r\n attributes: {\r\n \"data-field\": \"DelivGrossQty\",\r\n \"class\": \"k-editable-cell\",\r\n \"required\": \"true\"\r\n },\r\n template: gridColNumber(\"DelivGrossQty\", \"n2\"),\r\n editor: gridColEditorInput\r\n },\r\n {\r\n field: \"DelivNetQty\",\r\n title: localStrings.getLocalizedString(\"Net\"),\r\n width: 80,\r\n attributes: {\r\n \"data-field\": \"DelivNetQty\",\r\n \"class\": \"k-editable-cell\",\r\n \"required\": \"true\"\r\n },\r\n template: gridColNumber(\"DelivNetQty\", \"n2\"),\r\n editor: gridColEditorInput\r\n }\r\n ]\r\n },\r\n {\r\n field: \"DeleteDeliveryBtn\",\r\n template: \"\",\r\n width: 60,\r\n attributes: {\"data-field\": \"DeleteDeliveryBtn\"},\r\n headerTemplate: \" \"\r\n }\r\n ],\r\n pageable: false,\r\n sortable: false,\r\n editable: $scope.deliveryIsEditable(),\r\n scrollable: false,\r\n navigatable: true,\r\n dataBound: function (e)\r\n {\r\n $scope.setupDeliveryRows();\r\n },\r\n edit: function (e)\r\n { \r\n var $input;\r\n if (e.container.find(\"input\").length > 1) {\r\n $input = e.container.find(\"input.k-input\").last(); // find(\"input\") returns two input elements which causes issue.\r\n }\r\n else {\r\n $input = e.container.find(\"input\");\r\n }\r\n var fieldName = $input.attr(\"name\");\r\n\r\n // alternative (if you don't have the name attribute in your editable):\r\n // var columnIndex = this.cellIndex(e.container);\r\n // var fieldName = this.thead.find(\"th\").eq(columnIndex).data(\"field\");\r\n\r\n if (!deliveriesGridColIsEditable(fieldName, e.model))\r\n {\r\n $input.prop('readonly', true);\r\n //this.closeCell(); // prevent editing\r\n } else\r\n {\r\n $input.select();\r\n $input.addClass('k-cell-state-selected');\r\n }\r\n\r\n var grid = $(\"#deliveriesGrid\").data(\"kendoGrid\");\r\n var currentCell = $(grid.tbody.children().find(\".k-edit-cell\"));\r\n\r\n grid.current(currentCell);\r\n }\r\n\r\n };\r\n\r\n };\r\n\r\n $scope.$on(\"kendoWidgetCreated\", function (event, widget)\r\n {\r\n\r\n var grid = $(\"#deliveriesGrid\").data(\"kendoGrid\");\r\n\r\n // the event is emitted for every widget; if we have multiple\r\n // widgets in this controller, we need to check that the event\r\n // is for the one we're interested in.\r\n\r\n if (widget === $scope.kendo.deliveriesGrid)\r\n {\r\n grid.dataSource.data($scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryProducts);\r\n\r\n $(\"#deliveriesGrid\").find(\"table\").on(\"keydown\", onGridKeydown);\r\n\r\n if ($scope.deliveryIsEditable())\r\n {\r\n var addDeliveryAction = $('
    ').appendTo($('#deliveriesGrid'));\r\n $compile(addDeliveryAction)($scope);\r\n }\r\n\r\n $scope.setupDeliveriesGridColumns();\r\n\r\n }\r\n });\r\n\r\n function onGridKeydown(e)\r\n {\r\n if (e.keyCode === kendo.keys.TAB)\r\n {\r\n var grid = $(\"#deliveriesGrid\").data(\"kendoGrid\");\r\n\r\n var current = grid.current();\r\n\r\n if (!current.hasClass(\"k-editable-cell\"))\r\n {\r\n var nextCell = current.nextAll(\".k-editable-cell\");\r\n if (!nextCell[0])\r\n {\r\n //search the next row\r\n var nextRow = current.parent().next();\r\n\r\n // if tabbing and reached the last cell then create new row\r\n if (nextRow.length === 0)\r\n {\r\n $scope.addDeliveryGridRow();\r\n\r\n var $newRow = $(grid.tbody.children().last());\r\n\r\n $newRow.find(\"td:eq(0) input\").focus();\r\n nextCell = $newRow;\r\n grid.current(nextCell);\r\n\r\n } else\r\n {\r\n nextCell = current.parent().next().children(\".k-editable-cell:first\");\r\n\r\n grid.current(nextCell);\r\n grid.editCell(nextCell[0]);\r\n }\r\n } else\r\n {\r\n grid.current(nextCell);\r\n grid.editCell(nextCell[0]);\r\n }\r\n\r\n }\r\n }\r\n }\r\n\r\n $scope.setupDeliveryRows = function ()\r\n {\r\n\r\n $(\"#deliveriesGrid tr\").each(function (index, row)\r\n {\r\n\r\n if (index > 1)\r\n { // skip header rows\r\n\r\n $scope.setupDeliveryRow(row);\r\n }\r\n });\r\n };\r\n\r\n $scope.setupDeliveryRow = function (deliveryRow)\r\n {\r\n\r\n var dataItem = $(\"#deliveriesGrid\").data(\"kendoGrid\").dataItem(deliveryRow);\r\n\r\n var $row = $(deliveryRow);\r\n\r\n //set prod id and description for product key\r\n var selectedProduct = $scope.getProductByKey(dataItem.ProdKey);\r\n\r\n if (selectedProduct)\r\n {\r\n dataItem.set(\"ProdId\", selectedProduct.Id);\r\n dataItem.set(\"ProdDesc\", selectedProduct.Description);\r\n }\r\n\r\n var $rowColumns = $row.find('td');\r\n\r\n $rowColumns.each(function (index, col)\r\n {\r\n var $col = $(col);\r\n var fieldName = $col.attr('data-field');\r\n if (!deliveriesGridColIsEditable(fieldName, dataItem))\r\n {\r\n $col.addClass(\"tableCellDisabled\");\r\n $col.removeClass(\"k-editable-cell\");\r\n\r\n /*if (fieldName === \"DeleteDeliveryBtn\") {\r\n $col.find('i').hide();\r\n }*/\r\n }\r\n\r\n $scope.setupGridColumnValidationNotificationUI($col);\r\n });\r\n };\r\n\r\n $scope.addDeliveryGridRow = function ()\r\n {\r\n var grid = $(\"#deliveriesGrid\").data(\"kendoGrid\");\r\n\r\n if (grid)\r\n {\r\n\r\n // check if there is a new row already and if it is not valid then don't create a another new row\r\n // if there is a invalid new row remove it before validating\r\n var $lastRow = $(grid.tbody.children().last());\r\n var isNewRow = $lastRow.hasClass('newRow');\r\n\r\n if (isNewRow)\r\n {\r\n var hasDirtyRow = $lastRow.find('.k-dirty');\r\n\r\n if (hasDirtyRow.length === 0)\r\n {\r\n grid.cancelRow();\r\n }\r\n }\r\n\r\n $(\"deliveriesGrid\").removeClass(\"newRow\");\r\n\r\n //this logic creates a new item in the datasource/datagrid\r\n var dataSource = grid.dataSource;\r\n var totalRows = dataSource.data().length;\r\n\r\n var newDeliveryProduct = {\r\n \"AllocFuelContKey\": null,\r\n \"AllocFuelContDtlKey\": null,\r\n \"AllocLastPostedFuelContDtlKey\": null,\r\n \"BasedOnUnits\": 0,\r\n \"BOLAutoMatched\": 0,\r\n \"BOLDtlKey\": null,\r\n \"BusEntKey\": null,\r\n \"CalcExtCost\": 0,\r\n \"CalcFrtCost\": 0,\r\n \"CalcUnitCost\": 0,\r\n \"CnfrmDateTime\": null,\r\n \"CnfrmStatus\": 0,\r\n \"CnfrmUserID\": null,\r\n \"ContractOverride\": 0,\r\n \"CostOverride\": 0,\r\n \"CostPosted\": 0,\r\n \"CustLocKey\": null,\r\n \"DelivDateTime\": $scope.appInfo.paperwork.deliveries.fuelDelivery.DelivDateTime,\r\n \"DelivGrossQty\": 0,\r\n \"DelivNetQty\": 0,\r\n \"DestProdKey\": null,\r\n \"DestSiteKey\": $scope.appInfo.paperwork.batch.SiteKey,\r\n \"DestType\": 0,\r\n \"ExternalRecID\": null,\r\n \"FrtInInventory\": -1,\r\n \"FrtOverride\": 0,\r\n \"FrtPLAmt\": 0,\r\n \"FrtPLInInvAmt\": 0,\r\n \"FrtPLInInventory\": -1,\r\n \"FueldelProdFrtReconGrossQty\": 0,\r\n \"FueldelProdFrtReconNetQty\": 0,\r\n \"FrtReconUserID\": null,\r\n \"FrtReconciled\": 0,\r\n \"FrtUnitCost\": 0,\r\n \"FrtVndInvKey\": null,\r\n \"FrtVndInvPndKey\": null,\r\n \"FuelContKey\": null,\r\n \"FuelContDtlKey\": null,\r\n \"FuelDelKey\": $scope.appInfo.paperwork.deliveries.fuelDelivery.Key,\r\n \"InvcExtCost\": 0,\r\n \"InvcFrtCost\": 0,\r\n \"InvcFrtUnitCost\": 0,\r\n \"InvcGrossQty\": 0,\r\n \"InvcNetQty\": 0,\r\n \"InvcUnitCost\": 0,\r\n \"Key\": 0,\r\n \"LastPostedFuelContDtlKey\": null,\r\n \"OrdQty\": 0,\r\n \"OrigProdKey\": null,\r\n \"OwnerOption\": 0,\r\n \"ProdKey\": \"\",\r\n \"ReconUserID\": null,\r\n \"Reconciled\": 0,\r\n \"SiteKey\": $scope.appInfo.paperwork.batch.SiteKey,\r\n \"SourceKey\": 0,\r\n \"SourceType\": 1,\r\n \"TaxPLAmt\": 0,\r\n \"TaxPLInInvAmt\": 0,\r\n \"VndInvKey\": null,\r\n \"VndInvPndKey\": null,\r\n \"Timestamp\": \"\",\r\n \"FuelDeliveryTanks\": [\r\n {\r\n \"DelivQty\": 0,\r\n \"DelProdKey\": 0,\r\n \"Ethanol\": 0,\r\n \"InventoryCost\": 0,\r\n \"Key\": 0,\r\n \"LastCost\": 0,\r\n \"LastDelivGrossQty\": 0,\r\n \"LastDelivNetQty\": 0,\r\n \"LastEthanol\": 0,\r\n \"LastOctane\": 0,\r\n \"LastQty\": 0,\r\n \"LastRVP\": 0,\r\n \"LastTankNo\": null,\r\n \"Octane\": 0,\r\n \"OrdQty\": 0,\r\n \"RplCarrierKey\": null,\r\n \"RplCostAssigned\": 0,\r\n \"RplTrmnlKey\": null,\r\n \"RplVendKey\": null,\r\n \"RVP\": 0,\r\n \"TankNo\": \"\",\r\n \"Timestamp\": \"\"\r\n }\r\n ],\r\n ProdId: \"\",\r\n ProdDesc: \"\"\r\n };\r\n\r\n dataSource.insert(totalRows, newDeliveryProduct);\r\n\r\n grid.editRow(grid.tbody.children().last());\r\n\r\n var $newRow = $(grid.tbody.children().last());\r\n $newRow.addClass(\"newRow\");\r\n $scope.setupDeliveryRow($newRow);\r\n\r\n }\r\n };\r\n\r\n $scope.setupDeliveriesGridColumns = function ()\r\n {\r\n\r\n if (!$scope.appInfo.paperwork.deliveries.context.ShowGrossUnits)\r\n {\r\n $scope.kendo.deliveriesGrid.hideColumn(\"DelivGrossQty\");\r\n }\r\n\r\n if (!$scope.appInfo.paperwork.deliveries.context.ShowNetUnits)\r\n {\r\n $scope.kendo.deliveriesGrid.hideColumn(\"DelivNetQty\");\r\n }\r\n\r\n if (!$scope.deliveryIsEditable())\r\n {\r\n $scope.kendo.deliveriesGrid.hideColumn(\"DeleteDeliveryBtn\");\r\n }\r\n\r\n };\r\n\r\n\r\n $scope.deleteDeliveryProductRow = function (dataItem)\r\n {\r\n\r\n var dataRow = $('#deliveriesGrid').data(\"kendoGrid\").dataSource.getByUid(dataItem.uid);\r\n $('#deliveriesGrid').data(\"kendoGrid\").dataSource.remove(dataRow);\r\n\r\n };\r\n\r\n function deliveriesGridColIsEditable(fieldName, model)\r\n {\r\n\r\n if (fieldName === \"ProdKey\")\r\n {\r\n return $scope.deliveryIsEditable();\r\n }\r\n\r\n if (fieldName === \"ProdDesc\")\r\n {\r\n return false;\r\n }\r\n\r\n if (fieldName === \"TankNo\")\r\n {\r\n return $scope.deliveryIsEditable();\r\n }\r\n\r\n if (fieldName === \"DelivGrossQty\")\r\n {\r\n return true;\r\n }\r\n\r\n if (fieldName === \"DelivNetQty\")\r\n {\r\n return true;\r\n }\r\n\r\n return true; // default to editable\r\n }\r\n\r\n $scope.setupGridColumnValidationNotificationUI = function ($col)\r\n {\r\n\r\n var fieldName = $col.attr('data-field');\r\n\r\n $col.qtip({\r\n id: \"qtip-\" + fieldName,\r\n content: {\r\n text: \"\"\r\n },\r\n position: {\r\n adjust: {\r\n x: -10, y: -10\r\n }\r\n },\r\n style: {\r\n classes: \"toolTipStyle\"\r\n }\r\n });\r\n\r\n $col.qtip('disable', true);\r\n\r\n };\r\n\r\n $scope.processGridColumnValidationNotification = function ($row, fieldName, errorMessages, warningMessages)\r\n {\r\n\r\n var idx = 0;\r\n\r\n var hasErrors = (errorMessages.length > 0);\r\n var hasWarnings = (warningMessages.length > 0);\r\n\r\n var $col = $row.find(\"[data-field='\" + fieldName + \"']\");\r\n\r\n //clear classes\r\n $col.removeClass(\"td-error\");\r\n $col.removeClass(\"td-warning\");\r\n\r\n if (hasErrors || hasWarnings)\r\n {\r\n\r\n var messageList = $(\"
    \");\r\n\r\n if (hasErrors)\r\n {\r\n var errorList = $(\"
    \" + localStrings.getLocalizedString(\"Error\") + \" :
    \");\r\n for (idx = 0; idx < errorMessages.length; idx++)\r\n {\r\n errorList.append(\"
  • \" + errorMessages[idx] + \"
  • \");\r\n }\r\n\r\n messageList.append(errorList);\r\n }\r\n\r\n if (hasWarnings)\r\n {\r\n var warningList = $(\"
    \" + localStrings.getLocalizedString(\"Warning\") + \" :
    \");\r\n for (idx = 0; idx < warningMessages.length; idx++)\r\n {\r\n warningList.append(\"
  • \" + warningMessages[idx] + \"
  • \");\r\n }\r\n\r\n messageList.append(warningList);\r\n }\r\n\r\n $col.qtip('option', 'content.text', messageList);\r\n\r\n if (hasErrors)\r\n {\r\n $col.addClass(\"td-error\");\r\n $col.qtip('option', 'style.classes', 'toolTipStyle-error');\r\n } else\r\n {\r\n $col.addClass(\"td-warning\");\r\n $col.qtip('option', 'style.classes', 'toolTipStyle-warning');\r\n }\r\n\r\n $col.qtip('disable', false);\r\n }\r\n else\r\n {\r\n $col.qtip('disable', true);\r\n }\r\n };\r\n\r\n if (!$scope.appInfo.paperwork.viewOnly)\r\n {\r\n $scope.$watch('appInfo.paperwork.deliveries.fuelDelivery.VendKey', function (newValue, oldValue)\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty(newValue) || (newValue < 0) || (newValue === oldValue) || $scope.currentView === 0)\r\n {\r\n return;\r\n }\r\n\r\n var vendKey = newValue;\r\n\r\n if ($scope.appInfo.paperwork.deliveries.context.UsesSiteAuthorizedTerminals)\r\n { // uses selected or exculusive site authorized terminals\r\n\r\n if (newValue === \"\")\r\n {\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery.TrmnlKey = \"\";\r\n $scope.appInfo.paperwork.deliveries.context.AuthorizedTerminals = [];\r\n return;\r\n }\r\n\r\n PaperworkDeliveriesService.getSiteFuelAuthorizedOrigins(\r\n $scope.appInfo.paperwork.batch.Key, vendKey\r\n ).then(function (data)\r\n {\r\n angular.copy(data, $scope.appInfo.paperwork.deliveries.context.AuthorizedTerminals);\r\n\r\n //save of bound terminal key before updating datasource\r\n var trmnlKey = $scope.appInfo.paperwork.deliveries.fuelDelivery.TrmnlKey;\r\n\r\n $scope.kendo.terminals.dataSource.data($scope.appInfo.paperwork.deliveries.context.AuthorizedTerminals);\r\n\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery.TrmnlKey = trmnlKey;\r\n\r\n });\r\n }\r\n\r\n });\r\n }\r\n\r\n var PageStage = $rootScope.$on('event:PageStage', function (event, args)\r\n {\r\n if (args === 'DREFD' && !$scope.appInfo.paperwork.viewOnly)\r\n {\r\n $scope.savePaperworkDelivery('', false, false);\r\n } \r\n });\r\n $scope.$on('$destroy', PageStage);\r\n\r\n $scope.next = function (path)\r\n {\r\n if (!$scope.validateDeliveries())\r\n return;\r\n\r\n if ($(\"#appForm\").hasClass(\"ng-dirty\"))\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, true, false));\r\n }\r\n else\r\n {\r\n $scope.savePaperworkDelivery(path, false, false);\r\n }\r\n } else\r\n {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, $scope.appInfo.paperwork.viewOnly, false));\r\n }\r\n };\r\n\r\n $scope.previous = function (path)\r\n {\r\n if ($(\"#appForm\").hasClass(\"ng-dirty\"))\r\n {\r\n if ($scope.appInfo.paperwork.viewOnly)\r\n {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, true, true));\r\n }\r\n else\r\n {\r\n $scope.savePaperworkDelivery(path, false, false, true);\r\n }\r\n } else\r\n {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, $scope.appInfo.paperwork.viewOnly, true));\r\n }\r\n };\r\n\r\n $scope.close = function (path)\r\n {\r\n if (!$scope.appInfo.paperwork.viewOnly)\r\n {\r\n $scope.savePaperworkDelivery(\"\", false, false);\r\n } else\r\n {\r\n $scope.goTo(\"/Paperwork/EnterPaperwork/\");\r\n }\r\n };\r\n\r\n $scope.submit = function ()\r\n {\r\n $scope.submitClicked = true;\r\n if (!$scope.validateDeliveries())\r\n return;\r\n\r\n if ($scope.currentView === 0 || $(\"#appForm\").hasClass(\"ng-pristine\"))\r\n { // if in record selector just submit\r\n $scope.submitPaperwork(true);\r\n } else\r\n { // if in form save and then submit\r\n\r\n $scope.savePaperworkDelivery(\"\", true, false);\r\n }\r\n };\r\n\r\n $scope.processSubmit = function (submit, skipNav) {\r\n\r\n var submitPaperworkCmdParms =\r\n {\r\n SiteKey: $scope.appInfo.paperwork.batch.SiteKey,\r\n PaperworkDate: $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true),\r\n EmailAddress: $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n SubmitPaperwork: submit,\r\n PreviouslySubmitted: $scope.appInfo.paperwork.batch.HasBeenSubmitted\r\n };\r\n\r\n PaperworkService.GetPaperworkBatchErrorWarning(submitPaperworkCmdParms).then(function (data) {\r\n //If warnings - show confirm dialog\r\n if (data.HasWarnings) {\r\n if (!angular.isUndefinedOrNullOrEmpty(data.Warnings[0])) {\r\n $scope.notifier.show(data.Warnings[0], \"warning\");\r\n\r\n var yes = function () {\r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data) {\r\n if (submit && !skipNav)\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n });\r\n };\r\n\r\n $scope.modalifier.confirm(data.Warnings[0] + \"
    \" + localStrings.getLocalizedString(\"WishToContinue\"), yes);\r\n }\r\n }\r\n else {\r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data) {\r\n if (submit && !skipNav)\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n });\r\n }\r\n });\r\n };\r\n\r\n $scope.submitPaperwork = function (submit, skipNav)\r\n {\r\n var fuelMetersAppInfo = $scope.appInfo.paperwork.apps[0];\r\n\r\n //If we have fuelMeters and fuelMeters are required, but not saved; then throw error\r\n if (fuelMetersAppInfo.HasData === 0 && fuelMetersAppInfo.IsRequired !== 0) {\r\n $timeout(function () {\r\n $scope.modalifier.showSavedError();\r\n }, 100);\r\n return;\r\n }\r\n\r\n $scope.processSubmit(submit, skipNav);\r\n };\r\n\r\n $scope.savePaperworkDelivery = function (path, submit, close, isPrevious, skipNav)\r\n {\r\n var deliveriesGrid = $(\"#deliveriesGrid\").data(\"kendoGrid\");\r\n\r\n // if there is a invalid new row remove it before validating\r\n var $lastRow = $(deliveriesGrid.tbody.children().last());\r\n var isNewRow = $lastRow.hasClass('newRow');\r\n isPrevious = isPrevious ? isPrevious : false;\r\n skipNav = skipNav ? skipNav : false;\r\n if (isNewRow)\r\n {\r\n var rowIsDirty = $lastRow.find('.k-dirty'); // find any columns that are dirty\r\n\r\n if (rowIsDirty.length === 0)\r\n {\r\n deliveriesGrid.cancelRow();\r\n }\r\n }\r\n\r\n if (!validatorSvc.executeValidations() || !$scope.validateDeliveries())\r\n {\r\n return;\r\n }\r\n\r\n if ($scope.appInfo.paperwork.deliveries.appForm)\r\n {\r\n $scope.resetDirtyFlags($scope.appInfo.paperwork.deliveries.appForm);\r\n }\r\n\r\n // if current view is record selector then don't save fuel delivery. just navigate to selected path\r\n if ($scope.currentView === 0)\r\n {\r\n if (path.length > 0)\r\n {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, false, isPrevious));\r\n return;\r\n }\r\n }\r\n\r\n angular.copy($scope.deliveriesGridDS.data().toJSON(), $scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryProducts);\r\n\r\n // if new delivery then set entry user id\r\n if ($scope.appInfo.paperwork.deliveries.fuelDelivery.Key <= 0)\r\n {\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery.EntryUserID = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress;\r\n }\r\n var paperworkDeliveryHeader =\r\n {\r\n PaperworkBatchKey: $scope.appInfo.paperwork.batch.Key,\r\n AppKey: $scope.locationInfo.sideMenuData.paperwork.deliveries.Key\r\n };\r\n\r\n PaperworkDeliveriesService.savePaperworkDelivery(paperworkDeliveryHeader, $scope.appInfo.paperwork.deliveries.fuelDelivery)\r\n .then(function (data)\r\n {\r\n data.FuelDelivery.LiftDatetime = globalizationSvc.formatDateTime(data.FuelDelivery.LiftDatetime, 'g');\r\n data.FuelDelivery.DelivDateTime = globalizationSvc.formatDateTime(data.FuelDelivery.DelivDateTime, 'g');\r\n\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery = data.FuelDelivery;\r\n\r\n $scope.appInfo.paperwork.deliveries.deliveriesList = data.FuelDeliveriesList;\r\n\r\n // initalize product filtered tanks list\r\n angular.forEach($scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryProducts, function (deliveryProduct)\r\n {\r\n deliveryProduct.FilteredTanksList = $scope.getFilteredTanksList(deliveryProduct.ProdKey);\r\n deliveryProduct.SelectedTank = deliveryProduct.FilteredTanksList.find({TankNo: deliveryProduct.FuelDeliveryTanks[0].TankNo});\r\n });\r\n\r\n var grid = $(\"#deliveriesGrid\").data(\"kendoGrid\");\r\n grid.dataSource.data(data.FuelDelivery.FuelDeliveryProducts);\r\n\r\n $scope.validateDeliveries();\r\n\r\n if (submit)\r\n {\r\n $scope.submitPaperwork(true, skipNav);\r\n return;\r\n }\r\n if (close)\r\n {\r\n $scope.submitPaperwork(false, skipNav);\r\n return;\r\n }\r\n if (path.length > 0)\r\n {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, false, isPrevious));\r\n }\r\n });\r\n };\r\n\r\n $scope.displayDeleteConfirmationModal = function ()\r\n {\r\n\r\n $scope.deleteConfirmationModalDeferred = $q.defer();\r\n\r\n $scope.showDeleteConfirmationModal = true;\r\n\r\n return $scope.deleteConfirmationModalDeferred.promise;\r\n\r\n };\r\n\r\n $scope.deleteDeliveryHandler = function (deliveryListItem)\r\n {\r\n $scope.displayDeleteConfirmationModal().then(function ()\r\n { // ok handler\r\n $scope.deletePaperworkDelivery(deliveryListItem);\r\n $scope.deleteConfirmationModalDeferred = undefined;\r\n $scope.showDeleteConfirmationModal = false;\r\n }, function ()\r\n { // cancel handler\r\n $scope.deleteConfirmationModalDeferred = undefined;\r\n $scope.showDeleteConfirmationModal = false;\r\n });\r\n };\r\n\r\n $scope.deletePaperworkDelivery = function (deliveryListItem)\r\n {\r\n PaperworkDeliveriesService.deletePaperworkDelivery(deliveryListItem, $scope.appInfo.paperwork.batch.Key)\r\n .then(function (data)\r\n {\r\n //update record selector list\r\n $scope.appInfo.paperwork.deliveries.deliveriesList = data.FuelDeliveriesList;\r\n }\r\n );\r\n };\r\n\r\n $scope.displayCommentsModalForm = function ()\r\n {\r\n $scope.showCommentsEntryModalForm = true;\r\n };\r\n\r\n $scope.perLoadFreightModalFormDeferred = undefined;\r\n\r\n $scope.displayPerLoadFreightModalForm = function ()\r\n {\r\n\r\n $scope.perLoadFreightModalFormDeferred = $q.defer();\r\n\r\n $scope.freightModalFormDelegate.fuelDeliveryFreight = angular.copy($scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryFreight);\r\n\r\n $scope.showPerLoadFreightEntryModalForm = true;\r\n\r\n return $scope.perLoadFreightModalFormDeferred.promise;\r\n\r\n };\r\n\r\n $scope.editPerLoadFreight = function ()\r\n {\r\n $scope.displayPerLoadFreightModalForm().then(function ()\r\n { // ok handler\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryFreight = angular.copy($scope.freightModalFormDelegate.fuelDeliveryFreight);\r\n $scope.freightModalFormDelegate.fuelDeliveryFreight = {};\r\n $scope.perLoadFreightModalFormDeferred = undefined;\r\n $scope.showPerLoadFreightEntryModalForm = false;\r\n }, function ()\r\n { // cancel handler\r\n $scope.perLoadFreightModalFormDeferred = undefined;\r\n $scope.showPerLoadFreightEntryModalForm = false;\r\n });\r\n };\r\n\r\n $scope.hideModals = function ()\r\n {\r\n $scope.showDeleteConfirmationModal = false;\r\n $scope.showCommentsEntryModalForm = false;\r\n $scope.showPerLoadFreightEntryModalForm = false;\r\n validatorSvc.clearAllValidations();\r\n };\r\n\r\n $scope.getFilteredTanksList = function (productKey)\r\n {\r\n var tanks = $scope.appInfo.paperwork.deliveries.context.SiteTanks;\r\n var siteTankProductLookup = $scope.appInfo.paperwork.deliveries.context.SiteTankProductLookup;\r\n\r\n var data = [];\r\n\r\n angular.forEach(siteTankProductLookup.findAll({ProductKey: productKey}), function (authorizedTank)\r\n {\r\n\r\n var tank = tanks.find({ProductKey: authorizedTank.TankProductKey});\r\n\r\n if (angular.isDefined(tank))\r\n {\r\n data.push(tank);\r\n }\r\n });\r\n\r\n return data;\r\n };\r\n\r\n $scope.deliveryIsEditable = function (delivery)\r\n {\r\n if (delivery === undefined)\r\n {\r\n delivery = $scope.appInfo.paperwork.deliveries.fuelDelivery;\r\n }\r\n\r\n if ($(\"#deliveriesGrid\").attr(\"k-editable\") === \"false\")\r\n {\r\n return false;\r\n } else if (delivery.Status > 2) { // scheduled (0) or verified (1) or entered (2) = true else false\r\n return false;\r\n } else if ($scope.appInfo.paperwork.context.lockPaperworkAfterDru && delivery.DRUPosted) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n };\r\n\r\n var deliveryGridRowValidation =\r\n {\r\n validator: function (deliveryProduct, parms)\r\n {\r\n var isValid = true;\r\n\r\n var $row = $(\"#deliveriesGrid\").data(\"kendoGrid\").tbody.find(\"tr[data-uid='\" + deliveryProduct.uid + \"']\");\r\n\r\n //gross quantity validation\r\n if ($scope.appInfo.paperwork.deliveries.context.ShowGrossUnits)\r\n {\r\n\r\n var errorGrossQty = [], warningGrossQty = [];\r\n\r\n if (deliveryProduct.DelivGrossQty === 0)\r\n {\r\n isValid = false;\r\n\r\n errorGrossQty.push(localStrings.getLocalizedString(\"GTZeroError\"));\r\n }\r\n\r\n if ((deliveryProduct.DelivGrossQty > 0) && (deliveryProduct.DelivGrossQty > deliveryProduct.SelectedTank.Capacity ))\r\n {\r\n\r\n warningGrossQty.push(localStrings.getLocalizedString(\"QuantityExceedsTank\"));\r\n\r\n }\r\n\r\n $scope.processGridColumnValidationNotification($row, 'DelivGrossQty', errorGrossQty, warningGrossQty);\r\n }\r\n\r\n //net quantity validation\r\n if ($scope.appInfo.paperwork.deliveries.context.ShowNetUnits)\r\n {\r\n\r\n var errorNetQty = [], warningNetQty = [];\r\n\r\n if (deliveryProduct.DelivNetQty === 0)\r\n {\r\n isValid = false;\r\n\r\n errorNetQty.push(localStrings.getLocalizedString(\"GTZeroError\"));\r\n }\r\n\r\n if ((deliveryProduct.DelivNetQty > 0) && (deliveryProduct.DelivNetQty > deliveryProduct.SelectedTank.Capacity ))\r\n {\r\n warningNetQty.push(localStrings.getLocalizedString(\"QuantityExceedsTank\"));\r\n }\r\n\r\n $scope.processGridColumnValidationNotification($row, 'DelivNetQty', errorNetQty, warningNetQty);\r\n }\r\n\r\n return isValid;\r\n }\r\n };\r\n\r\n $scope.showErrorTooltip = function (el) {\r\n //$scope.setupGridColumnValidationNotificationUI(el);\r\n\r\n var fieldName = el.attr('data-field');\r\n\r\n el.qtip({\r\n id: \"qtip-\" + fieldName,\r\n content: {\r\n text: \"\"\r\n },\r\n position: {\r\n adjust: {\r\n x: 15, y: -30\r\n }\r\n },\r\n style: {\r\n classes: \"toolTipStyle\"\r\n }\r\n });\r\n\r\n el.qtip('disable', true);\r\n\r\n el.qtip('option', 'content.text', localStrings.getLocalizedString('DelivDetailsRequired'));\r\n el.qtip('option', 'style.classes', 'toolTipStyle-error');\r\n el.qtip('disable', false);\r\n };\r\n\r\n $scope.validateDeliveries = function ()\r\n {\r\n // checks if control is not null, undefined and so on ...\r\n if (!$(\"#deliveriesGrid\").data(\"kendoGrid\"))\r\n return true;\r\n\r\n var deliveriesGridRowsCount = $(\"#deliveriesGrid\").data(\"kendoGrid\").dataSource.data().length;\r\n\r\n if (deliveriesGridRowsCount === 0 && !$(\"#appForm\").hasClass(\"ng-dirty\")) {\r\n return true;\r\n }\r\n \r\n if (!validatorSvc.executeValidations()) {\r\n return deliveriesGridRowsCount === 0;\r\n }\r\n\r\n var $gridActionFooter = $(\"#petronetGridActionFooterRow\");\r\n var $gridActionFooterRowMiddle = $(\"#petronetGridActionFooterRowMiddle\");\r\n\r\n $gridActionFooter.removeClass(\"td-error\");\r\n $gridActionFooterRowMiddle.removeClass(\"td-error\");\r\n\r\n var isValid = true;\r\n\r\n if (deliveriesGridRowsCount === 0) {\r\n\r\n $gridActionFooter.addClass(\"td-error\");\r\n $gridActionFooterRowMiddle.addClass(\"td-error\");\r\n\r\n $scope.showErrorTooltip($gridActionFooter);\r\n $scope.showErrorTooltip($gridActionFooterRowMiddle);\r\n\r\n return false;\r\n }\r\n\r\n var deliveriesGrid = $(\"#deliveriesGrid\").data(\"kendoGrid\");\r\n\r\n angular.forEach(deliveriesGrid.dataSource.data(), function (delivery)\r\n {\r\n isValid = isValid && deliveryGridRowValidation.validator(delivery);\r\n });\r\n\r\n return isValid;\r\n };\r\n\r\n $scope.getStatusDescription = function ()\r\n {\r\n if ($scope.appInfo.paperwork.deliveries.fuelDelivery.Status === 0)\r\n {\r\n return 'Scheduled';\r\n } else if ($scope.appInfo.paperwork.deliveries.fuelDelivery.Status === 1)\r\n {\r\n return 'Verified';\r\n }\r\n if ($scope.appInfo.paperwork.deliveries.fuelDelivery.Status === 2)\r\n {\r\n return 'Entered';\r\n }\r\n if ($scope.appInfo.paperwork.deliveries.fuelDelivery.Status === 3)\r\n {\r\n return 'Posted';\r\n }\r\n if ($scope.appInfo.paperwork.deliveries.fuelDelivery.Status === 4)\r\n {\r\n return 'Confirmed';\r\n }\r\n if ($scope.appInfo.paperwork.deliveries.fuelDelivery.Status === 5)\r\n {\r\n return 'Reconciled';\r\n }\r\n };\r\n\r\n var liftDateValidation =\r\n {\r\n name: 'validateLiftDate',\r\n validationMessage: '',\r\n validationMessageWrn: '',\r\n validatorError: function (liftDateTime, parms)\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty(liftDateTime)) {\r\n return true;\r\n }\r\n\r\n var hasError = false;\r\n var errorMsg = '';\r\n\r\n var liftDateTimeObject = new Date(liftDateTime);\r\n var delivDateTimeObject = new Date($scope.appInfo.paperwork.deliveries.fuelDelivery.DelivDateTime);\r\n\r\n if (delivDateTimeObject < liftDateTimeObject) {\r\n errorMsg = localStrings.getLocalizedString(\"LiftDateNot\");\r\n hasError = true;\r\n }\r\n if (!hasError) {\r\n return !hasError;\r\n }\r\n var maxDateTime = $scope.addDaysToDate($scope.formatDateTime($scope.appInfo.paperwork.batch.PaperworkDate), 1);\r\n var minDateTime = $scope.addDaysToDate($scope.formatDateTime($scope.appInfo.paperwork.batch.PaperworkDate), -1);\r\n\r\n if ((liftDateTimeObject > maxDateTime) || (liftDateTimeObject < minDateTime)) {\r\n if (errorMsg !== '') {\r\n errorMsg = errorMsg + '\\r\\n';\r\n }\r\n errorMsg = errorMsg + localStrings.getLocalizedString(\"LiftDateNotWithin\");\r\n hasError = true;\r\n }\r\n\r\n this.validationMessage = errorMsg;\r\n\r\n return !hasError;\r\n },\r\n validatorWarning: function (liftDateTime, parms)\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty(liftDateTime)) {\r\n return true;\r\n }\r\n\r\n var hasWarning = false;\r\n\r\n var liftDateTimeObject = new Date(liftDateTime);\r\n\r\n var maxDateTime = $scope.addDaysToDate($scope.formatDateTime($scope.appInfo.paperwork.batch.PaperworkDate), 1);\r\n var minDateTime = $scope.addDaysToDate($scope.formatDateTime($scope.appInfo.paperwork.batch.PaperworkDate), -1);\r\n\r\n if ((liftDateTimeObject > maxDateTime) || (liftDateTimeObject < minDateTime)) {\r\n this.validationMessageWrn = localStrings.getLocalizedString(\"LiftDateNotWithin\");\r\n hasWarning = true;\r\n }\r\n\r\n return !hasWarning;\r\n }\r\n };\r\n\r\n $scope.validateLiftDate = new pdi.ng.validate.PdiValidation(liftDateValidation);\r\n\r\n var deliveryDateValidation =\r\n {\r\n name: 'validateDeliveryDate',\r\n validationMessage: '',\r\n validationMessageWrn: '',\r\n validatorError: function (deliveryDateTime, parms)\r\n {\r\n var hasError = false;\r\n var errorMsg = '';\r\n\r\n var liftDateTimeObject = new Date($scope.appInfo.paperwork.deliveries.fuelDelivery.LiftDatetime);\r\n var delivDateTimeObject = new Date(deliveryDateTime);\r\n\r\n if (delivDateTimeObject < liftDateTimeObject) {\r\n errorMsg = localStrings.getLocalizedString(\"DeliveryDateNot\");\r\n hasError = true;\r\n }\r\n if (!hasError) {\r\n return !hasError;\r\n }\r\n\r\n var maxDateTime = $scope.addDaysToDate($scope.formatDateTime($scope.appInfo.paperwork.batch.PaperworkDate), 1);\r\n var minDateTime = $scope.addDaysToDate($scope.formatDateTime($scope.appInfo.paperwork.batch.PaperworkDate), -1);\r\n\r\n if ((delivDateTimeObject > maxDateTime) || (delivDateTimeObject < minDateTime)) {\r\n if (errorMsg !== '') {\r\n errorMsg = errorMsg + '\\r\\n';\r\n }\r\n errorMsg = errorMsg + localStrings.getLocalizedString(\"DeliveryDateNotWithin\");\r\n hasError = true;\r\n }\r\n\r\n this.validationMessage = errorMsg;\r\n return !hasError;\r\n },\r\n validatorWarning: function (deliveryDateTime, parms)\r\n {\r\n var hasWarning = false;\r\n\r\n var delivDateTimeObject = new Date(deliveryDateTime);\r\n\r\n var maxDateTime = $scope.addDaysToDate($scope.formatDateTime($scope.appInfo.paperwork.batch.PaperworkDate), 1);\r\n var minDateTime = $scope.addDaysToDate($scope.formatDateTime($scope.appInfo.paperwork.batch.PaperworkDate), -1);\r\n\r\n if ((delivDateTimeObject > maxDateTime) || (delivDateTimeObject < minDateTime)) {\r\n this.validationMessageWrn = localStrings.getLocalizedString(\"DeliveryDateNotWithin\");\r\n hasWarning = true;\r\n }\r\n\r\n return !hasWarning;\r\n }\r\n };\r\n\r\n $scope.validateDeliveryDate = new pdi.ng.validate.PdiValidation(deliveryDateValidation);\r\n\r\n\r\n $scope.viewDelivery = function (deliveryKey)\r\n {\r\n PaperworkDeliveriesService.getDelivery(\r\n deliveryKey,\r\n $scope.appInfo.paperwork.batch.Key\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery = {};\r\n\r\n data.LiftDatetime = globalizationSvc.formatDateTime(data.LiftDatetime, 'g');\r\n data.DelivDateTime = globalizationSvc.formatDateTime(data.DelivDateTime, 'g');\r\n\r\n $scope.appInfo.paperwork.deliveries.fuelDelivery = data;\r\n\r\n $scope.freightModalFormDelegate.fuelDeliveryFreight = $scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryFreight;\r\n\r\n // initalize product filtered tanks list\r\n angular.forEach($scope.appInfo.paperwork.deliveries.fuelDelivery.FuelDeliveryProducts, function (deliveryProduct)\r\n {\r\n deliveryProduct.FilteredTanksList = $scope.getFilteredTanksList(deliveryProduct.ProdKey);\r\n deliveryProduct.SelectedTank = deliveryProduct.FilteredTanksList.find({TankNo: deliveryProduct.FuelDeliveryTanks[0].TankNo});\r\n });\r\n\r\n $scope.initializeDeliveriesGrid();\r\n\r\n $scope.changeView(1);\r\n\r\n });\r\n };\r\n\r\n $scope.editPerLoadFreightOkHandler = function ()\r\n {\r\n\r\n if (!validatorSvc.executeValidationsForScope($scope.freightModalFormDelegate))\r\n {\r\n return;\r\n }\r\n\r\n // workaround for the above code does not set the validatity of the model correctly. maybe a timing issue\r\n $timeout(function ()\r\n {\r\n\r\n var hasError = $(\"#deliveryFreightTable\").find(\".td-error\");\r\n\r\n if (hasError.length > 0)\r\n {\r\n return;\r\n }\r\n\r\n $scope.perLoadFreightModalFormDeferred.resolve();\r\n }, 100);\r\n };\r\n\r\n $scope.editPerLoadFreightCancelHandler = function ()\r\n {\r\n $scope.perLoadFreightModalFormDeferred.reject();\r\n };\r\n\r\n })\r\n .controller('enterPaperworkDeliveriesFreightModalCtrl', function ($scope, $rootScope, $routeParams, PaperworkService, $filter,\r\n PaperworkDeliveriesService, $location, WebFunctions, validatorSvc, $timeout, localizationSvc, globalizationSvc)\r\n {\r\n 'use strict';\r\n\r\n $scope.modalInfo = {};\r\n $scope.kInputOptions = {\r\n culture: globalizationSvc.getLocale(),\r\n format: \"n\",\r\n decimals: 2,\r\n spinners: false\r\n };\r\n\r\n var parentController = angular.element('#deliveriesForm').scope();\r\n\r\n parentController.freightModalFormDelegate = $scope;\r\n\r\n $scope.fuelDeliveryFreight = {};\r\n\r\n $scope.addDeliveryFreightRow = function ()\r\n {\r\n var newFreightRow = {\r\n \"CalcAmt\": 0,\r\n \"DelProdKey\": null,\r\n \"FrtVndInvKey\": null,\r\n \"FrtVndInvPndKey\": null,\r\n \"FrtRuleKey\": null,\r\n \"FuelDelKey\": $scope.appInfo.paperwork.deliveries.fuelDelivery.Key,\r\n \"InvcAmt\": 0,\r\n \"Key\": 0,\r\n \"Override\": -1,\r\n \"ReconUserID\": null,\r\n \"Reconciled\": 0,\r\n \"Type\": 6,\r\n \"Timestamp\": \"\"\r\n };\r\n\r\n $scope.fuelDeliveryFreight.push(newFreightRow);\r\n };\r\n\r\n\r\n var freightRowValidation =\r\n {\r\n name: 'validateFreightRow',\r\n validationMessage: '',\r\n validatorError: function (freight, parms)\r\n {\r\n var isValid = true;\r\n\r\n //reset Errors\r\n freight.freightRuleValidation = {hasErrors: false, errorDescription: \"\"};\r\n\r\n if (angular.isUndefinedOrNullOrEmpty(freight.FrtRuleKey))\r\n {\r\n isValid = false;\r\n freight.freightRuleValidation = { hasErrors: true, errorDescription: localStrings.getLocalizedString(\"Required\") };\r\n }\r\n\r\n if (isValid)\r\n { //cleanup view model\r\n freight.freightRuleValidation = {};\r\n }\r\n\r\n return isValid;\r\n }\r\n };\r\n\r\n $scope.validateFreightRow = new pdi.ng.validate.PdiValidation(freightRowValidation);\r\n\r\n })\r\n .controller('enterPaperworkDealerFormsCtrl', function ($scope, $rootScope, $routeParams, PaperworkService, localizationSvc,$filter, PaperworkDealerFormsService, $location, WebFunctions, $timeout, templates, globalizationSvc, setupNav)\r\n {\r\n 'use strict';\r\n $scope.dealerFormsLoaded = false;\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n\r\n // controller destructor\r\n $scope.$on(\"$destroy\", function handler()\r\n {\r\n $rootScope.scopesToValidate = [];\r\n });\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n $scope.appInfo.paperwork.viewOnly = $location.$$path.indexOf('/ViewPaperworkDealerForms/') > -1;\r\n\r\n $scope.formsEditable = true;\r\n\r\n if ($routeParams.paperworkKey)\r\n {\r\n $scope.appInfo.paperwork.paperworkKey = $routeParams.paperworkKey;\r\n }\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaperworkSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = '1';\r\n $scope.appInfo.paperwork.batch = {};\r\n\r\n // TODO To add the ability to add this to every possible field, we would run a foreach for each field in loadDealerForms and then attach this with their precision\r\n $scope.appInfo.paperwork.kOptions = {\r\n culture: globalizationSvc.getLocale(),\r\n format: \"n\",\r\n decimals: 2,\r\n spinners: false,\r\n min: -999999999\r\n };\r\n\r\n if (!$scope.appInfo.paperwork.context)\r\n {\r\n PaperworkService.getPaperworkContext($scope.appInfo.webUser.CurrentAuthorization.CustContKey, true).then(\r\n function (data)\r\n {\r\n $scope.appInfo.paperwork.context = {};\r\n $scope.appInfo.paperwork.context.paperworkSites = data.PaperworkSites;\r\n $scope.appInfo.paperwork.context.selectedSite = data.SelectedSiteKey;\r\n $scope.appInfo.paperwork.context.lockPaperworkAfterDru = data.LockPaperworkAfterDru;\r\n\r\n $scope.appInfo.paperwork.context.calculatedPriceToPriorDaysPriceVariance = data.CalculatedPriceToPriorDaysPriceVariance;\r\n $scope.appInfo.paperwork.context.calculatedPriceToCapturedRetailPriceVariance = data.CalculatedPriceToCapturedRetailPriceVariance;\r\n $scope.appInfo.paperwork.context.netSalesDollarsToCapturedRetailPriceNetUnitsVariance = data.NetSalesDollarsToCapturedRetailPriceNetUnitsVariance;\r\n\r\n $scope.locationInfo.showEnterPaperworkMenuItem = $scope.appInfo.paperwork.context.paperworkSites[0] ?\r\n $scope.appInfo.paperwork.context.paperworkSites[0].CanEnterPaperwork :\r\n false;\r\n\r\n if (!$scope.locationInfo.showEnterPaperworkMenuItem)\r\n {\r\n $scope.locationInfo.sideMenuData.subMenu = '2';\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n }\r\n }\r\n );\r\n }\r\n\r\n if ($scope.appInfo.paperwork.paperworkKey > 0)\r\n {\r\n //We are loading a known existing paperwork batch\r\n PaperworkService.OpenPaperworkBatchByKey(\r\n $scope.appInfo.paperwork.paperworkKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.Id,\r\n $scope.appInfo.paperwork.viewOnly\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.paperwork.batch = data.PaperworkBatch.PaperworkBatch;\r\n $scope.appInfo.paperwork.apps = data.PaperworkBatch.PaperworkApps;\r\n $scope.appInfo.paperwork.form = data.PaperworkBatch.PaperworkForm;\r\n $scope.appInfo.paperwork.siteInfo = data.PaperworkBatch.PaperworkSiteInfo;\r\n \r\n // resolve if this is the first or last page\r\n var res = setupNav.firstLastPage('DRDFE',$scope.appInfo.paperwork.apps);\r\n $scope.locationInfo.sideMenuData.isFirstPage = res.isFirstPage;\r\n $scope.locationInfo.sideMenuData.isLastPage = res.isLastPage;\r\n \r\n $rootScope.$broadcast('event:PaperworkLoaded', $scope.appInfo.paperwork.viewOnly, $scope.appInfo.paperwork.paperworkKey);\r\n\r\n var nextApp = true;\r\n angular.forEach($scope.appInfo.paperwork.apps, function (app, index)\r\n {\r\n if (app.MenuCode === 'DRDFE')\r\n {\r\n $scope.loadDealerForms();\r\n nextApp = false;\r\n }\r\n });\r\n if (nextApp)\r\n {\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n }\r\n }, function ()\r\n {\r\n $location.path(\"/Paperwork/ReviewPaperwork\");\r\n });\r\n } else\r\n {\r\n //todo: goback...\r\n }\r\n $scope.locationInfo.sideMenuData.pwSubMenu = '3';\r\n };\r\n\r\n var newPWBatchLoadedListener = $rootScope.$on('event:NewPaperworkBatchLoaded', function (event, data)\r\n {\r\n $scope.loadDealerForms();\r\n });\r\n\r\n $scope.$on('$destroy', newPWBatchLoadedListener);\r\n\r\n $scope.loadDealerForms = function ()\r\n {\r\n angular.forEach($scope.appInfo.paperwork.context.paperworkSites, function (site, index)\r\n {\r\n if (site.SiteKey === $scope.appInfo.paperwork.batch.SiteKey)\r\n $scope.appInfo.paperwork.context.selectedSiteObj = site;\r\n });\r\n\r\n PaperworkDealerFormsService.loadDealerForms($scope.appInfo.paperwork.batch.Key).then(function (data)\r\n {\r\n // if(data.count == 0){\r\n // TODO: No forms, do something...\r\n // }\r\n $scope.appInfo.paperwork.dealerForms = data.DealerForms;\r\n $scope.setupDisplayValues();\r\n\r\n $scope.dealerFormsLoaded = true;\r\n\r\n $scope.formsEditable = !($scope.appInfo.paperwork.context.lockPaperworkAfterDru && $scope.appInfo.paperwork.dealerForms.Header.Updated);\r\n\r\n $timeout(function(){\r\n if (!$scope.formsEditable) {\r\n $('#sectionDealerForms input').attr(\"disabled\", true);\r\n }\r\n });\r\n\r\n $scope.updateDealerForms();\r\n $scope.setFocus();\r\n });\r\n };\r\n\r\n $scope.setupDisplayValues = function () {\r\n $scope.appInfo.paperwork.dealerForms.AllFieldsDisplay = {};\r\n\r\n angular.forEach($scope.appInfo.paperwork.dealerForms.AllFields, function (field, index) {\r\n var newObject = {};\r\n\r\n angular.forEach(Object.keys(field), function (property, index) {\r\n if (property === \"DataIDValue\")\r\n newObject[property] = globalizationSvc.formatNumeric(field[property], \"n2\");\r\n });\r\n\r\n $scope.appInfo.paperwork.dealerForms.AllFieldsDisplay[field.Key] = newObject;\r\n });\r\n };\r\n\r\n var PageStage = $rootScope.$on('event:PageStage', function (event, args)\r\n {\r\n if (args === 'DRDFE' && !$scope.appInfo.paperwork.viewOnly)\r\n {\r\n $scope.saveDealerForms('', false, true);\r\n } \r\n });\r\n $scope.$on('$destroy', PageStage);\r\n\r\n $scope.next = function (path)\r\n {\r\n if (!$scope.appInfo.paperwork.viewOnly)\r\n $scope.saveDealerForms(path, false, true);\r\n else\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, true, false));\r\n };\r\n\r\n $scope.previous = function (path)\r\n {\r\n if (!$scope.appInfo.paperwork.viewOnly)\r\n $scope.saveDealerForms(path, false, false, true);\r\n else\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, true, true));\r\n };\r\n\r\n $scope.close = function ()\r\n {\r\n if (!$scope.appInfo.paperwork.viewOnly)\r\n {\r\n $scope.saveDealerForms('', false, false);\r\n } else\r\n {\r\n $scope.goTo(\"/Paperwork/EnterPaperwork/\");\r\n }\r\n };\r\n\r\n $scope.submit = function ()\r\n {\r\n $scope.submitClicked = true;\r\n $scope.saveDealerForms('', true, false);\r\n };\r\n\r\n $scope.processSubmit = function (submit, skipNav) {\r\n var submitPaperworkCmdParms =\r\n {\r\n SiteKey: $scope.appInfo.paperwork.batch.SiteKey,\r\n PaperworkDate: $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true),\r\n EmailAddress: $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n SubmitPaperwork: submit,\r\n PreviouslySubmitted: $scope.appInfo.paperwork.batch.HasBeenSubmitted\r\n };\r\n\r\n PaperworkService.GetPaperworkBatchErrorWarning(submitPaperworkCmdParms).then(function (data) {\r\n //If warnings - show confirm dialog\r\n if (data.HasWarnings) {\r\n if (!angular.isUndefinedOrNullOrEmpty(data.Warnings[0])) {\r\n $scope.notifier.show(data.Warnings[0], \"warning\");\r\n\r\n var yes = function () {\r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data) {\r\n if (submit && !skipNav)\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n });\r\n };\r\n\r\n $scope.modalifier.confirm(data.Warnings[0] + \"
    \" + localStrings.getLocalizedString(\"WishToContinue\"), yes);\r\n }\r\n }\r\n else {\r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data) {\r\n if (submit && !skipNav)\r\n $scope.goTo(\"Paperwork/InventorySummary/\" + $scope.appInfo.paperwork.batch.SiteKey + \"/\" + $scope.urlFormatDate($scope.appInfo.paperwork.batch.PaperworkDate, true));\r\n });\r\n }\r\n });\r\n };\r\n\r\n $scope.submitPaperwork = function (submit, skipNav)\r\n {\r\n var fuelMetersAppInfo = $scope.appInfo.paperwork.apps[0];\r\n\r\n //If we have fuelMeters and fuelMeters are required, but not saved; then throw error\r\n if (fuelMetersAppInfo.HasData === 0 && fuelMetersAppInfo.IsRequired !== 0) {\r\n $timeout(function () {\r\n $scope.modalifier.showSavedError();\r\n }, 100);\r\n return;\r\n }\r\n\r\n $scope.processSubmit(submit, skipNav);\r\n };\r\n\r\n $scope.saveDealerForms = function (path, submit, close, isPrevious, skipNav)\r\n {\r\n isPrevious = isPrevious ? isPrevious : false;\r\n skipNav = skipNav ? skipNav : false;\r\n\r\n $scope.resetDirtyFlags($scope.dealerFormsForm);\r\n\r\n if ($scope.appInfo.paperwork.dealerForms) {\r\n $scope.appInfo.paperwork.dealerForms.Header.UserName = $scope.appInfo.paperwork.form.UserName;\r\n $scope.appInfo.paperwork.form.Caption = $scope.appInfo.paperwork.dealerForms.DealerFormVersion.Caption;\r\n PaperworkDealerFormsService.saveDealerForms($scope.appInfo.paperwork.dealerForms.Header,\r\n $scope.appInfo.paperwork.dealerForms.AllFields).then(function (data) {\r\n $scope.appInfo.paperwork.dealerForms = data.DealerForms;\r\n $scope.setupDisplayValues();\r\n\r\n if (submit) {\r\n $scope.submitPaperwork(true, skipNav);\r\n return;\r\n } else if (close) {\r\n $scope.submitPaperwork(false, skipNav);\r\n return;\r\n }\r\n });\r\n }\r\n if (path.length > 0) {\r\n $scope.goTo(setupNav.navigateToPage(path,$scope.appInfo.paperwork.apps,$scope.appInfo.paperwork.paperworkKey, false, isPrevious));\r\n }\r\n };\r\n\r\n $scope.setFocus = function ()\r\n {\r\n var focusSet = false;\r\n for (var x = 0; x < $scope.appInfo.paperwork.dealerForms.Rows[0].length; x++)\r\n {\r\n for (var y = 0; y < $scope.appInfo.paperwork.dealerForms.Rows.length; y++)\r\n {\r\n var key = $scope.appInfo.paperwork.dealerForms.Rows[y][x];\r\n if (key > 0)\r\n {\r\n if (!$scope.appInfo.paperwork.dealerForms.AllFields[key].DisplayOnly && !$scope.appInfo.paperwork.dealerForms.AllFields[key].IsCalculated && !focusSet)\r\n {\r\n $scope.appInfo.paperwork.dealerForms.AllFields[key].setFocus = true;\r\n focusSet = true;\r\n }\r\n else\r\n $scope.appInfo.paperwork.dealerForms.AllFields[key].setFocus = false;\r\n }\r\n }\r\n }\r\n };\r\n\r\n $scope.onDealerFormChange = function (index, value) {\r\n var dataIDValue = $scope.appInfo.paperwork.dealerForms.AllFieldsDisplay[index].DataIDValue;\r\n $scope.appInfo.paperwork.dealerForms.AllFields[index].DataIDValue = isNaN(parseFloat(dataIDValue)) ? 0.00 : parseFloat(globalizationSvc.convertStringToNumber($scope.appInfo.paperwork.dealerForms.AllFieldsDisplay[index].DataIDValue));\r\n };\r\n\r\n $scope.updateDealerForms = function ()\r\n {\r\n angular.forEach($scope.appInfo.paperwork.dealerForms.CalcFields, function (calcField, index)\r\n {//look through all the calc field references\r\n \r\n $scope.appInfo.paperwork.dealerForms.AllFields[calcField.Key].DataIDValue = 0;//We actually store all values in AllFields collection\r\n angular.forEach($scope.appInfo.paperwork.dealerForms.Calcuations, function (calc, index)\r\n {\r\n if (calc.ResultTypeKey === calcField.TypeKey)\r\n {//If the result of the calculation is stored on this calc field then...\r\n angular.forEach($scope.appInfo.paperwork.dealerForms.AllFields, function (field, index)\r\n {\r\n $scope.appInfo.paperwork.dealerForms.AllFieldsDisplay[index].DataIDValue = globalizationSvc.formatNumeric($scope.appInfo.paperwork.dealerForms.AllFields[index].DataIDValue, \"n2\");\r\n\r\n if (calc.CalcTypeKey === field.TypeKey)\r\n {//If this field is the calc type from this calculation then\r\n if (calc.Operation === 0)\r\n {//Add\r\n $scope.appInfo.paperwork.dealerForms.AllFields[calcField.Key].DataIDValue =\r\n $scope.appInfo.paperwork.dealerForms.AllFields[calcField.Key].DataIDValue +\r\n field.DataIDValue;//Store the data back in the AllFields collection.\r\n } else\r\n {//Subtract\r\n $scope.appInfo.paperwork.dealerForms.AllFields[calcField.Key].DataIDValue =\r\n $scope.appInfo.paperwork.dealerForms.AllFields[calcField.Key].DataIDValue -\r\n field.DataIDValue;//Store the data back in the AllFields collection.\r\n }\r\n }\r\n });\r\n }\r\n });\r\n });\r\n }; \r\n })\r\n .controller('inventorySummaryCtrl', function ($scope, $rootScope, WebFunctions, $timeout, templates)\r\n {\r\n 'use strict';\r\n\r\n // controller destructor\r\n $scope.$on(\"$destroy\", function handler()\r\n {\r\n $rootScope.scopesToValidate = [];\r\n });\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 30;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaperworkSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = '3';\r\n\r\n $timeout(function ()\r\n {\r\n var inventorySideMenuController = angular.element('#inventorySummarySideMenu').scope();\r\n\r\n inventorySideMenuController.setSiteAndDate();\r\n });\r\n\r\n\r\n };\r\n })\r\n .controller(\"paperworkReportsSideMenuCtrl\", function ($scope)\r\n {\r\n 'use strict';\r\n $scope.initialize = function () {\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 31;\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n };\r\n })\r\n .controller(\"paperworkReportSideMenuCtrl\", function ($scope, PaperworkService, PaperworkReportsService, validatorSvc, reportingService, globalizationSvc) {\r\n 'use strict';\r\n $scope.initialize = function () {\r\n\r\n if (!$scope.locationInfo.sideMenuData.subMenu) {\r\n $scope.goTo(\"/Paperwork/Reports\");\r\n return;\r\n }\r\n\r\n //There is a race condition when reloading the page\r\n //Check if the date selector is undefined, if it is then initialize it\r\n if (angular.isUndefinedOrNullOrEmpty($scope.dateSelector)) {\r\n $scope.initializeDateSelector();\r\n }\r\n\r\n $scope.dateSelector.overrideDefaults = true;\r\n $scope.dateSelector.displaySelector = true;\r\n $scope.dateSelector.selection = 0;\r\n $scope.dateSelector.hideAllDays = true;\r\n\r\n var report = $scope.getReportFromSubMenu($scope.locationInfo.sideMenuData.subMenu);\r\n\r\n if (!report) {\r\n $scope.goTo(\"/Paperwork/Reports\");\r\n return;\r\n }\r\n\r\n PaperworkReportsService\r\n .getPaperworkReportSites(report.Name, $scope.appInfo.webUser.CurrentAuthorization.CustContKey, false)\r\n .then(function (data) {\r\n if (data.Successful && !angular.isUndefinedOrNullOrEmpty(data.PaperworkReportSites)) {\r\n $scope.appInfo.paperwork.reports.PaperworkReportSites = data.PaperworkReportSites;\r\n $scope.appInfo.paperwork.reports.site = data.PaperworkReportSites[0];\r\n }\r\n else {\r\n $scope.modalifier.showSetupError();\r\n }\r\n }\r\n );\r\n };\r\n\r\n $scope.getReportFromSubMenu = function (subMenu) {\r\n if ($scope.appInfo.paperwork.reports.paperworkReports) {\r\n return $scope.appInfo.paperwork.reports.paperworkReports\r\n .filter(function (item) {\r\n return item.Name === subMenu;\r\n })[0];\r\n }\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args) {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format) {\r\n if (!validatorSvc.executeValidations()) {\r\n return;\r\n }\r\n\r\n var report = $scope.getReportFromSubMenu($scope.locationInfo.sideMenuData.subMenu);\r\n\r\n if (!report) {\r\n $scope.goTo(\"/Paperwork/Reports\");\r\n return;\r\n }\r\n\r\n PaperworkService\r\n .ValidatePaperworkSiteDateForContact(\r\n $scope.appInfo.paperwork.reports.site.Key,\r\n $scope.urlFormatDate($scope.dateSelector.startDate, true),\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n false)\r\n .then(function (data) {\r\n var qs = \"reportName=\" + report.Name +\r\n \"&reportSubjectArea=\" + report.SubjectArea +\r\n \"&isStoreReport=\" + \"1\" +\r\n \"&RP-Site=\" + $scope.appInfo.paperwork.reports.site.Id +\r\n \"&RP-BegDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-EndDate=\" + $scope.dateSelector.endDate +\r\n \"&RP-Language=\" + globalizationSvc.getLocale().slice(0, 2) +\r\n \"&RP-UseLatest=\" + \"0\";\r\n\r\n if (format) {\r\n reportingService.exportReport(qs, format);\r\n }\r\n else {\r\n reportingService.renderReport(qs);\r\n }\r\n });\r\n };\r\n })\r\n .controller('paperworkReportCtrl', function ($scope, $rootScope, WebFunctions, templates) {\r\n 'use strict';\r\n\r\n // controller destructor\r\n $scope.$on(\"$destroy\", function handler() {\r\n $rootScope.scopesToValidate = [];\r\n });\r\n\r\n $scope.initialize = function () {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.PaperworkEntry)) {\r\n $scope.goTo(\"/Home\");\r\n return;\r\n }\r\n\r\n if (!$scope.locationInfo.sideMenuData.subMenu) {\r\n $scope.goTo(\"/Paperwork/Reports\");\r\n return;\r\n }\r\n\r\n $scope.locationInfo.menuLocation = 3;\r\n $scope.locationInfo.subMenuLocation = 31;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportsSideMenu\");\r\n };\r\n })\r\n .controller(\"paperworkSideMenuCtrl\", function ($scope, PaperworkService, $rootScope, $interval)\r\n {\r\n 'use strict';\r\n\r\n /*\r\n Use $interval to periodically refresh the paperwork lock.\r\n When the user navigates away from the page the $destroy listener is triggered to kill off the $interval.\r\n Likewise, the $interval is stopped when the paperwork is submitted in services.paperwork.\r\n This is paired with a query in CustomerRepository in EntWeb that wipes out Petronet Locks if they are > 20 minutes old.\r\n */\r\n\r\n var intervalPromise;\r\n var paperworkBatchKey = 0;\r\n var intervalTime = 120000;//Every 2 mins\r\n var beforeunloadEventCreated = false;\r\n\r\n function refreshLock() {\r\n if (paperworkBatchKey > 0) {\r\n console.log(\"Lock refreshed for Batch#\" + paperworkBatchKey);\r\n PaperworkService.RefreshPaperworkLock(paperworkBatchKey);\r\n }\r\n }\r\n\r\n $scope.startLockInterval = function (data) {\r\n $scope.stopLockInterval();\r\n intervalPromise = $interval(refreshLock, intervalTime);\r\n };\r\n\r\n $scope.stopLockInterval = function () {\r\n $interval.cancel(intervalPromise);\r\n };\r\n\r\n const beforeUnloadHandler = function (event) {\r\n // Remove the paperwork lock\r\n PaperworkService.RemovePaperworkLock(paperworkBatchKey, $scope.appInfo.webUser.CurrentAuthorization.Customer.ID);\r\n event.preventDefault();\r\n };\r\n\r\n //When we load a paperwork batch, detect if we need to periodically refresh the lock\r\n var pwLockListener = $rootScope.$on('event:PaperworkLoaded', function (event, viewOnly, data) {\r\n if (!viewOnly && !angular.isUndefinedOrNullOrEmpty(data)) {\r\n paperworkBatchKey = data;\r\n amplify.store(\"removeLockInfo\", {batchKey: paperworkBatchKey, custKey: $scope.appInfo.webUser.CurrentAuthorization.Customer.ID});\r\n $scope.startLockInterval();\r\n if (!beforeunloadEventCreated) {\r\n window.addEventListener(\"beforeunload\", beforeUnloadHandler);\r\n beforeunloadEventCreated = true;\r\n }\r\n }\r\n });\r\n\r\n //When paperwork is submitted stop the lock refresh\r\n var pwSubmitListener = $rootScope.$on('event:PaperworkSubmitted', function () {\r\n $scope.stopLockInterval();\r\n PaperworkService.RemovePaperworkLock(paperworkBatchKey, $scope.appInfo.webUser.CurrentAuthorization.Customer.ID);\r\n paperworkBatchKey = 0;\r\n });\r\n\r\n //When we navigate away from this page destroy the listeners and interval\r\n $scope.$on('$destroy', function () {\r\n $scope.stopLockInterval();\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.appInfo.webUser)) {\r\n PaperworkService.RemovePaperworkLock(paperworkBatchKey, $scope.appInfo.webUser.CurrentAuthorization.Customer.ID);\r\n }\r\n pwLockListener();\r\n pwSubmitListener();\r\n paperworkBatchKey = 0;\r\n if (beforeunloadEventCreated) {\r\n window.removeEventListener(\"beforeunload\", beforeUnloadHandler);\r\n }\r\n });\r\n\r\n })\r\n .factory(\"setupNav\", [ function()\r\n {\r\n\r\n return {\r\n getRouterPath: getRouterPath,\r\n navigateToPage: navigateToPage,\r\n firstLastPage: firstLastPage,\r\n getSinglePath: getSinglePath,\r\n resolveCurrentPageMenuCode: resolveCurrentPageMenuCode\r\n };\r\n\r\n function getRouterPath (app, paperworkKey, isView){\r\n if (app && paperworkKey) {\r\n var path = '';\r\n var pathMode = !isView?'Enter':'View';\r\n \r\n if (app.DealerFormVersionKey > 0 && !app.MenuCode) {\r\n app.MenuCode = 'DRDFE';\r\n }\r\n\r\n switch (app.MenuCode) {\r\n case 'DREFD':\r\n path = `/Paperwork/${pathMode}PaperworkDeliveries/` + paperworkKey;\r\n break;\r\n case 'DRDFE':\r\n path = `/Paperwork/${pathMode}PaperworkDealerForms/` + paperworkKey;\r\n break;\r\n case 'DREGS':\r\n path = `/Paperwork/${pathMode}PaperworkTanks/` + paperworkKey;\r\n break;\r\n case 'DREGM':\r\n path = `/Paperwork/${pathMode}Paperwork/` + paperworkKey;\r\n break;\r\n default:\r\n path = '/Home';\r\n }\r\n \r\n return path;\r\n }\r\n }\r\n\r\n function getSinglePath(menuCode, paperworkKey, isView, noKey){\r\n \r\n if (menuCode && paperworkKey) {\r\n var path = '';\r\n var pathMode = !isView?'Enter':'View';\r\n if (noKey) paperworkKey = '';\r\n\r\n switch (menuCode) {\r\n case 'DREFD':\r\n path = `/Paperwork/${pathMode}PaperworkDeliveries/` + paperworkKey;\r\n break;\r\n case 'DRDFE':\r\n path = `/Paperwork/${pathMode}PaperworkDealerForms/` + paperworkKey;\r\n break;\r\n case 'DREGS':\r\n path = `/Paperwork/${pathMode}PaperworkTanks/` + paperworkKey;\r\n break;\r\n case 'DREGM':\r\n path = `/Paperwork/${pathMode}Paperwork/` + paperworkKey;\r\n break;\r\n default:\r\n path = '/Home';\r\n }\r\n \r\n return path;\r\n }\r\n }\r\n\r\n function navigateToPage(currentPage, apps, paperworkKey, isView, isPrevious){\r\n if (!currentPage || !apps || !paperworkKey)\r\n return;\r\n\r\n // find current page based on the menu code\r\n var menuOrder = apps.findIndex(function(el){\r\n return el.MenuCode === currentPage;\r\n });\r\n\r\n return !isPrevious? getRouterPath(apps[menuOrder + 1], paperworkKey, isView): getRouterPath(apps[menuOrder - 1], paperworkKey, isView);\r\n }\r\n \r\n function firstLastPage (menuCode, apps){\r\n var result = {isFirstPage: false, isLastPage: false};\r\n apps.find(function(item){if (item.DealerFormVersionKey > 0) item.MenuCode = 'DRDFE';});\r\n apps[0].isFirstPage = true;\r\n apps[apps.length - 1].isLastPage = true;\r\n\r\n apps.forEach(function(element){\r\n if (element.MenuCode === menuCode) {\r\n result.isFirstPage = element.isFirstPage;\r\n result.isLastPage = element.isLastPage;\r\n }\r\n });\r\n\r\n return result;\r\n }\r\n\r\n function resolveCurrentPageMenuCode(path){\r\n var result = '';\r\n \r\n if (path.indexOf('/EnterPaperwork/') > -1) result = 'DREGM';\r\n if (path.indexOf('/EnterPaperworkDeliveries/') > -1) result = 'DREFD';\r\n if (path.indexOf('/EnterPaperworkTanks/') > -1) result = 'DREGS';\r\n if (path.indexOf('/EnterPaperworkDealerForms/') > -1) result = 'DRDFE';\r\n\r\n return result;\r\n } \r\n }]\r\n);\r\n","/**\r\n * Created by jvitoria on 1/6/2015.\r\n */\r\nangular.module('pnReportSettings', ['core.ajax'])\r\n .directive('reportSettings', ['ReportSettingsService', 'templates', 'localizationSvc', function (ReportSettingsService, templates, localizationSvc)\r\n {\r\n return {\r\n restrict: 'E',\r\n scope: {\r\n showSettingsBar: '@',\r\n allowLoad: '@',\r\n allowSave: '@',\r\n allowExport: '@',\r\n allowCsv: '@',\r\n allowXml: '@',\r\n allowPdf: '@',\r\n allowExcel: '@',\r\n exportReportData: '&',\r\n saveOptions: '='\r\n },\r\n controller: function ($rootScope, $scope)\r\n {\r\n $scope.initReportSettings = function ()\r\n {\r\n $scope.exportOptions = [];\r\n if ($scope.allowCsv !== 'false')\r\n { $scope.exportOptions.push({id: '2', name: 'CSV'}); }\r\n if ($scope.allowXml !== 'false')\r\n { $scope.exportOptions.push({id: '7', name: 'XML'}); }\r\n if ($scope.allowPdf !== 'false')\r\n { $scope.exportOptions.push({id: '1', name: 'PDF'}); }\r\n if ($scope.allowExcel !== 'false')\r\n { $scope.exportOptions.push({id: '3', name: 'Excel'}); }\r\n if ($scope.exportOptions.length > 0)\r\n { $scope.selectedExportOptions = $scope.exportOptions[0].id; }\r\n\r\n if (!$rootScope.reportSettings)\r\n {\r\n $rootScope.reportSettings = {loadOptions: {}, saveOptions: {}};\r\n }\r\n };\r\n },\r\n\r\n link: function (scope, element, attrs) {\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"ReportSettingsLocalization\");\r\n if (!attrs.showSettingsBar)\r\n { attrs.showSettingsBar = true; }\r\n if (!attrs.allowLoad)\r\n { attrs.allowLoad = true; }\r\n if (!attrs.allowSave)\r\n { attrs.allowSave = true; }\r\n if (!attrs.allowExport)\r\n { attrs.allowExport = true; }\r\n\r\n scope.modalInfo = {saveSettingsName: ''};\r\n scope.showModalLoad = false;\r\n scope.showModalSave = false;\r\n scope.showModalConfirmSave = false;\r\n scope.selectedKey = 0;\r\n scope.selectedReportContactKey = 0;\r\n scope.selectedDescription = \"\";\r\n\r\n scope.canDelete = function (key)\r\n {\r\n return scope.$parent.$parent.appInfo.webUser.CurrentAuthorization.CustContKey === key;\r\n };\r\n\r\n scope.exportData = function ()\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty(scope.exportReportData()))\r\n return;\r\n scope.exportReportData();\r\n };\r\n\r\n scope.applyReportSettings = function ()\r\n {\r\n if (scope.selectedKey === 0)\r\n {\r\n scope.$parent.notifier.show(localStrings.getLocalizedString(\"PleaseSelectReport\"), 'error');\r\n return;\r\n }\r\n scope.$root.reportSettings.unwrapReportSettings();\r\n scope.showModalLoad = false;\r\n };\r\n\r\n scope.deleteReportSettings = function (key)\r\n {\r\n var apply = function ()\r\n {\r\n ReportSettingsService.saveReportSettings\r\n (\r\n scope.$parent.$parent.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n scope.$parent.$parent.appInfo.webUser.CurrentAuthorization.CustKey,\r\n \"\",\r\n \"\",\r\n 8,\r\n scope.$root.reportSettings.reportKey,\r\n key\r\n ).then\r\n (function ()\r\n {\r\n scope.getReportSettings(true);\r\n });\r\n };\r\n\r\n scope.$parent.$parent.modalifier.confirm(localStrings.getLocalizedString(\"DeleteSelectedReportSettings\"), apply);\r\n };\r\n\r\n scope.getReportSettings = function (notify)\r\n {\r\n ReportSettingsService.getReportSettings(\r\n scope.$parent.$parent.appInfo.webUser.CurrentAuthorization.CustKey,\r\n scope.$root.reportSettings.reportKey\r\n ).then\r\n (\r\n function (data)\r\n {\r\n scope.returnedReportSettings = data.ReportSettings;\r\n if (scope.returnedReportSettings.ARWebSettings.length === 0 && notify)\r\n scope.$parent.notifier.show(localStrings.getLocalizedString(\"SelectionCriteriaNoResults\"), 'warning');\r\n }\r\n );\r\n };\r\n\r\n scope.saveSettings = function ()\r\n {\r\n if (!scope.returnedReportSettings)\r\n scope.getReportSettings(false);\r\n scope.showModalSave = !scope.showModalSave;\r\n };\r\n\r\n scope.loadSettings = function ()\r\n {\r\n scope.getReportSettings(true);\r\n scope.showModalLoad = !scope.showModalLoad;\r\n };\r\n\r\n scope.saveConfirmReportSettings = function ()\r\n {\r\n scope.showModalSave = false;\r\n if (scope.selectedKey > 0 && scope.selectedDescription === scope.modalInfo.saveSettingsName)\r\n {\r\n scope.showModalConfirmSave = true;\r\n return;\r\n }\r\n scope.selectedKey = 0;\r\n scope.saveReportSettings();\r\n };\r\n\r\n scope.saveReportSettings = function ()\r\n {\r\n if (scope.selectedKey > 0)\r\n scope.deleteReportSettings(true);\r\n if (angular.isDefined(scope.$root.reportSettings.wrapReportSettings))\r\n {\r\n scope.$root.reportSettings.wrapReportSettings();\r\n ReportSettingsService.saveReportSettings\r\n (\r\n scope.$parent.$parent.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n scope.$parent.$parent.appInfo.webUser.CurrentAuthorization.CustKey,\r\n scope.modalInfo.saveSettingsName,\r\n scope.$root.reportSettings.saveOptions,\r\n 4,\r\n scope.$root.reportSettings.reportKey,\r\n -1\r\n );\r\n\r\n scope.showModalConfirmSave = false;\r\n scope.showModalSave = false;\r\n }\r\n else\r\n scope.$parent.notifier.show(localStrings.getLocalizedString(\"ProcessFailedError\"), 'error');\r\n };\r\n\r\n scope.selectKey = function (item)\r\n {\r\n scope.selectedKey = item.Key;\r\n scope.selectedDescription = item.Description;\r\n scope.modalInfo.saveSettingsName = item.Description;\r\n scope.modalInfo.saveSettingsKey = item.Key;\r\n\r\n scope.$root.reportSettings.loadOptions = angular.fromJson(item.Options);\r\n };\r\n },\r\n templateUrl: templates.getTemplate(\"ReportSettings\") //'reportSettings/reportSettings.tpl.html'\r\n };\r\n }])\r\n\r\n .factory('ReportSettingsService', function ($q, apiService)\r\n {\r\n return {\r\n getReportSettings: function (custKey, reportKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetReportSettings/',\r\n data: {\r\n CustKey: custKey,\r\n RptKey: reportKey\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.ErrorMessages);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n saveReportSettings: function (custContKey, custKey, description, options, recStatus, reportKey, settingsKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/saveReportSettings/',\r\n data: {\r\n CustContKey: custContKey,\r\n CustKey: custKey,\r\n Description: description,\r\n Options: angular.toJson(options, false),\r\n RecStatus: recStatus,\r\n ReportKey: reportKey,\r\n SettingsKey: settingsKey\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.ErrorMessages);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n });\r\n","/**\r\n * Created by rhampton on 2/26/14.\r\n */\r\nangular.module(\"pnAccountPayments\", ['ngSanitize', 'core.objects', 'services.payments', 'core.directives'])\r\n .config(function ($provide, $routeProvider, templateProvider)\r\n {\r\n $routeProvider.when(\"/Account/Payments/MakeAPayment\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"MakeAPayment\"),\r\n controller: \"MakeAPaymentCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/MakeAPayment/:paymentKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"MakeAPayment\"),\r\n controller: \"MakeAPaymentCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/AccountVerifyPayment\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"AccountVerifyPayment\"),\r\n controller: \"VerifyPaymentCtrl\"\r\n }\r\n )\r\n .when(\"/Account/Payments/AccountConfirmPayment\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"AccountConfirmPayment\"),\r\n controller: \"ConfirmPaymentCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/ViewScheduledPayments\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ViewScheduledPayments\"),\r\n controller: \"ScheduledPaymentHistoryCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/ViewPaymentAccounts\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ViewPaymentAccounts\"),\r\n controller: \"PaymentAccountsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/EditPaymentAccount\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"EditPaymentAccount\"),\r\n controller: \"EditAccountCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/EditPaymentAccount/:paymentAccountKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"EditPaymentAccount\"),\r\n controller: \"EditAccountCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/VerifyPaymentAccount\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"VerifyPaymentAccount\"),\r\n controller: \"VerifyAccountCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/ConfirmPaymentAccount/:paymentAccountKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ConfirmPaymentAccount\"),\r\n controller: \"ConfirmAccountCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/PaymentAccountVerification/:paymentAccountKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"PaymentAccountVerification\"),\r\n controller: \"AccountVerificationCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/PaymentAccountVerificationVerify/:paymentAccountKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"PaymentAccountVerificationVerify\"),\r\n controller: \"AccountVerificationVerificationCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/PaymentAccountVerificationConfirmation/:paymentAccountKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"PaymentAccountVerificationConfirmation\"),\r\n controller: \"AccountVerificationConfirmationCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/TermsAndConditions/\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TermsAndConditions\"),\r\n controller: \"TermsAndConditionsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Account/Payments/PaymentAccountVerificationFailure/\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"PaymentAccountVerificationFailure\"),\r\n controller: \"AccountVerificationFailCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n ;\r\n })\r\n .controller(\"TermsAndConditionsCtrl\", function ($scope, $http, $q, $routeParams, $filter, PaymentService, validatorSvc, WebFunctions, templates, localStrings)\r\n {\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPayments))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n validatorSvc.clearValidationScopes();\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenuData = {};\r\n if ($scope.checkCurrentUserPermission($scope.webFunctions.AddandEditWebPayments))\r\n $scope.locationInfo.sideMenuData.subMenu = '4';\r\n else\r\n $scope.locationInfo.sideMenuData.subMenu = '5';\r\n\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n PaymentService.getTermsAndConditions($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms).then(function (data)\r\n {\r\n $scope.theTermsAndConditions = data;\r\n });\r\n };\r\n\r\n $scope.declineTerms = function ()\r\n {\r\n $scope.goTo(\"/Home\");\r\n };\r\n\r\n $scope.acceptTerms = function ()\r\n {\r\n if (!$scope.agreeToTerms)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"PleaseAcceptTermsConditions\"), 'error');\r\n return;\r\n }\r\n\r\n PaymentService.acceptTermsAndConditions(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings = data.CustomerWebPaymentSettings;\r\n if ($scope.checkCurrentUserPermission($scope.webFunctions.AddandEditWebPayments) &&\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.ActiveAccountCount > 0)\r\n $scope.goTo('/Account/Payments/ViewScheduledPayments');\r\n else if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.ActiveAccountCount > 0)\r\n $scope.goTo('/Account/Payments/ViewPaymentAccounts');\r\n else\r\n $scope.goTo('/Account/Payments/EditPaymentAccount');\r\n });\r\n };\r\n\r\n })\r\n .controller(\"MakeAPaymentCtrl\", function ($scope, $routeParams, PaymentService, validatorSvc, WebFunctions, templates, localStrings, localizationSvc, globalizationSvc)\r\n {\r\n 'use strict';\r\n $scope.paymentKey = 0;\r\n $scope.customText = \"\";\r\n $scope.kendo = {};\r\n\r\n $scope.kendo.invoicesGrid = {};\r\n $scope.kendo.invoicesGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"Selected\",\r\n width: 35,\r\n attributes: {class: \"alignCenter\"},\r\n filterable: false,\r\n sortable: false,\r\n headerTemplate: \"\",\r\n template: \"\"\r\n },\r\n {\r\n field: \"DueDate1\",\r\n title: localStrings.getLocalizedString(\"DueDate\"),\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Balance\",\r\n title: localStrings.getLocalizedString(\"AmtDue\"),\r\n format: \"{0:c}\",\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"RefNo\",\r\n title: localStrings.getLocalizedString(\"InvoiceNum\"),\r\n attributes: {class: \"alignLeftt\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"InvoiceDate\",\r\n title: localStrings.getLocalizedString(\"InvoiceDate\"),\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Amount\",\r\n title: localStrings.getLocalizedString(\"OrigAmt\"),\r\n format: \"{0:c}\",\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n }\r\n ],\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n $scope.kendo.invoicesGridInit = function (ds)\r\n {\r\n ds.each(function (charge)\r\n {\r\n charge.DueDate1 = Date.create(charge.DueDate1).format('{MM}/{dd}/{yyyy}');\r\n charge.InvoiceDate = Date.create(charge.InvoiceDate).format('{MM}/{dd}/{yyyy}');\r\n charge.Balance = globalizationSvc.formatCurrency(charge.Balance);\r\n charge.Amount = globalizationSvc.formatCurrency(charge.Amount);\r\n });\r\n\r\n $scope.kendo.invoicesGridDS = new kendo.data.DataSource({\r\n data: ds\r\n });\r\n\r\n $scope.kendo.invoicesGridDS.read();\r\n $scope.kendo.invoicesGrid.dataSource.data($scope.kendo.invoicesGridDS.data());\r\n };\r\n $scope.kendo.creditsGrid = {};\r\n $scope.kendo.creditsGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"Selected\",\r\n width: 35,\r\n attributes: {class: \"alignCenter\"},\r\n filterable: false,\r\n sortable: false,\r\n headerTemplate: \"\",\r\n template: \"\"\r\n },\r\n {\r\n field: \"RefDate\",\r\n title: localStrings.getLocalizedString(\"Date\"),\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"TranCodeDescription\",\r\n title: localStrings.getLocalizedString(\"PaymentType\"),\r\n attributes: {class: \"alignLeftt\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"UnAppAmount\",\r\n title: localStrings.getLocalizedString(\"Amt\"),\r\n format: \"{0:c}\",\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"RefNo\",\r\n title: localStrings.getLocalizedString(\"ReferenceNum\"),\r\n attributes: {class: \"alignLeftt\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n }\r\n ],\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n $scope.kendo.creditsGridInit = function (ds)\r\n {\r\n ds.each(function (charge)\r\n {\r\n charge.RefDate = Date.create(charge.RefDate).format('{MM}/{dd}/{yyyy}');\r\n charge.UnAppAmount = globalizationSvc.formatCurrency(charge.UnAppAmount);\r\n });\r\n\r\n $scope.kendo.creditsGridDS = new kendo.data.DataSource({\r\n data: ds\r\n });\r\n\r\n $scope.kendo.creditsGridDS.read();\r\n $scope.kendo.creditsGrid.dataSource.data($scope.kendo.creditsGridDS.data());\r\n };\r\n\r\n async function unlockPaymentsAsync (event) {\r\n let localLockData = amplify.store('paymentLockData');\r\n let headers = new Headers();\r\n headers.append('Content-Type', 'application/json');\r\n headers.append('Authentication', amplify.store('pnuser-token'));\r\n\r\n const body = JSON.stringify({CustContKey: localLockData.CustContKey,EmailAddress: localLockData.EmailAddress,CustomerKey: localLockData.CustomerKey});\r\n \r\n await fetch('../api/UnLockCustomerPayments/', {method: 'POST', headers: headers, body: body, keepalive: true});\r\n }\r\n\r\n $scope.initialize = function ()\r\n {\r\n $scope.appInfo.webPaymentLocked = false;\r\n $scope.appInfo.paymentControlOptions = {\r\n format: 'c',\r\n culture: globalizationSvc.getLocale(),\r\n spinners: false\r\n };\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPayments) || !$scope.paymentsEnabled())\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"1\";\r\n PaymentService.lockPayments($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data)\r\n {\r\n if (!window.listeners || window.listeners.beforeunload.count() === 0) {\r\n window.addEventListener('beforeunload', unlockPaymentsAsync, false);\r\n }\r\n $scope.initializePart2();\r\n },\r\n function (err)\r\n {\r\n if (amplify.store('paymentLockData')) {\r\n if (!window.listeners || window.listeners.beforeunload.count() === 0) {\r\n window.addEventListener('beforeunload', unlockPaymentsAsync, false);\r\n }\r\n $scope.initializePart2();\r\n } else {\r\n $scope.appInfo.webPaymentLocked = true;\r\n }\r\n }\r\n );\r\n \r\n };\r\n\r\n $scope.initializePart2 = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.invoiceWarning = false;\r\n\r\n if ($routeParams.paymentKey)\r\n {\r\n $scope.paymentKey = $routeParams.paymentKey.toNumber();\r\n }\r\n\r\n if ($scope.paymentKey < 0 && !angular.isUndefinedOrNullOrEmpty($scope.appInfo.webPayment))\r\n {\r\n //You should only get here by clicking the change button on verify payment\r\n //We reset invoice selection if payment type is select invoices\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType === \"2\") {\r\n var invoicesValueArr = $scope.InvoiceValues();\r\n $scope.selctedInvoicesValue = invoicesValueArr[0];\r\n $scope.selctedInvoicesValueDisplay = invoicesValueArr[1];\r\n }\r\n $scope.setUpView();\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Status !== 0)\r\n {\r\n $scope.goTo(\"/Account/Payments/AccountConfirmPayment\");\r\n }\r\n } else\r\n {\r\n $scope.appInfo.webPayment = {};\r\n $scope.appInfo.webPayment.WebPaymentWithContext = {};\r\n PaymentService.getPayment($scope.appInfo.webUser.CurrentAuthorization.CustKey, $scope.paymentKey).then(function (data)\r\n {\r\n $scope.appInfo.webPayment.WebPaymentWithContext = data;\r\n\r\n if (parseInt($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType, 10) === 2) {\r\n $scope.lockInvoices();\r\n $scope.appInfo.webPayment.WebPaymentWithContext = data;\r\n }\r\n\r\n PaymentService.getScheduledPayments(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey, \"\", \"01/01/1900\", \"01/01/2079\", true, false, false\r\n ).then(function (data)\r\n {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.HasPendingPayments = data.CustomerScheduledPayments.any({ Status: 0 });\r\n $scope.appInfo.webPayment.WebPaymentWithContext.HasPendingBudgetPayments = data.CustomerScheduledPayments.any({ Status: 0, PaymentType: 4 }) && !data.CustomerScheduledPayments.any({ Key: $scope.paymentKey, Status: 0, PaymentType: 4 });\r\n });\r\n\r\n $scope.setUpView();\r\n\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Status !== 0)\r\n $scope.goTo(\"/Account/Payments/AccountConfirmPayment\");\r\n });\r\n }\r\n\r\n $scope.selctedInvoicesValue = 0.00;\r\n $scope.selctedCreditsValue = 0.00;\r\n $scope.totalInvoiceAmount = 0.00;\r\n\r\n $scope.getWebProfileMessage(18);\r\n };\r\n\r\n $scope.setPaymentType = function (value)\r\n {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType = value;\r\n };\r\n\r\n $scope.setUpView = function ()\r\n {\r\n var minDateTime = new Date(\"0001-01-01T00:00:00\".replace(/-/g, \"/\").replace(/T/g, \" \"));\r\n var lastStatementDate = new Date($scope.appInfo.webPayment.WebPaymentWithContext.LastStatementDate.replace(/-/g, \"/\").replace(/T/g, \" \"));\r\n $scope.isStatementCustomer = $scope.appInfo.webPayment.WebPaymentWithContext.IsStatementCustomer;\r\n $scope.isStatementCustomer = lastStatementDate !== minDateTime;\r\n $scope.isStatementCustomer = $scope.isStatementCustomer && $scope.appInfo.webPayment.WebPaymentWithContext.LastStatementAmount > 0;\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Key === 0)\r\n {\r\n // we keep Budget Balance payment type when changing budget web payment\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType !== \"4\") {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType = ($scope.isStatementCustomer && $scope.appInfo.webPayment.WebPaymentWithContext.HasUnpaidStatement) ? '1' : '0';\r\n }\r\n }\r\n\r\n $scope.isBudgetCustomer = $scope.appInfo.webPayment.WebPaymentWithContext.IsBudgetCustomer;\r\n $scope.isBBEnabled = $scope.appInfo.webPayment.WebPaymentWithContext.IsBBEnabled;\r\n // we do not want to display negative baudget balance\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.BudgetBalance.toNumber() < 0) {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.BudgetBalance = '0.00';\r\n }\r\n\r\n $scope.isInvoiceCustomer = $scope.appInfo.webPayment.WebPaymentWithContext.IsOpenItemCustomer && $scope.appInfo.webPayment.WebPaymentWithContext.Invoices.length > 0;\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.IsPrepaidCustomer)\r\n {\r\n $scope.isStatementCustomer = false;\r\n $scope.isInvoiceCustomer = false;\r\n }\r\n $scope.appInfo.webPayment.WebPaymentWithContext.WebMinEFTDate = $scope.formatDate($scope.appInfo.webPayment.WebPaymentWithContext.WebMinEFTDate);\r\n $scope.appInfo.webPayment.WebPaymentWithContext.WebMaxEFTDate = $scope.formatDate($scope.appInfo.webPayment.WebPaymentWithContext.WebMaxEFTDate);\r\n\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Key === 0)\r\n {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentDate = $scope.appInfo.webPayment.WebPaymentWithContext.WebMinEFTDate;\r\n }\r\n else\r\n {\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Status < 2)\r\n {\r\n if (new Date($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentDate) < new Date($scope.appInfo.webPayment.WebPaymentWithContext.WebMinEFTDate))\r\n {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentDate = $scope.appInfo.webPayment.WebPaymentWithContext.WebMinEFTDate;\r\n $scope.notifier.show(localStrings.getLocalizedString(\"PaymentDateNoLongerValid\"), 'warning');\r\n }\r\n }\r\n else\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentDate = $scope.formatDate($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentDate);\r\n }\r\n\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount = $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount.toNumber() || 0;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.AmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount);\r\n $scope.formatCurrencies();\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType === 4) {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType = '4';\r\n }\r\n $scope.viewSetupComplete = true;\r\n };\r\n\r\n $scope.InvoiceValues = function ()\r\n {\r\n var theValue = 0.00;\r\n var theGrossValue = 0.00;\r\n var theDiscount = 0.00;\r\n var paymentDate;\r\n var termsDiscount;\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.kendo.invoicesGrid.dataSource))\r\n angular.forEach($scope.kendo.invoicesGrid.dataSource.data(), function (charge, index)\r\n {\r\n if (charge.Selected)\r\n {\r\n paymentDate = new Date($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentDate);\r\n termsDiscount = 0.00;\r\n\r\n if (paymentDate <= new Date(charge.TermsDiscountDate))\r\n {\r\n termsDiscount = charge.TermsDiscount;\r\n }\r\n else if (paymentDate <= new Date(charge.TermsDiscountDate2))\r\n {\r\n termsDiscount = charge.TermsDiscount2;\r\n }\r\n else if (paymentDate <= new Date(charge.TermsDiscountDate3))\r\n {\r\n termsDiscount = charge.TermsDiscount3;\r\n }\r\n else if (paymentDate <= new Date(charge.TermsDiscountDate4))\r\n {\r\n termsDiscount = charge.TermsDiscount4;\r\n }\r\n else if (paymentDate <= new Date(charge.TermsDiscountDate5))\r\n {\r\n termsDiscount = charge.TermsDiscount5;\r\n }\r\n else if (paymentDate <= new Date(charge.TermsDiscountDate6))\r\n {\r\n termsDiscount = charge.TermsDiscount6;\r\n }\r\n\r\n theGrossValue = theGrossValue + parseFloat(globalizationSvc.convertStringToNumber(charge.Balance));\r\n\r\n if (termsDiscount !== 0.00)\r\n {\r\n theDiscount = theDiscount + termsDiscount;\r\n theValue = theValue + (Math.round((parseFloat(globalizationSvc.convertStringToNumber(charge.Balance)) - termsDiscount) * 10000) / 10000);\r\n }\r\n else\r\n {\r\n theValue = theValue + parseFloat(globalizationSvc.convertStringToNumber(charge.Balance));\r\n }\r\n }\r\n });\r\n\r\n $scope.selctedInvoicesValue = theValue;\r\n $scope.selctedInvoicesGrossValue = theGrossValue;\r\n $scope.selctedInvoicesGrossValueDisplay = globalizationSvc.formatCurrency(theGrossValue);\r\n $scope.selctedInvoicesDiscountValue = theDiscount;\r\n $scope.selctedInvoicesDiscountValueDisplay = globalizationSvc.formatCurrency(theDiscount);\r\n\r\n theValue = 0;\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.kendo.creditsGrid.dataSource))\r\n angular.forEach($scope.kendo.creditsGrid.dataSource.data(), function (credit, index)\r\n {\r\n if (credit.Selected)\r\n {\r\n theValue = theValue + parseFloat(globalizationSvc.convertStringToNumber(credit.UnAppAmount));\r\n }\r\n });\r\n\r\n $scope.selctedCreditsValue = parseFloat(theValue);\r\n $scope.selctedCreditsValueDisplay = globalizationSvc.formatCurrency(theValue);\r\n\r\n $scope.totalInvoiceAmount = Math.round(($scope.selctedInvoicesValue - $scope.selctedCreditsValue) * 10000) / 10000;\r\n if ($scope.totalInvoiceAmount < 0)\r\n {\r\n $scope.totalInvoiceAmount = 0.0;\r\n }\r\n $scope.totalInvoiceAmountDisplay = globalizationSvc.formatCurrency(Math.round(($scope.selctedInvoicesValue - $scope.selctedCreditsValue) * 10000) / 10000);\r\n\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount = $scope.totalInvoiceAmount;\r\n return [$scope.selctedInvoicesValue, globalizationSvc.formatCurrency($scope.selctedInvoicesValue)];\r\n };\r\n\r\n $scope.getCssClasses = function (ngModelController)\r\n {\r\n return {\r\n error: ngModelController && ngModelController.$invalid && ngModelController.$dirty,\r\n success: ngModelController && ngModelController.$valid && ngModelController.$dirty\r\n };\r\n };\r\n\r\n $scope.showError = function (ngModelController, error)\r\n {\r\n return ngModelController.$error[error];\r\n };\r\n\r\n $scope.setScheduledPaymentAmount = function () {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount = globalizationSvc.convertStringToNumber($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.AmountDisplay);\r\n };\r\n\r\n $scope.verifyPayment = function ()\r\n {\r\n // pay by invoice\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType === \"2\") {\r\n //set selected invoices\r\n var grid = $scope.kendo.invoicesGrid;\r\n\r\n //set invoices that are selected in grid\r\n grid.dataItems().forEach(function (item) {\r\n var invoice = $scope.appInfo.webPayment.WebPaymentWithContext.Invoices.find({Key: item.Key});\r\n\r\n if (angular.isDefined(invoice)) {\r\n invoice.Selected = item.Selected;\r\n }\r\n\r\n });\r\n\r\n //set selected credits\r\n var gridCr = $scope.kendo.creditsGrid;\r\n\r\n //set invoices that are selected in grid\r\n gridCr.dataItems().forEach(function (item) {\r\n var credit = $scope.appInfo.webPayment.WebPaymentWithContext.Credits.find({Key: item.Key});\r\n\r\n if (angular.isDefined(credit)) {\r\n credit.Selected = item.Selected;\r\n }\r\n\r\n });\r\n }\r\n\r\n //update who made this payment\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.CustKey = $scope.appInfo.webUser.CurrentAuthorization.CustKey;\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Key === 0)\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.CreatedByCustContKey = $scope.appInfo.webUser.CurrentAuthorization.CustContKey;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.LastModifiedByCustContKey = $scope.appInfo.webUser.CurrentAuthorization.CustContKey;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Status = 0;\r\n //CustPmtAcctKey has been set to a string from the kendo accounts dropdown, so cast it back to a number\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.CustPmtAcctKey = $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.CustPmtAcctKey.toNumber();\r\n\r\n //handle the selected payment type\r\n switch ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType)\r\n {\r\n case '1':\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount = $scope.appInfo.webPayment.WebPaymentWithContext.LastStatementAmount;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.AmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount);\r\n break;\r\n\r\n case '2':\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.CreditAmount = $scope.selctedCreditsValue;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.GrossAmount = $scope.selctedInvoicesGrossValue;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount = $scope.totalInvoiceAmount;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.DiscountAmount = $scope.selctedInvoicesDiscountValue;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.CreditAmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.CreditAmount);\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.GrossAmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.GrossAmount);\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.AmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount);\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.DiscountAmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.DiscountAmount);\r\n break;\r\n\r\n case '3':\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount = $scope.appInfo.webPayment.WebPaymentWithContext.AccountBalance;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.AmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount);\r\n break;\r\n\r\n case '4':\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount = $scope.appInfo.webPayment.WebPaymentWithContext.BudgetBalance;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.AmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount);\r\n break;\r\n\r\n default:\r\n var amount = $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount.toNumber() || 0;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount = amount;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.AmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount);\r\n break;\r\n }\r\n\r\n //ensure that payment amount is greater than 0\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n //passed all tests; continue with process\r\n $scope.$cancelPromptToSave();\r\n $scope.goTo(\"/Account/Payments/AccountVerifyPayment\");\r\n };\r\n\r\n $scope.paymentIsValid = function ()\r\n {//Return true if there are errors.\r\n\r\n var elem = $('#paymentSelection');\r\n elem.css(\"border\", \"\");\r\n\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount &&\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount !== '')\r\n {\r\n var theValue = $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount.toString().replace(/$/g, \"\");\r\n theValue = parseFloat(theValue);\r\n if (theValue > 0)\r\n return false;\r\n }\r\n\r\n elem.css('border', '1px solid red');\r\n\r\n return true;\r\n };\r\n\r\n var paymentDateValidation =\r\n {\r\n _localStrings: localizationSvc.getCachedLocalizationsContainer(\"AccountPaymentsLocalization\"),\r\n name: 'validateLiftDate',\r\n validationMessage: '',\r\n validationMessageWrn: '',\r\n validatorError: function (liftDateTime, parms)\r\n {\r\n var isValid = true;\r\n var minDate = new Date($scope.appInfo.webPayment.WebPaymentWithContext.WebMinEFTDate);\r\n var maxDate = new Date($scope.appInfo.webPayment.WebPaymentWithContext.WebMaxEFTDate);\r\n var liftDate = new Date(liftDateTime);\r\n\r\n if (Date.create(liftDateTime).format('{MM}/{dd}/{yyyy}') === \"Invalid Date\" || (liftDate < minDate) || (liftDate > maxDate)) {\r\n /*this.validationMessage = \"Please select or enter a payment date between \" +\r\n minDate.format('{MM}/{dd}/{yyyy}') + \" and \" +\r\n maxDate.format('{MM}/{dd}/{yyyy}') + \".\";*/\r\n\r\n var replacementParms = [ minDate.format('{MM}/{dd}/{yyyy}'), maxDate.format('{MM}/{dd}/{yyyy}')];\r\n\r\n this.validationMessage = paymentDateValidation._localStrings.getLocalizedString(\"PaymentDateValidationMsg\", replacementParms);\r\n\r\n return false;\r\n }\r\n\r\n return isValid;\r\n },\r\n validatorWarning: function (liftDateTime, parms)\r\n {\r\n var hasWarning = false;\r\n return !hasWarning;\r\n }\r\n };\r\n\r\n $scope.validatePaymentDate = new pdi.ng.validate.PdiValidation(paymentDateValidation);\r\n\r\n async function unlockInvoicesAsync (event) {\r\n let localLockData = amplify.store('paymentLockData');\r\n let headers = new Headers();\r\n headers.append('Content-Type', 'application/json');\r\n headers.append('Authentication', amplify.store('pnuser-token'));\r\n\r\n const body = JSON.stringify({CustContKey: localLockData.CustContKey,EmailAddress: localLockData.EmailAddress,CustomerKey: localLockData.CustomerKey});\r\n \r\n await fetch('../api/UnLockCustomerInvoices/', {method: 'POST', headers: headers, body: body, keepalive: true});\r\n }\r\n\r\n $scope.lockInvoices = function ()\r\n {\r\n PaymentService.lockInvoices($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data)\r\n {\r\n if (!window.listeners || window.listeners.beforeunload.count() === 0) {\r\n window.addEventListener('beforeunload', unlockInvoicesAsync, false);\r\n }\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType = '2';\r\n $scope.invoicesLocked = true;\r\n $scope.kendo.invoicesGridInit.delay(10, $scope.appInfo.webPayment.WebPaymentWithContext.Invoices);\r\n $scope.kendo.creditsGridInit.delay(10, $scope.appInfo.webPayment.WebPaymentWithContext.Credits);\r\n },\r\n function (err)\r\n {\r\n if (amplify.store('paymentLockData')) {\r\n if (!window.listeners || window.listeners.beforeunload.count() === 0) {\r\n window.addEventListener('beforeunload', unlockInvoicesAsync, false);\r\n }\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType = '2';\r\n $scope.invoicesLocked = true;\r\n $scope.kendo.invoicesGridInit.delay(10, $scope.appInfo.webPayment.WebPaymentWithContext.Invoices);\r\n $scope.kendo.creditsGridInit.delay(10, $scope.appInfo.webPayment.WebPaymentWithContext.Credits);\r\n } else {\r\n $scope.invoicesLocked = false;\r\n $scope.invoiceWarning = true;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType = '0';\r\n }\r\n }\r\n );\r\n };\r\n\r\n $scope.unlockInvoices = function (paymentType)\r\n {\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType !== '2')\r\n {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType = paymentType;\r\n }\r\n PaymentService.unlockInvoices($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey);\r\n $scope.invoicesLocked = false;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType = paymentType;\r\n };\r\n\r\n $scope.checkAll = function (grid, id)\r\n {\r\n var checked = document.getElementById(id).checked || false;\r\n grid.dataItems().forEach(function (item)\r\n {\r\n item.Selected = checked;\r\n });\r\n };\r\n\r\n $scope.formatCurrencies = function () { \r\n var paymentsInfo = $scope.appInfo.webPayment.WebPaymentWithContext;\r\n\r\n var lastStmtAmt = paymentsInfo.LastStatementAmount;\r\n var acctBalance = paymentsInfo.AccountBalance;\r\n var budgetBalance = paymentsInfo.BudgetBalance;\r\n\r\n paymentsInfo.LastStatementAmountDisplay = globalizationSvc.formatCurrency(lastStmtAmt);\r\n paymentsInfo.AccountBalanceDisplay = globalizationSvc.formatCurrency(acctBalance);\r\n paymentsInfo.BudgetAmountDisplay = globalizationSvc.formatCurrency(budgetBalance);\r\n };\r\n\r\n $scope.$on('$destroy', function () {\r\n window.removeEventListener('beforeunload', unlockPaymentsAsync, false);\r\n window.removeEventListener('beforeunload', unlockInvoicesAsync, false);\r\n });\r\n })\r\n .controller(\"VerifyPaymentCtrl\", function ($scope, $http, $q, PaymentService, WebFunctions, templates, globalizationSvc)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPayments) || !$scope.paymentsEnabled())\r\n $scope.goTo(\"/Home\"); \r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"2\";\r\n $scope.getWebProfileMessage(18);\r\n $scope.isBudgetPayment = $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType === \"4\";\r\n $scope.isBudgetCustomer = $scope.appInfo.webPayment.WebPaymentWithContext.IsBudgetCustomer;\r\n $scope.isBBEnabled = $scope.appInfo.webPayment.WebPaymentWithContext.IsBBEnabled;\r\n $scope.budgetBalanceChanged = false;\r\n };\r\n $scope.confirmPayment = function () {\r\n //validate budget billing state if budget payment\r\n if ($scope.isBudgetPayment) {\r\n PaymentService.getBudgetPaymentContext($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data) {\r\n $scope.isBudgetCustomer = data.IsBudgetCustomer;\r\n $scope.isBBEnabled = data.IsBBEnabled;\r\n $scope.budgetBalanceChanged = $scope.appInfo.webPayment.WebPaymentWithContext.BudgetBalance !== data.BudgetBalance;\r\n if ($scope.isBBEnabled && $scope.isBudgetCustomer && !$scope.budgetBalanceChanged) {\r\n $scope.savePayment();\r\n }\r\n }\r\n );\r\n } else {\r\n $scope.savePayment();\r\n }\r\n };\r\n $scope.savePayment = function () {\r\n //create variable of webpayment data\r\n var webPayment = $scope.appInfo.webPayment;\r\n\r\n //for each invoice, convert the string balance to a number so it properly gets sent to controller\r\n webPayment.WebPaymentWithContext.Invoices.forEach(function (item) {\r\n item.Balance = (globalizationSvc.convertStringToNumber(item.Balance)); \r\n });\r\n\r\n //for each credit, convert unappAmmount and amount to numbers\r\n webPayment.WebPaymentWithContext.Credits.forEach(function (item) {\r\n item.Amount = (globalizationSvc.convertStringToNumber(item.Amount));\r\n item.UnAppAmount = (globalizationSvc.convertStringToNumber(item.UnAppAmount));\r\n });\r\n\r\n PaymentService.savePayment(webPayment.WebPaymentWithContext).then(\r\n function (data) {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment = data.CustomerScheduledPayment;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.Invoices = data.Invoices;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.Credits = data.Credits;\r\n $scope.goTo(\"/Account/Payments/AccountConfirmPayment\");\r\n PaymentService.unLockPayments($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey);\r\n PaymentService.unlockInvoices($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey);\r\n amplify.store('paymentLockData', null);\r\n }\r\n );\r\n };\r\n $scope.changePayment = function ()\r\n {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.Invoices.forEach(function (item) {\r\n item.Selected = false;\r\n });\r\n\r\n $scope.appInfo.webPayment.WebPaymentWithContext.Credits.forEach(function (item) {\r\n item.Selected = false;\r\n });\r\n\r\n PaymentService.unLockPayments($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey);\r\n PaymentService.unlockInvoices($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey);\r\n\r\n amplify.store('paymentLockData', null);\r\n\r\n PaymentService.getBudgetPaymentContext($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data) {\r\n $scope.appInfo.webPayment.WebPaymentWithContext.IsBudgetCustomer = data.IsBudgetCustomer;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.IsBBEnabled = data.IsBBEnabled;\r\n $scope.appInfo.webPayment.WebPaymentWithContext.BudgetBalance = data.BudgetBalance;\r\n }\r\n );\r\n $scope.goTo(\"/Account/Payments/MakeAPayment/-1\");\r\n };\r\n })\r\n .controller(\"ConfirmPaymentCtrl\", function ($scope, $http, $q, PaymentService, WebFunctions, templates, globalizationSvc)\r\n {\r\n 'use strict';\r\n //Once you come bace from saving the payment type will be an integer not a string so drop the quotes.\r\n\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.AmountDisplay = globalizationSvc.formatCurrency($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.Amount);\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPayments) || !$scope.paymentsEnabled())\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"3\";\r\n if ($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentType === '2')\r\n $scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.CreditAmount = $scope.reCalculateCreditValues();\r\n $scope.getWebProfileMessage(21);\r\n };\r\n $scope.reCalculateCreditValues = function ()\r\n {\r\n var theValue = 0;\r\n angular.forEach($scope.appInfo.webPayment.WebPaymentWithContext.Credits, function (credit, index)\r\n {\r\n if (credit.Selected)\r\n theValue = parseFloat(theValue) + parseFloat(credit.UnAppAmount);\r\n });\r\n return theValue;\r\n };\r\n\r\n })\r\n .controller(\"ScheduledPaymentHistorySideMenuCtrl\", function ($scope, $http, $q, PaymentService, WebFunctions)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.paymentHistory = {\r\n scheduled: 'true',\r\n processed: 'false',\r\n canceled: 'false'\r\n };\r\n $scope.dateSelector.overrideDefaults = true;\r\n $scope.dateSelector.maxNumOfDays = 90;\r\n $scope.dateSelector.selection = 13;\r\n PaymentService.getScheduledPaymentHistoryContext($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n $scope.locationInfo.sideMenuData.paymentHistory = {\r\n scheduled: true,\r\n processed: false,\r\n canceled: false,\r\n accounts: data.CustomerPaymentAccounts\r\n };\r\n });\r\n };\r\n })\r\n .controller(\"ScheduledPaymentHistoryCtrl\", function ($scope, $http, $q, PaymentService, WebFunctions, $filter, templates, validatorSvc, localStrings, globalizationSvc)\r\n {\r\n 'use strict';\r\n\r\n $scope.scheduledPayments = [];\r\n $scope.kendo = {};\r\n $scope.kendo.pmntGrid = {};\r\n $scope.kendo.pmntGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n title: localStrings.getLocalizedString(\"Account\"),\r\n field: \"CustPmtAcctDescription\",\r\n width: 150,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Amount\",\r\n title: localStrings.getLocalizedString(\"Amount\"),\r\n width: 100,\r\n format: \"{0:c}\",\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"FormattedDate\",\r\n title: localStrings.getLocalizedString(\"PaymentDate\"),\r\n width: 100,\r\n format: \"{0:MM/dd/yyyy}\",\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"StatusDescription\",\r\n title: localStrings.getLocalizedString(\"Status\"),\r\n width: 75,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"FormattedActivityDate\",\r\n title: localStrings.getLocalizedString(\"LastActivity\"),\r\n width: 100,\r\n format: \"{0:MM/dd/yyyy}\",\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Key\",\r\n title: localStrings.getLocalizedString(\"Confirmation\"),\r\n width: 90,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Created\",\r\n title: localStrings.getLocalizedString(\"Entered\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {mode: \"row\", extra: false},\r\n //height: $(document).height() - 375,\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.pmntGridInit = function ()\r\n {\r\n $scope.scheduledPayments.each(function (payment) {\r\n payment.Amount = globalizationSvc.formatNumeric(payment.Amount);\r\n });\r\n \r\n $scope.kendo.pmntGridDS = new kendo.data.DataSource({\r\n data: $scope.scheduledPayments,\r\n schema: {\r\n model: {\r\n fields: {\r\n CustPmtAcctDescription: {\r\n editable: false\r\n },\r\n Amount: {\r\n editable: false\r\n },\r\n FormattedDate: {\r\n editable: false\r\n },\r\n StatusDescription: {\r\n editable: false\r\n },\r\n FormattedActivityDate: {\r\n editable: false\r\n },\r\n Key: {\r\n editable: false\r\n },\r\n Created: {\r\n editable: false\r\n }\r\n }\r\n }\r\n },\r\n batch: true\r\n });\r\n\r\n $scope.kendo.pmntGridDS.read();\r\n $scope.kendo.pmntGrid.dataSource.data($scope.kendo.pmntGridDS.data());\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPayments))\r\n {\r\n $scope.goTo(\"/Account/Payments/ViewPaymentAccounts\");\r\n } \r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\"); //'account/payments/paymentSideMenu.tpl.html';\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"4\";\r\n $scope.getWebProfileMessage(19);\r\n $scope.scheduledPayments = [];\r\n $scope.predicate = 'FormattedDate';\r\n $scope.reverse = true;\r\n $scope.cancelPaymentKey = -1;\r\n $scope.cancelConfirm = false;\r\n };\r\n\r\n $scope.$parent.applyAction = function ()\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n if (!($scope.locationInfo.sideMenuData.paymentHistory.scheduled ||\r\n $scope.locationInfo.sideMenuData.paymentHistory.processed ||\r\n $scope.locationInfo.sideMenuData.paymentHistory.canceled))\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"AtLeastOneOption\"), 'error');\r\n return;\r\n }\r\n\r\n PaymentService.getScheduledPayments($scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.locationInfo.sideMenuData.paymentHistory.selectedAccount,\r\n $scope.dateSelector.startDate,\r\n $scope.dateSelector.endDate,\r\n $scope.locationInfo.sideMenuData.paymentHistory.scheduled,\r\n $scope.locationInfo.sideMenuData.paymentHistory.processed,\r\n $scope.locationInfo.sideMenuData.paymentHistory.canceled).then(function (data)\r\n {\r\n if (data.CustomerScheduledPayments.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"ScheduledPaymentsHist\"));\r\n }\r\n $scope.scheduledPayments = data.CustomerScheduledPayments;\r\n angular.forEach($scope.scheduledPayments, function (element)\r\n {\r\n element.Amount = globalizationSvc.formatCurrency(element.Amount);\r\n element.FormattedDate = $filter('date')(element.PaymentDate, 'MM/dd/yyyy');\r\n element.FormattedActivityDate = $filter('date')(element.LastModifiedDateTime, 'MM/dd/yyyy');\r\n element.FormattedCreatedDate = $filter('date')(element.CreatedDateTime, 'MM/dd/yyyy');\r\n element.Created = element.FormattedCreatedDate + ' ' + localStrings.getLocalizedString(\"By\") + ' ' + element.CreatedByCustContEmailAddress;\r\n });\r\n\r\n $scope.kendo.pmntGridInit();\r\n });\r\n };\r\n\r\n $scope.confirmCancelPayment = function (paymentKey)\r\n {\r\n $scope.cancelPaymentKey = paymentKey;\r\n $scope.cancelConfirm = true;\r\n };\r\n\r\n $scope.cancelPayment = function (paymentKey)\r\n {\r\n PaymentService.getPayment($scope.appInfo.webUser.CurrentAuthorization.CustKey, paymentKey).then(function (data)\r\n {\r\n var WebPaymentWithContext = data;\r\n WebPaymentWithContext.CustomerScheduledPayment.Status = 1;\r\n WebPaymentWithContext.CustomerScheduledPayment.LastModifiedByCustContKey = $scope.appInfo.webUser.CurrentAuthorization.CustContKey;\r\n PaymentService.savePayment(WebPaymentWithContext).then(function (data)\r\n {\r\n $scope.$parent.applyAction();\r\n });\r\n });\r\n $scope.cancelConfirm = false;\r\n };\r\n })\r\n .controller(\"paymentSideMenuCtrl\", function ($scope, WebFunctionGroups, $rootScope)\r\n {\r\n 'use strict';\r\n if (!$scope.checkCurrentUserPermissions(WebFunctionGroups.Payments))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n var lockData;\r\n var invoicesLocked;\r\n\r\n const unloadPaymentHandler = async function (event) {\r\n if (lockData && !event.persisted) {\r\n let localLockData = lockData;\r\n let headers = new Headers();\r\n headers.append('Content-Type', 'application/json');\r\n headers.append('Authentication', amplify.store('pnuser-token'));\r\n\r\n const body = JSON.stringify({CustContKey: localLockData.CustContKey,EmailAddress: localLockData.EmailAddress,CustomerKey: localLockData.CustomerKey});\r\n \r\n await fetch('../api/UnLockCustomerPayments/', {method: 'POST', headers: headers, body: body, keepalive: true});\r\n }\r\n };\r\n\r\n const unloadInvoiceHandler = async function (event) {\r\n if (lockData && !event.persisted) {\r\n let localLockData = lockData;\r\n let headers = new Headers();\r\n headers.append('Content-Type', 'application/json');\r\n headers.append('Authentication', amplify.store('pnuser-token'));\r\n\r\n const body = JSON.stringify({CustContKey: localLockData.CustContKey,EmailAddress: localLockData.EmailAddress,CustomerKey: localLockData.CustomerKey});\r\n \r\n await fetch('../api/UnLockCustomerInvoices/', {method: 'POST', headers: headers, body: body, keepalive: true});\r\n }\r\n };\r\n\r\n function resetValues() {\r\n invoicesLocked = false;\r\n lockData = null;\r\n }\r\n\r\n //Start periodic refresh on lock\r\n var paymentLockListener = $rootScope.$on('event:PaymentLocked', function (event, data) {\r\n if (!angular.isUndefinedOrNullOrEmpty(data)) {\r\n lockData = data;\r\n amplify.store('paymentLockData', lockData);\r\n\r\n window.addEventListener('pagehide', unloadPaymentHandler, false);\r\n window.addEventListener('beforeunload', unloadPaymentHandler, false);\r\n }\r\n });\r\n\r\n var invoiceLockListener = $rootScope.$on('event:InvoiceLocked', function (event, data) {\r\n if (!angular.isUndefinedOrNullOrEmpty(data)) {\r\n lockData = data;\r\n invoicesLocked = true;\r\n\r\n window.addEventListener('pagehide', unloadInvoiceHandler, false);\r\n window.addEventListener('beforeunload', unloadInvoiceHandler, false);\r\n }\r\n });\r\n\r\n //Stop the interval when unlocked\r\n var paymentUnlockListener = $rootScope.$on('event:PaymentUnlocked', function () {\r\n resetValues();\r\n });\r\n\r\n var invoiceUnlockListener = $rootScope.$on('event:InvoiceUnlocked', function () {\r\n invoicesLocked = false;\r\n });\r\n \r\n //Destroy the listeners and intervals when we navigate away from this page \r\n $scope.$on('$destroy', function () {\r\n paymentUnlockListener();\r\n invoiceUnlockListener();\r\n paymentLockListener();\r\n invoiceLockListener();\r\n resetValues();\r\n window.removeEventListener('pagehide', unloadInvoiceHandler, false);\r\n window.removeEventListener('beforeunload', unloadInvoiceHandler, false);\r\n window.removeEventListener('pagehide', unloadPaymentHandler, false);\r\n window.removeEventListener('beforeunload', unloadPaymentHandler, false);\r\n });\r\n\r\n })\r\n .controller(\"PaymentAccountsCtrl\", function ($scope, PaymentAccountService, WebFunctions, $filter, templates, localStrings, globalizationSvc)\r\n {\r\n 'use strict';\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.acctGrid = {};\r\n $scope.kendo.acctGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n title: localStrings.getLocalizedString(\"AccountName\"),\r\n field: \"Description\",\r\n attributes: {class: \"alignLeft\"},\r\n template: \"\",\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"Status\"),\r\n field: \"AccountStatusDesc\",\r\n attributes: {class: \"alignLeft\"},\r\n width: 150,\r\n template: \"{{dataItem.AccountStatusDesc}} {{dataItem.AccountStatusDesc}}\",\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"LastPayment\"),\r\n field: \"FormattedActivityDate\",\r\n width: 150,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n title: localStrings.getLocalizedString(\"NextScheduledPayment\"),\r\n field: \"NextPaymentText\",\r\n width: 200,\r\n attributes: {class: \"alignLeft\"},\r\n template: \"{{dataItem.NextPaymentText}}\",\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \" \",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {mode: \"row\", extra: false},\r\n //height: $(document).height() - 375,\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.acctGridInit = function ()\r\n {\r\n $scope.kendo.acctGridDS = new kendo.data.DataSource({\r\n data: $scope.WebPaymentAccounts,\r\n schema: {\r\n model: {\r\n fields: {\r\n Description: {\r\n editable: false\r\n },\r\n AccountStatusDesc: {\r\n editable: false\r\n },\r\n FormattedActivityDate: {\r\n editable: false\r\n },\r\n NextPaymentText: {\r\n editable: false\r\n }\r\n }\r\n }\r\n },\r\n batch: true\r\n });\r\n\r\n $scope.kendo.acctGridDS.read();\r\n $scope.kendo.acctGrid.dataSource.data($scope.kendo.acctGridDS.data());\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPaymentAccounts) || !$scope.paymentsEnabled())\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n $scope.predicate = 'SortOrder';\r\n $scope.reverse = false;\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"5\";\r\n $scope.getWebProfileMessage(12);\r\n $scope.refresh();\r\n };\r\n\r\n $scope.refresh = function ()\r\n {\r\n PaymentAccountService.getPaymentAccountList($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n $scope.WebPaymentAccounts = data;\r\n angular.forEach($scope.WebPaymentAccounts, function (element)\r\n {\r\n element.FormattedActivityDate = element.AccountLastActivity === '0001-01-01T00:00:00' ? null : $filter('date')(element.AccountLastActivity, 'MM/dd/yyyy');\r\n element.FormattedPaymentDate = element.AccountNextPayment === '0001-01-01T00:00:00' ? null : $filter('date')(element.AccountNextPayment, 'MM/dd/yyyy');\r\n element.NextPaymentText = element.FormattedPaymentDate === null ? null : element.FormattedPaymentDate + ' ' + localStrings.getLocalizedString(\"For\") + ' ' + globalizationSvc.formatCurrency(element.AccountNextPaymentAmmount);\r\n });\r\n $scope.kendo.acctGridInit();\r\n });\r\n };\r\n })\r\n .controller(\"EditAccountCtrl\", function ($scope, $http, $q, $routeParams, $filter, PaymentAccountService, validatorSvc, WebFunctions, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.editableAccount = false;\r\n $scope.paymentAccountKey = 0; \r\n $scope.customText = \"\";\r\n $scope.initializeEditAcount = function ()\r\n {\r\n $scope.AccountTypes =\r\n [\r\n { key: 0, descr: localStrings.getLocalizedString(\"Checking\") },\r\n { key: 1, descr: localStrings.getLocalizedString(\"Savings\") }\r\n ];\r\n\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPaymentAccounts) || !$scope.paymentsEnabled())\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n validatorSvc.clearValidationScopes();\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"7\";\r\n\r\n if ($routeParams.paymentAccountKey)\r\n {\r\n $scope.paymentAccountKey = $routeParams.paymentAccountKey;\r\n }\r\n\r\n if ($scope.paymentAccountKey < 0)\r\n {//Edit from verify page\r\n $scope.WebPaymentAccount = PaymentAccountService.WebPaymentAccount;\r\n $scope.editableAccount = $scope.WebPaymentAccount.AccountStatus <= 1 || $scope.WebPaymentAccount.AccountStatus === 5;\r\n } else if ($scope.paymentAccountKey > 0)\r\n {//Existing\r\n PaymentAccountService.getPaymentAccount($scope.paymentAccountKey, $scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n $scope.WebPaymentAccount = data;\r\n $scope.WebPaymentAccount.AccountTypeDescr = $scope.AccountTypes[$scope.WebPaymentAccount.AccountType].descr;\r\n $scope.WebPaymentAccount.LastModifiedByCustContKey = $scope.appInfo.webUser.CurrentAuthorization.CustContKey;\r\n $scope.editableAccount = $scope.WebPaymentAccount.AccountStatus <= 1 || $scope.WebPaymentAccount.AccountStatus === 5;\r\n });\r\n } else if ($scope.paymentAccountKey === 0)\r\n {//New\r\n $scope.WebPaymentAccount = new CustomerPaymentAccount(\r\n {\r\n CustKey: $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n CreatedByCustContKey: $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n LastModifiedByCustContKey: $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n AccountStatus: 0,\r\n AccountStatusDesc: localStrings.getLocalizedString(\"New\"),\r\n Key: 0\r\n }\r\n );\r\n $scope.editableAccount = true;\r\n }\r\n };\r\n\r\n $scope.routingNumberIsValid = false;\r\n\r\n $scope.setAccountStatus = function (status)\r\n {\r\n if (status !== 0 && status !== 8)\r\n return;\r\n PaymentAccountService.getPaymentAccount($scope.WebPaymentAccount.Key, $scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n $scope.WebPaymentAccount = data;\r\n $scope.WebPaymentAccount.AccountStatus = status;\r\n PaymentAccountService.savePaymentAccount($scope.WebPaymentAccount).then(\r\n function (data)\r\n {\r\n $scope.WebPaymentAccount = data;//refresh once you save to update timestamps\r\n $scope.goTo('Account/Payments/ViewPaymentAccounts');\r\n },\r\n function (data)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"AddAccount\"), localStrings.getLocalizedString(\"ErrorSavingAccount\") + data);\r\n }\r\n );\r\n });\r\n };\r\n\r\n $scope.verifyPaymentAccount = function ()\r\n {\r\n if ($scope.editableAccount)\r\n {\r\n $scope.WebPaymentAccount.AccountTypeDescr = $scope.AccountTypes[$scope.WebPaymentAccount.AccountType].descr;\r\n PaymentAccountService.validateRoutingNumber($scope.WebPaymentAccount.BankRoutingNo).then(\r\n function (data)\r\n {\r\n $scope.routingNumberIsValid = true;\r\n $scope.verifyPaymentAccountOverride();\r\n },\r\n function (error)\r\n {\r\n $scope.routingNumberIsValid = false;\r\n $scope.verifyPaymentAccountOverride();\r\n });\r\n } else\r\n {\r\n $scope.verifyPaymentAccountOverride();\r\n }\r\n };\r\n\r\n $scope.verifyPaymentAccountOverride = function ()\r\n {\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n PaymentAccountService.WebPaymentAccount = $scope.WebPaymentAccount;\r\n $scope.$cancelPromptToSave();\r\n $scope.goTo(\"/Account/Payments/VerifyPaymentAccount\");\r\n };\r\n\r\n var routingNumberValidation =\r\n {\r\n name: 'validateRoutingNumber',\r\n validationMessage: localStrings.getLocalizedString(\"InvalidRoutingNumber\"),\r\n validatorError: function (val)\r\n {\r\n return $scope.routingNumberIsValid;\r\n }\r\n };\r\n\r\n $scope.validateRoutingNumber = new pdi.ng.validate.PdiValidation(routingNumberValidation);\r\n\r\n $scope.confirmDeactivate = function ()\r\n {\r\n var yes = function ()\r\n {\r\n $scope.setAccountStatus(8);\r\n };\r\n\r\n var no = function ()\r\n {\r\n return;\r\n };\r\n\r\n $scope.modalifier.confirm(localStrings.getLocalizedString(\"DeactivateAccount\"), yes, no);\r\n };\r\n\r\n $scope.confirmClose = function ()\r\n {\r\n var no = function ()\r\n {\r\n $scope.goTo('Account/Payments/ViewPaymentAccounts');\r\n };\r\n\r\n if ($scope.acctInfo.$dirty)\r\n {\r\n $scope.modalifier.confirm(localStrings.getLocalizedString(\"UnsavedChanges\"), $scope.verifyPaymentAccount, no);\r\n }\r\n else\r\n no();\r\n };\r\n })\r\n .controller(\"VerifyAccountCtrl\", function ($scope, $http, $q, $routeParams, $filter, PaymentAccountService, validatorSvc, WebFunctions, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.customText = \"\";\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPaymentAccounts) || !$scope.paymentsEnabled())\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"8\";\r\n\r\n $scope.WebPaymentAccount = PaymentAccountService.WebPaymentAccount;\r\n };\r\n\r\n $scope.routingNumberIsValid = false;\r\n\r\n $scope.confirmPaymentAccount = function ()\r\n {\r\n PaymentAccountService.savePaymentAccount($scope.WebPaymentAccount).then(\r\n function (data)\r\n {\r\n $scope.goTo(\"/Account/Payments/ConfirmPaymentAccount/\" + data.Key);\r\n },\r\n function (data)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"AddAccount\"), localStrings.getLocalizedString(\"ErrorSavingAccount\") + data);\r\n }\r\n );\r\n };\r\n\r\n $scope.changePaymentAccount = function ()\r\n {\r\n $scope.goTo(\"/Account/Payments/EditPaymentAccount/-1\");\r\n };\r\n })\r\n .controller(\"ConfirmAccountCtrl\", function ($scope, $http, $q, $routeParams, $filter, PaymentAccountService, WebFunctions, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.AccountTypes =\r\n [\r\n { key: 0, descr: localStrings.getLocalizedString(\"Checking\") },\r\n { key: 1, descr: localStrings.getLocalizedString(\"Savings\") }\r\n ];\r\n $scope.paymentAccountKey = 0;\r\n $scope.customText = \"\";\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPaymentAccounts) || !$scope.paymentsEnabled())\r\n {\r\n $scope.goTo(\"/Home\");\r\n } \r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"9\";\r\n\r\n if ($routeParams.paymentAccountKey)\r\n {\r\n $scope.paymentAccountKey = $routeParams.paymentAccountKey;\r\n }\r\n\r\n if ($routeParams.paymentAccountKey <= 0)\r\n {\r\n $scope.goTo(\"/Home\");\r\n } else if ($routeParams.paymentAccountKey > 0)\r\n {\r\n PaymentAccountService.getPaymentAccount($scope.paymentAccountKey, $scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n $scope.WebPaymentAccount = data;\r\n $scope.WebPaymentAccount.AccountTypeDescr = $scope.AccountTypes[$scope.WebPaymentAccount.AccountType].descr;\r\n $scope.WebPaymentAccount.AccountNoVerify = $scope.WebPaymentAccount.AccountNo;\r\n });\r\n }\r\n };\r\n })\r\n .controller(\"AccountVerificationCtrl\", function ($scope, PaymentAccountService, $filter, validatorSvc, WebFunctions, $routeParams, templates)\r\n {\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPaymentAccounts) || !$scope.paymentsEnabled())\r\n $scope.goTo(\"/Home\");\r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms === 0 ||\r\n $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentTerms !== $scope.appInfo.webUser.CurrentAuthorization.CustWebPaymentSettings.CurrentProfileTerms)\r\n $scope.goTo(\"/Account/Payments/TermsAndConditions/\");\r\n\r\n $scope.appInfo.verifyAccount = {};\r\n validatorSvc.clearValidationScopes();\r\n if ($routeParams.paymentAccountKey)\r\n $scope.appInfo.verifyAccount.webPaymentAccountKey = $routeParams.paymentAccountKey;\r\n else\r\n $scope.goTo(\"/Account/Payments/ViewPaymentAccounts\");\r\n\r\n $scope.appInfo.verifyAccount = {};\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"5\";\r\n\r\n PaymentAccountService.getPaymentAccountList($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n $scope.appInfo.verifyAccount.webPaymentAccountDesc = $filter(\"filter\")(data, {Key: $scope.appInfo.verifyAccount.webPaymentAccountKey})[0].Description;\r\n $scope.appInfo.verifyAccount.WebPaymentAccounts = $filter(\"filter\")(data, {AccountStatus: 4});\r\n });\r\n $scope.getWebProfileMessage(15);\r\n };\r\n\r\n $scope.verifyPaymentAccount = function ()\r\n {\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n $scope.goTo(\"/Account/Payments/PaymentAccountVerificationVerify/\" + $routeParams.paymentAccountKey);\r\n };\r\n })\r\n .controller(\"AccountVerificationVerificationCtrl\", function ($scope, PaymentAccountService, $filter, validatorSvc, WebFunctions, $routeParams, templates)\r\n {\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPaymentAccounts) || !$scope.paymentsEnabled())\r\n $scope.goTo(\"/Home\");\r\n\r\n if ($routeParams.paymentAccountKey)\r\n $scope.appInfo.verifyAccount.webPaymentAccountKey = $routeParams.paymentAccountKey;\r\n else\r\n $scope.goTo(\"/Account/Payments/ViewPaymentAccounts\");\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"5\";\r\n\r\n $scope.getWebProfileMessage(15);\r\n };\r\n\r\n $scope.confirmPaymentAccount = function ()\r\n {\r\n PaymentAccountService.getPaymentAccount($scope.appInfo.verifyAccount.webPaymentAccountKey, $scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n var amt1 = parseFloat($scope.appInfo.verifyAccount.amount1);\r\n var amt2 = parseFloat($scope.appInfo.verifyAccount.amount2);\r\n if ((data.VerificationAmount1 !== amt1 && data.VerificationAmount1 !== amt2) ||\r\n (data.VerificationAmount2 !== amt1 && data.VerificationAmount2 !== amt2))\r\n {\r\n data.AccountStatus = 6;\r\n PaymentAccountService.savePaymentAccount(data);\r\n $scope.goTo(\"/Account/Payments/PaymentAccountVerificationFailure/\");\r\n return;\r\n }\r\n data.AccountStatus = 7;\r\n PaymentAccountService.savePaymentAccount(data);\r\n $scope.goTo(\"/Account/Payments/PaymentAccountVerificationConfirmation/\" + $routeParams.paymentAccountKey);\r\n });\r\n };\r\n\r\n $scope.verifyPaymentAccount = function ()\r\n {\r\n $scope.goTo(\"/Account/Payments/PaymentAccountVerification/\" + $routeParams.paymentAccountKey);\r\n };\r\n\r\n })\r\n .controller(\"AccountVerificationConfirmationCtrl\", function ($scope, PaymentAccountService, $filter, validatorSvc, WebFunctions, $routeParams, templates)\r\n {\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPaymentAccounts) || !$scope.paymentsEnabled())\r\n $scope.goTo(\"/Home\");\r\n\r\n if (!$routeParams.paymentAccountKey)\r\n $scope.goTo(\"/Account/Payments/ViewPaymentAccounts\");\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"5\";\r\n\r\n PaymentAccountService.getPaymentAccountList($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n $scope.appInfo.verifyAccount.WebPaymentAccounts = $filter(\"filter\")(data, {AccountStatus: 4});\r\n });\r\n $scope.getWebProfileMessage(16);\r\n };\r\n })\r\n .controller(\"AccountVerificationFailCtrl\", function ($scope, PaymentAccountService, $filter, validatorSvc, WebFunctions, $routeParams, templates)\r\n {\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddandEditWebPaymentAccounts))\r\n $scope.goTo(\"/Home\");\r\n\r\n $scope.appInfo.verifyAccount = {};\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 11;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"PaymentSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"5\";\r\n\r\n PaymentAccountService.getPaymentAccountList($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n $scope.appInfo.verifyAccount.WebPaymentAccounts = $filter(\"filter\")(data, {AccountStatus: 4});\r\n });\r\n $scope.getWebProfileMessage(17);\r\n };\r\n });","/**\r\n * Created by rhampton on 8/13/2014.\r\n */\r\nangular.module(\"pnAdmin\", ['ngSanitize', 'core.objects', 'services.payments', 'core.directives', 'core.enums','core.security'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider.when(\"/Account/Profile/YourProfile\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"YourProfile\"),\r\n controller: \"EditUserCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n }\r\n }\r\n ).when(\"/Account/Profile/YourProfile/:contactKey\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"YourProfile\"),\r\n controller: \"EditUserCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n }\r\n }\r\n ).when(\"/Account/Profile/Contacts\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Contacts\"),\r\n controller: \"ListContactsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n }\r\n }\r\n ).when(\"/Account/Profile/AddContact\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"AddContact\"),\r\n controller: \"AddUserCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n }\r\n }\r\n ).when(\"/Account/Profile/AccountSettings\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"AccountSettings\"),\r\n controller: \"AccountSettingsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n }\r\n }\r\n ).when(\"/Account/Profile/ResetPassword\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ProfileResetPassword\"),\r\n controller: \"SetPasswordCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n }\r\n }\r\n ).when(\"/Account/Profile/AuditLog\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"AuditLog\"),\r\n controller: \"auditLogCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n }\r\n }\r\n );\r\n })//AccountSettings\r\n .controller(\"ProfileSideMenuCtrl\", function ($scope)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n\r\n };\r\n\r\n })\r\n .controller(\"ListContactsCtrl\", function ($scope, userAccountService, WebFunctions, $filter, templates, localStrings)\r\n {\r\n 'use strict';\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.contactsGrid = {};\r\n $scope.kendo.contactsGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var selectedRows = this.select();\r\n var dataItem = this.dataItem(selectedRows[0]);\r\n $scope.goTo(\"/Account/Profile/YourProfile/\" + dataItem.Key);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"DisplayName\",\r\n title: localStrings.getLocalizedString(\"Contact\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"EmailAddress\",\r\n title: localStrings.getLocalizedString(\"Email\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"WebActive\",\r\n title: localStrings.getLocalizedString(\"Active\"),\r\n width: 50,\r\n template: \"\",\r\n filterable: false\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n //height: $(document).height() - 375,\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.contactsGridInit = function ()\r\n {\r\n $scope.kendo.contactsGridDS = new kendo.data.DataSource({\r\n data: $scope.CustomerContacts,\r\n schema: {\r\n model: {\r\n fields: {\r\n DisplayName: {\r\n editable: false\r\n },\r\n EmailAddress: {\r\n editable: false\r\n },\r\n WebActive: {\r\n editable: false\r\n }\r\n }\r\n }\r\n },\r\n batch: true\r\n });\r\n\r\n $scope.kendo.contactsGridDS.read();\r\n $scope.kendo.contactsGrid.dataSource.data($scope.kendo.contactsGridDS.data());\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.ManageContactsAndSecurity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 12;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ProfileSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"2\";\r\n $scope.CustomerContacts = [];\r\n userAccountService.listContacts($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (data.CustomerContacts.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"Contacts\"));\r\n return;\r\n }\r\n\r\n angular.forEach(data.CustomerContacts, function (item)\r\n {\r\n item.DisplayName = item.FirstName + ' ' + item.LastName;\r\n });\r\n $scope.CustomerContacts = $filter('orderBy')(data.CustomerContacts, 'DisplayName');\r\n $scope.kendo.contactsGridInit();\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n });\r\n };\r\n })\r\n .controller(\"EditUserCtrl\", function ($q, $scope, $filter, WebFunctions, userAccountService, constantLists, $route, $routeParams, WebUserSvc, validatorSvc, $location, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.data = {};\r\n $scope.kendo = {};\r\n\r\n function expandWFGrids(expand)\r\n {\r\n $scope.showAccountFNs = expand;\r\n $scope.showFuelFNs = expand;\r\n $scope.showOrdersFNs = expand;\r\n $scope.showPaperworkFNs = expand;\r\n $scope.showCustomPagesFNs = expand;\r\n }\r\n\r\n function setDependancies()\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty($scope.data.CustomerContact) || $scope.data.CustomerContact.AllWebFunctions)\r\n return;\r\n\r\n var wbfns = $scope.data.CustomerContact.CustomerContactWebFunctions;\r\n\r\n angular.forEach(wbfns, function (item)\r\n {\r\n switch (item.WebFnKey)\r\n {\r\n case 5:\r\n //View Cards => Edit cards\r\n var view = $filter('filter')(wbfns, {WebFnKey: 4}, true)[0];\r\n if (view.Selected)\r\n {\r\n item.Disabled = false;\r\n }\r\n else\r\n {\r\n item.Selected = false;\r\n item.Disabled = true;\r\n }\r\n break;\r\n\r\n case 6:\r\n //View Card Transactions => View Card Transactions Alerts\r\n var trans = $filter('filter')(wbfns, {WebFnKey: 3}, true)[0];\r\n if (trans.Selected)\r\n {\r\n item.Disabled = false;\r\n }\r\n else\r\n {\r\n item.Selected = false;\r\n item.Disabled = true;\r\n }\r\n break;\r\n\r\n case 15:\r\n //Acount Activity => View Credit Info\r\n var acct = $filter('filter')(wbfns, {WebFnKey: 1}, true)[0];\r\n if (acct.Selected)\r\n {\r\n item.Disabled = false;\r\n }\r\n else\r\n {\r\n item.Selected = false;\r\n item.Disabled = true;\r\n }\r\n break;\r\n }\r\n });\r\n }\r\n\r\n $scope.$watch(\"data.CustomerContact.CustomerContactWebFunctions\", setDependancies, true);\r\n\r\n $scope.textMessagePhoneNumbers = [\r\n {\r\n value: -1,\r\n text: localStrings.getLocalizedString(\"None\")\r\n },\r\n {\r\n value: 0,\r\n text: localStrings.getLocalizedString(\"Phone\")\r\n },\r\n {\r\n value: 1,\r\n text: localStrings.getLocalizedString(\"AltPhone\")\r\n },\r\n {\r\n value: 2,\r\n text: localStrings.getLocalizedString(\"AltPhone2\")\r\n }\r\n ];\r\n\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n $scope.checkForAppliedProfile();\r\n\r\n if (!$scope.appInfo) $scope.appInfo = {};\r\n\r\n $scope.appInfo.editUser = {\r\n modalMultiSave: {\r\n shown: false\r\n },\r\n modalCopySecurity: {\r\n shown: false,\r\n copyContact: {},\r\n clearSecurity: false\r\n },\r\n modalResetPassword: {\r\n shown: false,\r\n controls: {\r\n password: '',\r\n verify: '',\r\n displayTitle: localStrings.getLocalizedString(\"EnterVerifyPassword\")\r\n },\r\n webUser: {\r\n Timestamp: '',\r\n Answer: '',\r\n AnswerClear: '',\r\n GUID: '',\r\n Id: '',\r\n Key: '',\r\n Password: '',\r\n PasswordClear: '',\r\n Question: '',\r\n Reset: '',\r\n Validated: ''\r\n },\r\n error: {\r\n display: false,\r\n text: ''\r\n }\r\n },\r\n modalChangeEmail: {\r\n shown: $location.hash() === 'Email',\r\n email: \"\",\r\n pendingSave: false\r\n }\r\n };\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 12;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ProfileSideMenu\");\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"1\"\r\n };\r\n\r\n $scope.phoneTypes = constantLists.phoneTypes(localStrings);\r\n $scope.secretQuestions = constantLists.secretQuestions(localStrings);\r\n $scope.data = {};\r\n $scope.kendo = {};\r\n\r\n $scope.clearButton = {\r\n clearButton: false\r\n };\r\n\r\n $scope.canResetPassword = (!angular.isUndefinedOrNullOrEmpty($scope.appInfo.passwordComplexity) && !$scope.appInfo.passwordComplexity.EnforcePasswordComplexity) ||\r\n (WebUserSvc.getNextPasswordResetDate($scope.appInfo.webUser) < 0);\r\n\r\n $scope.hideActiveCheckbox = $scope.hideWebActiveControl($scope.$parent.webFunctions);\r\n\r\n if ($routeParams.contactKey)\r\n {\r\n $scope.customerContactKey = $routeParams.contactKey;\r\n $scope.editWebUser = parseInt($scope.customerContactKey, 10) === $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.Key;\r\n $scope.locationInfo.sideMenuData.subMenu = \"2\";\r\n //If we are managing someone other than ourselves we need to check to see if the user has permissions.\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.ManageContactsAndSecurity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n }\r\n else\r\n {\r\n $scope.editWebUser = true;\r\n $scope.customerContactKey = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.Key;\r\n $scope.appInfo.webUser.AnswerClear = $scope.appInfo.webUser.Answer;\r\n $scope.appInfo.webUser.AnswerClear2 = $scope.appInfo.webUser.Answer;\r\n $scope.copyUser();\r\n }\r\n\r\n userAccountService.listContacts($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (data.CustomerContacts.length === 0)\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"Contacts\"));\r\n\r\n angular.forEach(data.CustomerContacts, function (item)\r\n {\r\n item.DisplayName = item.FirstName + ' ' + item.LastName;\r\n });\r\n $scope.CopyContacts = $filter('orderBy')(data.CustomerContacts, 'DisplayName');\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n });\r\n\r\n userAccountService.loadContactContext($scope.customerContactKey).then(function (data)\r\n {\r\n data.CustomerContact.WebQuestionAnswer2 = data.CustomerContact.WebQuestionAnswer;\r\n if(data.CustomerContact.TextAddressPhone == null) data.CustomerContact.TextAddressPhone = -1;\r\n\r\n $scope.data = data;\r\n $scope.setAllWebFunctions(false);\r\n setTimeout(function ()\r\n {\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.editUserForm)) {\r\n $scope.$apply($scope.editUserForm.$setPristine());\r\n }\r\n }, 1500);\r\n });\r\n };\r\n\r\n $scope.copyUser = function ()\r\n {\r\n $scope.appInfo.editUser.modalResetPassword.webUser =\r\n {\r\n Timestamp: $scope.appInfo.webUser.Timestamp,\r\n Answer: $scope.appInfo.webUser.Answer,\r\n AnswerClear: $scope.appInfo.webUser.AnswerClear,\r\n GUID: $scope.appInfo.webUser.Guid,\r\n Id: $scope.appInfo.webUser.Id,\r\n Key: $scope.appInfo.webUser.Key,\r\n Password: $scope.appInfo.webUser.Password,\r\n PasswordClear: $scope.appInfo.webUser.Password,\r\n Question: $scope.appInfo.webUser.Question,\r\n Reset: true,\r\n Validated: false\r\n };\r\n };\r\n\r\n $scope.hideWebActiveControl = function (wbFns) {\r\n return $scope.checkCurrentUserPermission(WebFunctions.ManageContactsAndSecurity) ? false : true;\r\n };\r\n\r\n $scope.setAllWebFunctions = function (expand)\r\n {\r\n if ($scope.data.CustomerContact.AllWebFunctions)\r\n {\r\n angular.forEach($scope.data.CustomerContact.CustomerContactWebFunctions, function (item)\r\n {\r\n item.Selected = true;\r\n item.Disabled = true;\r\n });\r\n }\r\n else\r\n {\r\n angular.forEach($scope.data.CustomerContact.CustomerContactWebFunctions, function (item)\r\n {\r\n item.Disabled = false;\r\n });\r\n }\r\n expandWFGrids(expand);\r\n };\r\n\r\n $scope.saveContact = function ()\r\n {\r\n validatorSvc.executeValidations();\r\n\r\n //Validations for both Your Profile and Contacts pages\r\n if ($('#editUserAltEmail').hasClass('validation-error') || $('#editUserEmail').hasClass('validation-error'))\r\n return;\r\n\r\n //Validations only for the Your Profile page\r\n if ($scope.editWebUser)\r\n {\r\n if ($scope.kendo.secretQuestion.$angular_scope.scopeValidationErrors.length > 0)\r\n {\r\n return;\r\n }\r\n\r\n }\r\n\r\n if ($scope.data.MatchingContactCount > 1)\r\n {\r\n $scope.appInfo.editUser.modalMultiSave.shown = true;\r\n return;\r\n }\r\n $scope.saveContactOnly();\r\n };\r\n\r\n /*\r\n * Save contat only and save all contacts will still update the names on all contacts sharing the\r\n * current email address.\r\n * */\r\n $scope.saveContactOnly = function ()\r\n {\r\n $scope.data.CustomerContact.ApplyToAll = false;\r\n $scope.appInfo.editUser.modalMultiSave.shown = false;\r\n $scope.save();\r\n };\r\n\r\n $scope.saveAllContacts = function ()\r\n {\r\n $scope.data.CustomerContact.ApplyToAll = true;\r\n $scope.appInfo.editUser.modalMultiSave.shown = false;\r\n $scope.save();\r\n };\r\n\r\n $scope.save = function ()\r\n {\r\n var contact = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact;\r\n $scope.data.CustomerContact.EditorName = contact.FirstName + \" \" + contact.LastName;\r\n $scope.data.CustomerContact.EditorEmailAddress = $scope.appInfo.webUser.Id;\r\n\r\n $scope.data.CustomerContact.PhoneFormatted = $filter('tel')($scope.data.CustomerContact.Phone);\r\n $scope.data.CustomerContact.AltPhoneFormatted = $filter('tel')($scope.data.CustomerContact.AltPhone);\r\n $scope.data.CustomerContact.AltPhone2Formatted = $filter('tel')($scope.data.CustomerContact.AltPhone2);\r\n $scope.data.CustomerContact.FAXFormatted = $filter('tel')($scope.data.CustomerContact.FAX);\r\n\r\n userAccountService.saveContact($scope.data.CustomerContact).then(function (data)\r\n {\r\n $scope.data.CustomerContact = data.CustomerContact;\r\n if ($scope.appInfo.webUser.Answer !== $scope.appInfo.webUser.AnswerClear)\r\n $scope.saveWebUser();\r\n else\r\n {\r\n if($scope.appInfo.editUser.modalChangeEmail.pendingSave)\r\n $scope.logout();\r\n else\r\n $route.reload();\r\n }\r\n\r\n });\r\n };\r\n\r\n //This part get's messy because we need to save the web user and relaod it into the current application scope\r\n //with out bothering the users...\r\n $scope.saveWebUser = function ()\r\n {\r\n /*If this isn;t the current logged in contact dont update the web user informtion.\r\n This shouldn;t be possible anyway.*/\r\n if (!$scope.editWebUser) return;\r\n\r\n var webUser = angular.copy($scope.appInfo.webUser);\r\n webUser.Id = $scope.data.CustomerContact.EmailAddress;\r\n webUser.Question = $scope.appInfo.webUser.Question;\r\n webUser.AnswerClear = $scope.appInfo.webUser.AnswerClear;\r\n\r\n var token = WebUserSvc.getLoggedInWebUserToken();\r\n WebUserSvc.retrieveWebUserData(token, $scope.appInfo.profileKey).then(function (data) {\r\n webUser.Timestamp = data.Timestamp;\r\n webUser.GUID = null;\r\n\r\n WebUserSvc.saveWebUser(webUser, false).then(function (data) {\r\n var currentCustomerId = $scope.appInfo.webUser.CurrentAuthorization.Customer.ID;\r\n WebUserSvc.retrieveSelectedProfile($scope.appInfo.webUser.Id, $scope.appInfo.profileKey).then(function (data) {\r\n $scope.appInfo.webUser = data;\r\n\r\n if ($scope.appInfo.editUser.modalChangeEmail.pendingSave)\r\n $scope.logout();\r\n else\r\n $route.reload();\r\n });\r\n });\r\n });\r\n };\r\n\r\n $scope.setEditUserSelectedAuthorization = function (id)\r\n {\r\n for (var x = 0; x < $scope.appInfo.webUser.WebAuthorizations.length; x++)\r\n {\r\n if ($scope.appInfo.webUser.WebAuthorizations[x].Customer.ID === id)\r\n {\r\n $scope.appInfo.webUser.CurrentAuthorization = $scope.appInfo.webUser.WebAuthorizations[x];\r\n return;\r\n }\r\n }\r\n };\r\n\r\n $scope.updateContactSecurity = function ()\r\n {\r\n var customerContactKey = $scope.appInfo.editUser.modalCopySecurity.copyContact;\r\n userAccountService.loadContactContext(customerContactKey).then(function (data)\r\n {\r\n var webFunctions = data.CustomerContact.CustomerContactWebFunctions;\r\n var currentContactWebFunctions = $scope.data.CustomerContact.CustomerContactWebFunctions;\r\n $scope.data.CustomerContact.AllWebFunctions = true;\r\n for (var i = 0; i < webFunctions.length; i++)\r\n {\r\n for (var x = 0; x < currentContactWebFunctions.length; x++)\r\n {\r\n if (currentContactWebFunctions[x].WebFnKey === webFunctions[i].WebFnKey)\r\n {\r\n if ($scope.appInfo.editUser.modalCopySecurity.clearSecurity)\r\n currentContactWebFunctions[x].Selected = false;\r\n if (webFunctions[i].Selected)\r\n currentContactWebFunctions[x].Selected = true;\r\n if (!currentContactWebFunctions[x].Selected)\r\n $scope.data.CustomerContact.AllWebFunctions = false;\r\n }\r\n }\r\n }\r\n expandWFGrids(false);\r\n $scope.appInfo.editUser.modalCopySecurity.shown = false;\r\n });\r\n };\r\n\r\n $scope.resetPassword = function ()\r\n {\r\n $scope.goTo('/Account/Profile/ResetPassword');\r\n };\r\n\r\n $scope.questionChanged = function (e)\r\n {\r\n if ($scope.kendo.secretQuestion.$angular_scope.$parent.editUserForm.question.$dirty)\r\n {\r\n $scope.appInfo.webUser.AnswerClear = '';\r\n $scope.appInfo.webUser.AnswerClear2 = '';\r\n }\r\n };\r\n\r\n $scope.showChangeEmailModal = function()\r\n {\r\n if ($location.hash() === 'Email')\r\n {\r\n $route.reload();\r\n } else\r\n {\r\n $location.hash('Email');\r\n }\r\n };\r\n\r\n $scope.hideChangeEmailModal = function()\r\n {\r\n $location.hash('');\r\n };\r\n\r\n $scope.saveChangeEmail = function()\r\n {\r\n validatorSvc.executeValidations();\r\n if ($('#changeEmail').hasClass('validation-error'))\r\n return;\r\n\r\n $scope.appInfo.editUser.modalChangeEmail.shown = false;\r\n $scope.appInfo.editUser.modalChangeEmail.pendingSave = true;\r\n $scope.data.CustomerContact.EmailAddress = $scope.appInfo.editUser.modalChangeEmail.email;\r\n $scope.saveContact();\r\n };\r\n })\r\n .controller(\"AddUserCtrl\", function ($q, $scope, $filter, WebFunctions, userAccountService, validatorSvc, $routeParams, WebUserSvc, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.appInfo.addUser = {\r\n shown: true,\r\n copyContacts: [],\r\n contact: userAccountService.getBlankContact()\r\n };\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.ManageContactsAndSecurity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n validatorSvc.clearValidationScopes();\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 12;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ProfileSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"3\";\r\n\r\n userAccountService.listContacts($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (data.CustomerContacts.length === 0)\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"AddContact\"));\r\n\r\n angular.forEach(data.CustomerContacts, function (item)\r\n {\r\n item.DisplayName = item.FirstName + ' ' + item.LastName;\r\n });\r\n $scope.appInfo.addUser.copyContacts = $filter('orderBy')(data.CustomerContacts, 'DisplayName');\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n });\r\n $scope.appInfo.addUser.shown = true;\r\n };\r\n\r\n $scope.createContact = function ()\r\n {\r\n var validationsPassed = true;\r\n if (!validatorSvc.executeValidations()) {\r\n //Bypass shared scope validations with Contacts/Your Profile pages; we only care about add new contact validations\r\n angular.forEach($scope.scopeValidationErrors, function (value, key) {\r\n if (value.model !== \"data.CustomerContact.EmailAddress\")\r\n validationsPassed = false;\r\n });\r\n }\r\n\r\n if (!validationsPassed)\r\n return;\r\n\r\n if ($scope.updateContactSecurity())\r\n return;\r\n\r\n var contact = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact;\r\n $scope.appInfo.addUser.contact.EditorName = contact.FirstName + \" \" + contact.LastName;\r\n $scope.appInfo.addUser.contact.EditorEmailAddress = $scope.appInfo.webUser.Id;\r\n $scope.appInfo.addUser.contact.CustKey = $scope.appInfo.webUser.CurrentAuthorization.CustKey;\r\n\r\n userAccountService.saveContact($scope.appInfo.addUser.contact).then(function (data)\r\n {\r\n $scope.appInfo.addUser.shown = false;\r\n\r\n if(data.CustomerContact && data.CustomerContact.CustKey === 0)\r\n {\r\n $scope.goTo(\"Account/Profile/Contacts\");\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"AddNewContact\"),\r\n localStrings.getLocalizedString(\"NewContactNotCreated\"));\r\n }\r\n else\r\n {\r\n $scope.goTo(\"/Account/Profile/YourProfile/\" + data.CustomerContact.Key);\r\n }\r\n });\r\n\r\n };\r\n\r\n $scope.updateContactSecurity = function ()\r\n {\r\n if (!$scope.appInfo.addUser.copyContact) return false;\r\n //if (!$scope.appInfo.addUser.copyContact.Key) return false;\r\n\r\n var customerContactKey = $scope.appInfo.addUser.copyContact;\r\n userAccountService.loadContactContext(customerContactKey).then(function (data)\r\n {\r\n $scope.appInfo.addUser.contact.CustomerContactWebFunctions = data.CustomerContact.CustomerContactWebFunctions;\r\n $scope.appInfo.addUser.contact.AllWebFunctions = data.CustomerContact.AllWebFunctions;\r\n var contact = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact;\r\n $scope.appInfo.addUser.contact.EditorName = contact.FirstName + \" \" + contact.LastName;\r\n $scope.appInfo.addUser.contact.EditorEmailAddress = $scope.appInfo.webUser.Id;\r\n $scope.appInfo.addUser.contact.CustKey = $scope.appInfo.webUser.CurrentAuthorization.CustKey;\r\n userAccountService.saveContact($scope.appInfo.addUser.contact).then(function (data)\r\n {\r\n $scope.appInfo.addUser.shown = false;\r\n\r\n if (data.CustomerContact && data.CustomerContact.CustKey === 0) {\r\n $scope.goTo(\"Account/Profile/Contacts\");\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"AddNewContact\"),\r\n localStrings.getLocalizedString(\"NewContactNotCreated\"));\r\n }\r\n else {\r\n $scope.goTo(\"/Account/Profile/YourProfile/\" + data.CustomerContact.Key);\r\n }\r\n });\r\n });\r\n return true;\r\n };\r\n\r\n $scope.closeAddUser = function ()\r\n {\r\n $scope.appInfo.addUser.shown = false;\r\n $scope.appInfo.addUser = {};\r\n $scope.goTo(\"/Account/Profile/Contacts\");\r\n };\r\n })\r\n .controller(\"AccountSettingsCtrl\", function ($scope, $filter, WebFunctions, userAccountService, validatorSvc, customerService, WebUserSvc, templates, localStrings, globalizationSvc)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.ViewCreditInformation))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n validatorSvc.clearValidationScopes();\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 12;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ProfileSideMenu\");\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"4\";\r\n $scope.appInfo.pageInfo = {\r\n contacts: [],\r\n primaryCreditContact: 0,\r\n sendBalanceAlerts: $scope.appInfo.webUser.CurrentAuthorization.Customer.SendBalanceAlerts !== 0,\r\n sendBalanceAlertText: localStrings.getLocalizedString(\"SendAlertsBalanceExceeds\"),\r\n balanceAlertThreshold: $scope.appInfo.webUser.CurrentAuthorization.Customer.BalanceAlertThreshold,\r\n prepaidBalance: $scope.appInfo.webUser.CurrentAuthorization.Customer.CrPrePaidBalance !== 0,\r\n balanceAlertThresholdDisplay: globalizationSvc.formatCurrency($scope.appInfo.webUser.CurrentAuthorization.Customer.BalanceAlertThreshold)\r\n };\r\n userAccountService.listContacts($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (data.CustomerContacts.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"AccountSettings\"));\r\n }\r\n else\r\n {\r\n angular.forEach(data.CustomerContacts, function (item) {\r\n item.DisplayName = item.FirstName + ' ' + item.LastName;\r\n\r\n if ($scope.appInfo.webUser.CurrentAuthorization.Customer.CreditContKey === item.Key) {\r\n $scope.appInfo.pageInfo.primaryCreditContact = item.Key;\r\n }\r\n });\r\n $scope.appInfo.pageInfo.contacts = $filter('orderBy')(data.CustomerContacts, 'DisplayName');\r\n $scope.appInfo.pageInfo.primaryCreditContact = ($scope.appInfo.pageInfo.primaryCreditContact === 0) ? $scope.appInfo.pageInfo.contacts[0].Key\r\n : $scope.appInfo.pageInfo.primaryCreditContact;\r\n }\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n });\r\n if ($scope.appInfo.pageInfo.prepaidBalance)\r\n $scope.appInfo.pageInfo.sendBalanceAlertText = localStrings.getLocalizedString(\"SendAlertsBalanceBelow\");\r\n };\r\n\r\n // This method is used to format the text of the input box whenever we lose focus\r\n $scope.formatCurrency = function ()\r\n {\r\n // If the text is empty or null then do not try to format it\r\n if (angular.isUndefinedOrNullOrEmpty($scope.appInfo.pageInfo.balanceAlertThresholdDisplay))\r\n return;\r\n\r\n // Convert the string to a number and parse it as a float\r\n var num = parseFloat(globalizationSvc.convertStringToNumber($scope.appInfo.pageInfo.balanceAlertThresholdDisplay));\r\n\r\n // Format the number back into a currency string to be displayed\r\n num = globalizationSvc.formatCurrency(num);\r\n\r\n // Set the display value to the currency string\r\n $scope.appInfo.pageInfo.balanceAlertThresholdDisplay = num;\r\n };\r\n\r\n $scope.saveAccountSettings = function ()\r\n {\r\n validatorSvc.clearAllValidations();\r\n\r\n if ($scope.appInfo.pageInfo.sendBalanceAlerts && !validatorSvc.executeValidations())\r\n return;\r\n\r\n // Convert the display value to a number and parse it as a float so we can save a number and not some currency string\r\n $scope.appInfo.pageInfo.balanceAlertThreshold = parseFloat(globalizationSvc.convertStringToNumber($scope.appInfo.pageInfo.balanceAlertThresholdDisplay));\r\n\r\n customerService.saveCustomerAccountSettings($scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.appInfo.pageInfo.primaryCreditContact,\r\n $scope.appInfo.pageInfo.balanceAlertThreshold,\r\n $scope.appInfo.pageInfo.sendBalanceAlerts).then(function (data)\r\n {\r\n $scope.resetDirtyFlags($scope.settingsForm);\r\n //Reload the web user once customer data has been changed.\r\n var currentCustomerId = $scope.appInfo.webUser.CurrentAuthorization.Customer.ID;\r\n WebUserSvc.retrieveSelectedProfile($scope.appInfo.webUser.Id, $scope.appInfo.profileKey).then(function (data)\r\n {\r\n $scope.appInfo.webUser = data;\r\n for (var x = 0; x < $scope.appInfo.webUser.WebAuthorizations.length; x++)\r\n {\r\n if ($scope.appInfo.webUser.WebAuthorizations[x].Customer.ID === currentCustomerId)\r\n {\r\n $scope.appInfo.webUser.CurrentAuthorization = $scope.appInfo.webUser.WebAuthorizations[x];\r\n return;\r\n }\r\n }\r\n $scope.initialize();\r\n });\r\n // This will function will call will take whatever was saved and convert it back to a currency string to be displayed after save\r\n $scope.formatCurrency();\r\n });\r\n };\r\n })\r\n .controller(\"SetPasswordCtrl\", function ($scope, Authentication, $filter, WebFunctions, userAccountService, validatorSvc, customerService, WebUserSvc, WebProfileService, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.appInfo) $scope.appInfo = {};\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 12;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ProfileSideMenu\");\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"1\"\r\n };\r\n\r\n var profileKey = ($scope.appInfo && $scope.appInfo.profileKey) ? $scope.appInfo.profileKey : 0;\r\n WebProfileService.getWebProfileMessage(profileKey, 27).then(function (data)\r\n {\r\n $scope.customMessage = data.isBlank() ? localStrings.getLocalizedString(\"ExpiredPassword\") : data;\r\n });\r\n\r\n $scope.appInfo.pageInfo = {\r\n controls: {\r\n oldPassword: '',\r\n password: '',\r\n verify: '',\r\n displayTitle: localStrings.getLocalizedString(\"EnterVerifyPassword\")\r\n },\r\n webUser: {\r\n Timestamp: $scope.appInfo.webUser.Timestamp,\r\n Answer: $scope.appInfo.webUser.Answer,\r\n AnswerClear: $scope.appInfo.webUser.AnswerClear,\r\n GUID: $scope.appInfo.webUser.Guid,\r\n Id: $scope.appInfo.webUser.Id,\r\n Key: $scope.appInfo.webUser.Key,\r\n Password: $scope.appInfo.webUser.Password,\r\n OldPassword: '',\r\n PasswordClear: '',\r\n Question: $scope.appInfo.webUser.Question,\r\n Reset: false, // password reset is only true for forgot password and false for change password\r\n Validated: false\r\n },\r\n error: {\r\n display: false,\r\n text: ''\r\n },\r\n success: false\r\n };\r\n };\r\n\r\n $scope.submitPassword = function ()\r\n {\r\n //$scope.resetPassword.error = [];\r\n\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n $scope.setNewPassword();\r\n };\r\n\r\n $scope.setNewPassword = function ()\r\n {\r\n\r\n $scope.appInfo.pageInfo.webUser.OldPassword = $scope.appInfo.pageInfo.controls.oldPassword;\r\n $scope.appInfo.pageInfo.webUser.PasswordClear = $scope.appInfo.pageInfo.controls.password;\r\n\r\n WebUserSvc.resetWebUserPassword($scope.appInfo.pageInfo.webUser).then(\r\n function (data)\r\n {\r\n //store the new webuser record so the timestamps match the db\r\n $scope.appInfo.pageInfo.webUser = data;\r\n\r\n if (data.Validated === true)\r\n {\r\n // If password reset was successful then we need to login again since we dont store anything in local storage so we need a new token.\r\n Authentication.login($scope.appInfo.webUser.Id, $scope.appInfo.pageInfo.controls.password, \"\").then(function (data) {\r\n var user = data;\r\n var token = user.Token;\r\n amplify.store('pnuser-token', token);\r\n\r\n //Reload the web user once the password has been set.\r\n var currentCustomerId = $scope.appInfo.webUser.CurrentAuthorization.Customer.ID;\r\n WebUserSvc.retrieveWebUserData(token, $scope.appInfo.profileKey).then(function (data) {\r\n $scope.appInfo.webUser = data;\r\n for (var x = 0; x < $scope.appInfo.webUser.WebAuthorizations.length; x++) {\r\n if ($scope.appInfo.webUser.WebAuthorizations[x].Customer.ID === currentCustomerId) {\r\n $scope.appInfo.webUser.CurrentAuthorization = $scope.appInfo.webUser.WebAuthorizations[x];\r\n return;\r\n }\r\n }\r\n },\r\n function (err) {\r\n });\r\n\r\n });\r\n //display the conformation page\r\n $scope.appInfo.pageInfo.success = true;\r\n\r\n }\r\n },\r\n function (err)\r\n {\r\n angular.forEach(err, function (item)\r\n {\r\n $scope.notifier.show(item, localStrings.getLocalizedString(\"Error\"));\r\n });\r\n }\r\n );\r\n };\r\n\r\n $scope.clearErrors = function ()\r\n {\r\n validatorSvc.clearAllValidations();\r\n };\r\n })\r\n .controller(\"auditLogCtrl\", function ($scope, templates, localStrings) {\r\n 'use strict';\r\n\r\n $scope.locationInfo.sideMenuData = {\r\n auditLog: {\r\n auditResults: []\r\n }\r\n };\r\n $scope.kendo = {};\r\n $scope.kendo.auditLogGrid = {};\r\n $scope.kendo.auditLogGridOptions = {\r\n autoBind: false,\r\n change: function (e) {\r\n var selectedRows = this.select();\r\n var dataItem = this.dataItem(selectedRows[0]);\r\n $scope.goTo(\"/Account/Profile/YourProfile/\" + dataItem.Key);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"AudEntryUserID\",\r\n title: localStrings.getLocalizedString(\"ChangedBy\"),\r\n sortable: true,\r\n width: 120,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"AudEntryDateTime\",\r\n title: localStrings.getLocalizedString(\"DateTime\"),\r\n sortable: true,\r\n width: 130,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"AudEntryAction\",\r\n title: localStrings.getLocalizedString(\"Type\"),\r\n width: 50,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"AudEntryMenuCode\",\r\n title: localStrings.getLocalizedString(\"SubjArea\"),\r\n sortable: true,\r\n width: 80,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"AudEntryDescription\",\r\n title: localStrings.getLocalizedString(\"Description\"),\r\n sortable: true,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"AudEntDtlsFieldDesc\",\r\n title: localStrings.getLocalizedString(\"FieldName\"),\r\n sortable: true,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"AudEntDtlsOldValue\",\r\n title: localStrings.getLocalizedString(\"OldValue\"),\r\n sortable: true,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"AudEntDtlsNewValue\",\r\n title: localStrings.getLocalizedString(\"NewValue\"),\r\n sortable: true,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.$parent.auditLogGridInit = function () {\r\n $scope.kendo.auditLogGrid.dataSource.data($scope.locationInfo.sideMenuData.auditLog.auditResults);\r\n };\r\n\r\n $scope.initialize = function () {\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 12;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ProfileSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"5\";\r\n };\r\n })\r\n .controller(\"auditLogSideMenuCtrl\", function ($scope, validatorSvc, userAccountService, WebFunctions, reportingService, WebProfileService, localizationSvc) {\r\n 'use strict';\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n $scope.initialize = function () {\r\n\r\n validatorSvc.clearValidationScopes();\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 12;\r\n $scope.locationInfo.sideMenuLocation = 5;\r\n setTimeout(function() {\r\n $scope.locationInfo.sideMenuData.auditLog = {\r\n includeAdds: true,\r\n includeChanges: true,\r\n includeDeletes: true,\r\n includeActions: true,\r\n subjectArea: null,\r\n changedBy: null,\r\n showContacts: false\r\n };\r\n }, 0);\r\n $scope.subjectAreas = [\r\n { Key: null, Description: localStrings.getLocalizedString(\"All\") },\r\n { Key: \"ARW\", Description: localStrings.getLocalizedString(\"Account\") },\r\n { Key: \"CPW\", Description: localStrings.getLocalizedString(\"FuelCards\") },\r\n { Key: \"ODW\", Description: localStrings.getLocalizedString(\"Orders\") },\r\n { Key: \"DRW\", Description: localStrings.getLocalizedString(\"Paperwork\") },\r\n { Key: \"UAL\", Description: localStrings.getLocalizedString(\"Login\") }\r\n ];\r\n $scope.contactList = [\r\n { EmailAddress: null, DisplayName: localStrings.getLocalizedString(\"Any\") }\r\n ];\r\n if ($scope.checkCurrentUserPermission(WebFunctions.ManageContactsAndSecurity)) {\r\n userAccountService.listContacts($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(function (data) {\r\n if (data.Successful) {\r\n if (data.CustomerContacts.length === 0) {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"Contacts\"), localStrings.getLocalizedString(\"NoResultsFound\"));\r\n return;\r\n }\r\n\r\n angular.forEach(data.CustomerContacts, function (item) {\r\n item.DisplayName = item.EmailAddress;\r\n });\r\n $scope.contactList = data.CustomerContacts\r\n .sortBy('EmailAddress')\r\n .unique('EmailAddress')\r\n .add({ EmailAddress: null, DisplayName: localStrings.getLocalizedString(\"Any\") }, 0);\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n });\r\n $scope.locationInfo.sideMenuData.auditLog.showContacts = true;\r\n }\r\n else\r\n {\r\n $scope.locationInfo.sideMenuData.auditLog.changedBy = $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress;\r\n }\r\n $scope.$root.reportSettings.reportKey = 33;\r\n };\r\n\r\n $scope.applyAction = function () {\r\n if (!validatorSvc.executeValidations()) return;\r\n if(!$scope.locationInfo.sideMenuData.auditLog.includeAdds &&\r\n !$scope.locationInfo.sideMenuData.auditLog.includeChanges &&\r\n !$scope.locationInfo.sideMenuData.auditLog.includeDeletes &&\r\n !$scope.locationInfo.sideMenuData.auditLog.includeActions)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"AuditLog\"), localStrings.getLocalizedString(\"AtLeastOneType\"));\r\n return;\r\n }\r\n var subjectArea = $scope.locationInfo.sideMenuData.auditLog.subjectArea;\r\n var changedBy = $scope.locationInfo.sideMenuData.auditLog.changedBy;\r\n if(subjectArea === 'null')\r\n subjectArea = null;\r\n if(changedBy === 'null')\r\n changedBy = null;\r\n WebProfileService.getWebAudits(\r\n $scope.dateSelector.startDate,\r\n $scope.dateSelector.endDate,\r\n subjectArea,\r\n $scope.locationInfo.sideMenuData.auditLog.includeAdds,\r\n $scope.locationInfo.sideMenuData.auditLog.includeChanges,\r\n $scope.locationInfo.sideMenuData.auditLog.includeDeletes,\r\n $scope.locationInfo.sideMenuData.auditLog.includeActions,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n changedBy\r\n ).then(function (data) {\r\n $scope.locationInfo.sideMenuData.auditLog.auditResults = data.WebAuditEntries.each(function(item) {\r\n item.AudEntryDateTime = Date.create(item.AudEntryDateTime).format('{MM}/{dd}/{yyyy} {12hr}:{mm} {tt}');\r\n });\r\n if (data.WebAuditEntries.length === 0) {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"AuditLog\"), localStrings.getLocalizedString(\"NoResultsFound\"));\r\n return;\r\n }\r\n $scope.auditLogGridInit();\r\n });\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.dateSelector.selection = parseInt($scope.reportSettings.loadOptions.selection, 10);\r\n $scope.dateSelector.numOfDays = parseInt($scope.reportSettings.loadOptions.numOfDays, 10);\r\n $scope.dateSelector.startDate = $scope.reportSettings.loadOptions.startDate;\r\n $scope.dateSelector.endDate = $scope.reportSettings.loadOptions.endDate;\r\n $scope.locationInfo.sideMenuData.auditLog.includeAdds = $scope.reportSettings.loadOptions.includeAdds;\r\n $scope.locationInfo.sideMenuData.auditLog.includeChanges = $scope.reportSettings.loadOptions.includeChanges;\r\n $scope.locationInfo.sideMenuData.auditLog.includeDeletes = $scope.reportSettings.loadOptions.includeDeletes;\r\n $scope.locationInfo.sideMenuData.auditLog.includeActions = $scope.reportSettings.loadOptions.includeActions;\r\n\r\n var subjectArea = $scope.reportSettings.loadOptions.subjectArea;\r\n var changedBy = $scope.reportSettings.loadOptions.changedBy;\r\n if(subjectArea === 'null')\r\n subjectArea = null;\r\n if(changedBy === 'null')\r\n changedBy = null;\r\n $scope.locationInfo.sideMenuData.auditLog.subjectArea = subjectArea;\r\n $scope.locationInfo.sideMenuData.auditLog.changedBy = changedBy;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.selection = $scope.dateSelector.selection;\r\n $scope.reportSettings.saveOptions.numOfDays = $scope.dateSelector.numOfDays;\r\n $scope.reportSettings.saveOptions.startDate = $scope.dateSelector.startDate;\r\n $scope.reportSettings.saveOptions.endDate = $scope.dateSelector.endDate;\r\n $scope.reportSettings.saveOptions.includeAdds = $scope.locationInfo.sideMenuData.auditLog.includeAdds;\r\n $scope.reportSettings.saveOptions.includeChanges = $scope.locationInfo.sideMenuData.auditLog.includeChanges;\r\n $scope.reportSettings.saveOptions.includeDeletes = $scope.locationInfo.sideMenuData.auditLog.includeDeletes;\r\n $scope.reportSettings.saveOptions.includeActions = $scope.locationInfo.sideMenuData.auditLog.includeActions;\r\n $scope.reportSettings.saveOptions.subjectArea = $scope.locationInfo.sideMenuData.auditLog.subjectArea;\r\n $scope.reportSettings.saveOptions.changedBy = $scope.locationInfo.sideMenuData.auditLog.changedBy;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n var subjectArea = $scope.locationInfo.sideMenuData.auditLog.subjectArea;\r\n var changedBy = $scope.locationInfo.sideMenuData.auditLog.changedBy;\r\n var qs = \"reportName=\" + 'AuditLog' +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-StartDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-EndDate=\" + $scope.dateSelector.endDate +\r\n \"&RP-IncludeAdds=\" + $scope.locationInfo.sideMenuData.auditLog.includeAdds +\r\n \"&RP-IncludeChanges=\" + $scope.locationInfo.sideMenuData.auditLog.includeChanges +\r\n \"&RP-IncludeDeletes=\" + $scope.locationInfo.sideMenuData.auditLog.includeDeletes +\r\n \"&RP-IncludeActions=\" + $scope.locationInfo.sideMenuData.auditLog.includeActions;\r\n if(subjectArea !== 'null')\r\n qs = qs + \"&RP-SubjectArea=\" + subjectArea;\r\n if(changedBy !== 'null')\r\n qs = qs + \"&RP-ChangedBy=\" + changedBy;\r\n\r\n reportingService.exportReport(qs, args.format);\r\n });\r\n });\r\n","/**\r\n * Created by rhampton on 3/24/14.\r\n */\r\nangular.module(\"pnAccountReports\", ['core.objects'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider\r\n .when(\"/Account/Reports/RecentActivity\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"RecentActivity\"),\r\n controller: \"recentActivityCtrl\"\r\n }\r\n )\r\n .when(\"/Account/Reports/Invoices\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Invoices\"),\r\n controller: \"invoicesCtrl\"\r\n }\r\n )\r\n .when(\"/Account/Reports/PaymentHistory\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"PaymentHistory\"),\r\n controller: \"paymentHistoryCtrl\"\r\n }\r\n )\r\n .when(\"/Account/Reports/TransactionHistory\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TransactionHistory\"),\r\n controller: \"transactionHistoryCtrl\"\r\n }\r\n )\r\n .when(\"/Account/Reports/ScheduledPayments\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ScheduledPayments\"),\r\n controller: \"scheduledPaymentsCtrl\"\r\n }\r\n )\r\n .when(\"/Account/Reports/UnappliedPayments\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"UnappliedPayments\"),\r\n controller: \"unappliedPaymentsCtrl\"\r\n }\r\n )\r\n .when(\"/Account/Reports/CreditCardActivity\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"CreditCardActivity\"),\r\n controller: \"creditCardActivityCtrl\"\r\n }\r\n )\r\n .when(\"/Account/Reports/TenNinetyNine\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TenNinetyNine\"),\r\n controller: \"tenNinetyNineCtrl\"\r\n }\r\n )\r\n\r\n;\r\n})\r\n.controller('reportSideMenuCtrl', function ($scope, WebFunctions)\r\n{\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n };\r\n })\r\n .controller('reportSideMenuInvoicesCtrl', function ($scope, validatorSvc, WebFunctions, reportingService, Authentication, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.invoices) $scope.locationInfo.sideMenuData.invoices = {};\r\n $scope.locationInfo.sideMenuData.invoices.reportType = 'InvoiceByDateRange';\r\n $scope.locationInfo.sideMenuData.invoices.reportTypeDetail = 'InvoiceByDateRangeDetail';\r\n $scope.locationInfo.sideMenuData.invoices.outstandingOnly = 'True';\r\n $scope.locationInfo.sideMenuData.invoices.showReportDetail = 'False';\r\n $scope.$root.reportSettings.reportKey = 2;\r\n\r\n $scope.dateSelector.overrideDefaults = true;\r\n $scope.dateSelector.maxNumOfDays = 90;\r\n $scope.dateSelector.selection = 13;\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.invoices.outstandingOnly = $scope.reportSettings.loadOptions.outstandingOnly;\r\n $scope.locationInfo.sideMenuData.invoices.showReportDetail = $scope.reportSettings.loadOptions.showReportDetail;\r\n $scope.dateSelector.selection = parseInt($scope.reportSettings.loadOptions.selection, 10);\r\n $scope.dateSelector.numOfDays = parseInt($scope.reportSettings.loadOptions.numOfDays, 10);\r\n $scope.dateSelector.startDate = $scope.reportSettings.loadOptions.startDate;\r\n $scope.dateSelector.endDate = $scope.reportSettings.loadOptions.endDate;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.outstandingOnly = $scope.locationInfo.sideMenuData.invoices.outstandingOnly;\r\n $scope.reportSettings.saveOptions.showReportDetail = $scope.locationInfo.sideMenuData.invoices.showReportDetail;\r\n $scope.reportSettings.saveOptions.selection = $scope.dateSelector.selection;\r\n $scope.reportSettings.saveOptions.numOfDays = $scope.dateSelector.numOfDays;\r\n $scope.reportSettings.saveOptions.startDate = $scope.dateSelector.startDate;\r\n $scope.reportSettings.saveOptions.endDate = $scope.dateSelector.endDate;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var reportName = $scope.locationInfo.sideMenuData.invoices.showReportDetail === 'True' ?\r\n $scope.locationInfo.sideMenuData.invoices.reportTypeDetail :\r\n $scope.locationInfo.sideMenuData.invoices.reportType;\r\n\r\n var qs = \"reportName=\" + reportName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-HideZeroBalance=\" + $scope.locationInfo.sideMenuData.invoices.outstandingOnly +\r\n \"&RP-startDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-endDate=\" + $scope.dateSelector.endDate +\r\n \"&RP-showReportDetail=\" + $scope.locationInfo.sideMenuData.invoices.showReportDetail;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n .controller('reportSideMenuTransactionHistoryCtrl', function ($scope, validatorSvc, WebFunctions, reportingService, Authentication, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.transactionHistory) $scope.locationInfo.sideMenuData.transactionHistory = {};\r\n $scope.locationInfo.sideMenuData.transactionHistory.reportType = 'TransactionHistory';\r\n $scope.locationInfo.sideMenuData.transactionHistory.showReportDetail = 'False';\r\n $scope.$root.reportSettings.reportKey = 6;\r\n\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.dateSelector.selection = parseInt($scope.reportSettings.loadOptions.selection, 10);\r\n $scope.dateSelector.numOfDays = parseInt($scope.reportSettings.loadOptions.numOfDays, 10);\r\n $scope.dateSelector.startDate = $scope.reportSettings.loadOptions.startDate;\r\n $scope.dateSelector.endDate = $scope.reportSettings.loadOptions.endDate;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.selection = $scope.dateSelector.selection;\r\n $scope.reportSettings.saveOptions.numOfDays = $scope.dateSelector.numOfDays;\r\n $scope.reportSettings.saveOptions.startDate = $scope.dateSelector.startDate;\r\n $scope.reportSettings.saveOptions.endDate = $scope.dateSelector.endDate;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var qs = \"reportName=\" + $scope.locationInfo.sideMenuData.transactionHistory.reportType +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-startDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-endDate=\" + $scope.dateSelector.endDate;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n .controller('reportSideMenuCreditCardActivityCtrl', function ($scope, validatorSvc, WebFunctions, reportingService, Authentication, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.creditCardActivity) $scope.locationInfo.sideMenuData.creditCardActivity = {};\r\n $scope.locationInfo.sideMenuData.creditCardActivity.groupByDate = 0;\r\n $scope.locationInfo.sideMenuData.creditCardActivity.showReportDetail = 'False';\r\n $scope.locationInfo.sideMenuData.creditCardActivity.pending = '0';\r\n $scope.$root.reportSettings.reportKey = 7;\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.creditCardActivity.groupByDate = $scope.reportSettings.saveOptions.groupByDate;\r\n $scope.dateSelector.selection = parseInt($scope.reportSettings.loadOptions.selection, 10);\r\n $scope.dateSelector.numOfDays = parseInt($scope.reportSettings.loadOptions.numOfDays, 10);\r\n $scope.dateSelector.startDate = $scope.reportSettings.loadOptions.startDate;\r\n $scope.dateSelector.endDate = $scope.reportSettings.loadOptions.endDate;\r\n $scope.setReport();\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.groupByDate = $scope.locationInfo.sideMenuData.creditCardActivity.groupByDate;\r\n $scope.reportSettings.saveOptions.selection = $scope.dateSelector.selection;\r\n $scope.reportSettings.saveOptions.numOfDays = $scope.dateSelector.numOfDays;\r\n $scope.reportSettings.saveOptions.startDate = $scope.dateSelector.startDate;\r\n $scope.reportSettings.saveOptions.endDate = $scope.dateSelector.endDate;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var reportType = $scope.locationInfo.sideMenuData.creditCardActivity.groupByDate === 1 ? 'CreditCardActivityByDate' : 'CreditCardActivityByDescription';\r\n var qs = \"reportName=\" + reportType +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-startDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-endDate=\" + $scope.dateSelector.endDate;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n .controller('reportSideMenuScheduledPaymentsCtrl', function ($scope, validatorSvc, WebFunctions, reportingService, Authentication, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.scheduledPayments) $scope.locationInfo.sideMenuData.scheduledPayments = {};\r\n $scope.locationInfo.sideMenuData.scheduledPayments.reportType = 'ScheduledPaymentsAndEfts';\r\n $scope.locationInfo.sideMenuData.scheduledPayments.reportTypeDetail = 'ScheduledPaymentsAndEftsDetail';\r\n\r\n $scope.locationInfo.sideMenuData.scheduledPayments.showReportDetail = 'False';\r\n $scope.locationInfo.sideMenuData.scheduledPayments.pending = '0';\r\n $scope.$root.reportSettings.reportKey = 5;\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.scheduledPayments.pending = $scope.reportSettings.loadOptions.pending;\r\n $scope.locationInfo.sideMenuData.scheduledPayments.showReportDetail = $scope.reportSettings.loadOptions.showReportDetail;\r\n $scope.dateSelector.selection = parseInt($scope.reportSettings.loadOptions.selection, 10);\r\n $scope.dateSelector.numOfDays = parseInt($scope.reportSettings.loadOptions.numOfDays, 10);\r\n $scope.dateSelector.startDate = $scope.reportSettings.loadOptions.startDate;\r\n $scope.dateSelector.endDate = $scope.reportSettings.loadOptions.endDate;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.pending = $scope.locationInfo.sideMenuData.scheduledPayments.pending;\r\n $scope.reportSettings.saveOptions.showReportDetail = $scope.locationInfo.sideMenuData.scheduledPayments.showReportDetail;\r\n $scope.reportSettings.saveOptions.selection = $scope.dateSelector.selection;\r\n $scope.reportSettings.saveOptions.numOfDays = $scope.dateSelector.numOfDays;\r\n $scope.reportSettings.saveOptions.startDate = $scope.dateSelector.startDate;\r\n $scope.reportSettings.saveOptions.endDate = $scope.dateSelector.endDate;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var reportName = $scope.locationInfo.sideMenuData.scheduledPayments.showReportDetail === 'True' ?\r\n $scope.locationInfo.sideMenuData.scheduledPayments.reportTypeDetail :\r\n $scope.locationInfo.sideMenuData.scheduledPayments.reportType;\r\n\r\n var qs = \"reportName=\" + reportName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-startDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-endDate=\" + $scope.dateSelector.endDate +\r\n \"&RP-pending=\" + $scope.locationInfo.sideMenuData.scheduledPayments.pending +\r\n \"&RP-showReportDetail=\" + $scope.locationInfo.sideMenuData.scheduledPayments.showReportDetail;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n .controller('reportSideMenuPaymentHistoryCtrl', function ($scope, validatorSvc, $rootScope, WebFunctions, reportingService, Authentication, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.paymentHistory) $scope.locationInfo.sideMenuData.paymentHistory = {};\r\n $scope.locationInfo.sideMenuData.paymentHistory.showReportDetail = false;\r\n $scope.$root.reportSettings.reportKey = 3;\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.paymentHistory.showReportDetail = $scope.reportSettings.loadOptions.showReportDetail;\r\n $scope.dateSelector.selection = parseInt($scope.reportSettings.loadOptions.selection, 10);\r\n $scope.dateSelector.numOfDays = parseInt($scope.reportSettings.loadOptions.numOfDays, 10);\r\n $scope.dateSelector.startDate = $scope.reportSettings.loadOptions.startDate;\r\n $scope.dateSelector.endDate = $scope.reportSettings.loadOptions.endDate;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.showReportDetail = $scope.locationInfo.sideMenuData.paymentHistory.showReportDetail;\r\n $scope.reportSettings.saveOptions.selection = $scope.dateSelector.selection;\r\n $scope.reportSettings.saveOptions.numOfDays = $scope.dateSelector.numOfDays;\r\n $scope.reportSettings.saveOptions.startDate = $scope.dateSelector.startDate;\r\n $scope.reportSettings.saveOptions.endDate = $scope.dateSelector.endDate;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var rptName = $scope.locationInfo.sideMenuData.paymentHistory.showReportDetail ? 'PaymentHistoryIAD' : 'PaymentHistory';\r\n var qs = \"reportName=\" + rptName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-startDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-endDate=\" + $scope.dateSelector.endDate;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n .controller('reportSideMenuTenNinetyNineCtrl', function ($scope, validatorSvc, WebFunctions, reportingService, Authentication, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.tenNinetyNine) $scope.locationInfo.sideMenuData.tenNinetyNine = {};\r\n $scope.locationInfo.sideMenuData.tenNinetyNine.reportType = '1099-KByDate';\r\n $scope.locationInfo.sideMenuData.tenNinetyNine.useDateRange = '1';\r\n $scope.$root.reportSettings.reportKey = 8;\r\n $scope.exportReport = false;\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.dateSelector.selection = parseInt($scope.reportSettings.loadOptions.selection, 10);\r\n $scope.dateSelector.numOfDays = parseInt($scope.reportSettings.loadOptions.numOfDays, 10);\r\n $scope.dateSelector.startDate = $scope.reportSettings.loadOptions.startDate;\r\n $scope.dateSelector.endDate = $scope.reportSettings.loadOptions.endDate;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.selection = $scope.dateSelector.selection;\r\n $scope.reportSettings.saveOptions.numOfDays = $scope.dateSelector.numOfDays;\r\n $scope.reportSettings.saveOptions.startDate = $scope.dateSelector.startDate;\r\n $scope.reportSettings.saveOptions.endDate = $scope.dateSelector.endDate;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var qs = \"reportName=\" + $scope.locationInfo.sideMenuData.tenNinetyNine.reportType +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-StartDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-EndDate=\" + $scope.dateSelector.endDate;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n .controller(\"recentActivityCtrl\", function ($scope, WebFunctions, WebFunctionGroups, reportingService, Authentication, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermissions(WebFunctionGroups.AccountReports) || !$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n if ($scope.checkCurrentUserPermissions(WebFunctionGroups.AccountPayments))\r\n $scope.goTo(\"/Account/Payments/ViewScheduledPayments\");\r\n else\r\n $scope.goTo(\"/Account/Profile/YourProfile\");\r\n return;\r\n }\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.recentActivity) $scope.locationInfo.sideMenuData.recentActivity = {};\r\n $scope.locationInfo.sideMenuData.recentActivity.reportType = '/RecentActivity';\r\n $scope.locationInfo.sideMenuData.subMenu = \"1\";\r\n $scope.custKey = $scope.appInfo.webUser.CurrentAuthorization.CustKey;\r\n $scope.exportReport = \"false\";\r\n $scope.applyAction();\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n var qs = \"reportName=\" + $scope.locationInfo.sideMenuData.recentActivity.reportType +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n .controller(\"invoicesCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.invoices) $scope.locationInfo.sideMenuData.invoices = {};\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"2\";\r\n };\r\n })\r\n .controller(\"paymentHistoryCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"3\";\r\n })\r\n .controller(\"transactionHistoryCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"8\";\r\n })\r\n .controller(\"scheduledPaymentsCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"5\";\r\n })\r\n .controller(\"creditCardActivityCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"6\";\r\n })\r\n .controller(\"unappliedPaymentsCtrl\", function ($scope, WebFunctions, reportingService, Authentication, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"4\";\r\n $scope.locationInfo.sideMenuData.unappliedPayments = {};\r\n $scope.locationInfo.sideMenuData.unappliedPayments.reportType = '/UnappliedPayments';\r\n $scope.applyAction();\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n var qs = \"reportName=\" + $scope.locationInfo.sideMenuData.unappliedPayments.reportType +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n .controller(\"tenNinetyNineCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = 10;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"ReportSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"7\";\r\n })\r\n;","/**\r\n * Created by jvitoria on 7/12/2015.\r\n */\r\nangular.module(\"pnDocAccount\", ['ngSanitize', 'core.objects', 'core.directives'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider.when(\"/Documents/Account/Statements\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Statements\"),\r\n controller: \"statementsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"DocumentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Documents/Account/Notifications\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Notifications\"),\r\n controller: \"notificationsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"DocumentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Documents/Account/Advice\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Advice\"),\r\n controller: \"adviceCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"DocumentsLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n ;\r\n })\r\n .controller(\"docAccountSideMenuCtrl\", function ($scope)\r\n {\r\n 'use strict';\r\n\r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.menuLocation = 6;\r\n $scope.locationInfo.subMenuLocation = 60;\r\n };\r\n })\r\n .controller(\"statementsSideMenuCtrl\", function ($scope, localizationSvc)\r\n {\r\n 'use strict';\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"DateSelectorLocalization\"); \r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.menuLocation = 6;\r\n $scope.locationInfo.subMenuLocation = 60;\r\n\r\n $scope.dateSelector.overrideDefaults = true;\r\n $scope.dateSelector.maxNumOfDays = 90;\r\n $scope.dateSelector.options = [\r\n {name: localStrings.getLocalizedString(\"AllDays\"), value: 13},\r\n {name: localStrings.getLocalizedString(\"Today\"), value: 0},\r\n {name: localStrings.getLocalizedString(\"Yesterday\"), value: 1},\r\n {name: localStrings.getLocalizedString(\"ThisWeek\"), value: 3},\r\n {name: localStrings.getLocalizedString(\"ThisMonth\"), value: 4},\r\n {name: localStrings.getLocalizedString(\"ThisYear\"), value: 5},\r\n {name: localStrings.getLocalizedString(\"PriorWeek\"), value: 6},\r\n {name: localStrings.getLocalizedString(\"PriorMonth\"), value: 7},\r\n {name: localStrings.getLocalizedString(\"PriorYear\"), value: 8},\r\n {name: localStrings.getLocalizedString(\"LastSevenDays\"), value: 9},\r\n {name: localStrings.getLocalizedString(\"LastThirtyDays\"), value: 10},\r\n {name: localStrings.getLocalizedString(\"SelectDates\"), value: 11},\r\n {name: localStrings.getLocalizedString(\"SelectDays\"), value: 12}];\r\n };\r\n })\r\n .controller(\"statementsCtrl\", function ($scope, validatorSvc, WebFunctions, documentService, templates, localStrings)\r\n {\r\n 'use strict';\r\n\r\n validatorSvc.clearValidationScopes();\r\n $scope.kendo = {};\r\n $scope.kendo.statementsGrid = {};\r\n $scope.kendo.statementsGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var dataItem = this.dataItem(this.select()[0]);\r\n if (!dataItem.StmtEdocKey)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"Documents\"), localStrings.getLocalizedString(\"SelectedDocumentNoLonger\"));\r\n return;\r\n }\r\n else\r\n $scope.openEdoc(dataItem.StmtEdocKey);\r\n\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"StmtDateTime\",\r\n title: localStrings.getLocalizedString(\"StatementDate\"),\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.statementsGridInit = function (ds)\r\n {\r\n $scope.kendo.statementsGridDS = new kendo.data.DataSource({\r\n data: ds\r\n });\r\n\r\n $scope.kendo.statementsGridDS.read();\r\n $scope.kendo.statementsGrid.dataSource.data($scope.kendo.statementsGridDS.data());\r\n };\r\n\r\n function getStatements()\r\n {\r\n documentService.getStatements(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.dateSelector.startDate,\r\n $scope.dateSelector.endDate).then(function (data)\r\n {\r\n if (data.Success)\r\n {\r\n if (data.Data.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"Statements\"));\r\n return;\r\n }\r\n\r\n data.Data.each(function (stmt)\r\n {\r\n stmt.StmtDateTime = Date.create(stmt.StmtDateTime).format('{MM}/{dd}/{yyyy}');\r\n });\r\n\r\n $scope.kendo.statementsGridInit(data.Data);\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n });\r\n }\r\n\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Documents/Account/Notifications\");\r\n }\r\n\r\n //set the side menu location info\r\n $scope.locationInfo.menuLocation = 6;\r\n $scope.locationInfo.subMenuLocation = 60;\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"AccountSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"1\";\r\n };\r\n\r\n $scope.$parent.applyAction = function ()\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n getStatements();\r\n };\r\n })\r\n .controller(\"notificationsSideMenuCtrl\", function ($scope, userAccountService, localizationSvc)\r\n {\r\n 'use strict';\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"DocumentsLocalization\");\r\n $scope.kendo = {};\r\n\r\n function getContactsContext()\r\n {\r\n userAccountService.listContacts($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data) {\r\n if (!data.Successful || angular.isUndefinedOrNullOrEmpty(data.CustomerContacts)) {\r\n $scope.modalifier.showSetupError();\r\n return;\r\n }\r\n\r\n angular.forEach(data.CustomerContacts, function (item) {\r\n item.fullName = item.FirstName + ' ' + item.LastName;\r\n });\r\n\r\n $scope.locationInfo.sideMenuData.notifications.contacts = data.CustomerContacts.findAll({ Active: -1 }).sortBy('fullName');\r\n $scope.locationInfo.sideMenuData.notifications.contacts.add({Key: null, fullName: localStrings.getLocalizedString(\"Any\")}, 0);\r\n });\r\n }\r\n\r\n $scope.initialize = function ()\r\n {\r\n\r\n $scope.locationInfo.menuLocation = 6;\r\n $scope.locationInfo.subMenuLocation = 60;\r\n $scope.locationInfo.sideMenuData.notifications = {\r\n contact: null,\r\n contacts: {},\r\n type: null,\r\n types: [{ key: null, value: localStrings.getLocalizedString(\"Any\") },\r\n { key: 0, value: localStrings.getLocalizedString(\"CreditLimit\") },\r\n { key: 1, value: localStrings.getLocalizedString(\"PrepaidBalance\") },\r\n { key: 2, value: localStrings.getLocalizedString(\"PastDuePayment\") },\r\n { key: 3, value: localStrings.getLocalizedString(\"OtherCreditCorrespondence\") },\r\n { key: 4, value: localStrings.getLocalizedString(\"ProductsServices\") },\r\n { key: 5, value: localStrings.getLocalizedString(\"GeneralBusinessCorrespondence\") }]\r\n };\r\n getContactsContext();\r\n };\r\n })\r\n .controller(\"notificationsCtrl\", function ($scope, validatorSvc, $sce, documentService, templates, localStrings)\r\n {\r\n 'use strict';\r\n validatorSvc.clearValidationScopes();\r\n $scope.kendo = {};\r\n $scope.kendo.notificationsGrid = {};\r\n $scope.kendo.notificationsGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var dataItem = this.dataItem(this.select()[0]);\r\n if (!dataItem)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"Notifications\"), localStrings.getLocalizedString(\"SelectedDocumentNoLonger\"));\r\n return;\r\n }\r\n\r\n $scope.handleRowClick(dataItem);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"NotcDescription\",\r\n title: localStrings.getLocalizedString(\"SubjectTitle\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"NotcType\",\r\n title: localStrings.getLocalizedString(\"Type\"),\r\n width: 200,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"RcptEmail\",\r\n title: localStrings.getLocalizedString(\"Recipient\"),\r\n width: 200,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"NotcDate\",\r\n title: localStrings.getLocalizedString(\"Date\"),\r\n width: 100,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: [],\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.notificationsGridInit = function (ds)\r\n {\r\n $scope.kendo.notificationsGridDS = new kendo.data.DataSource({\r\n data: ds\r\n });\r\n\r\n //$scope.resizeKendoGrid($scope.kendo.notificationsGrid, ds.length || 0, 295);\r\n\r\n $scope.kendo.notificationsGridDS.read();\r\n $scope.kendo.notificationsGrid.dataSource.data($scope.kendo.notificationsGridDS.data());\r\n };\r\n\r\n function getNotifications()\r\n {\r\n documentService.getNotifications(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.locationInfo.sideMenuData.notifications.contact,\r\n $scope.locationInfo.sideMenuData.notifications.type,\r\n $scope.dateSelector.startDate,\r\n $scope.dateSelector.endDate\r\n ).then(function (data)\r\n {\r\n if (data.Success)\r\n {\r\n if (data.Data.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"Notifications\"));\r\n return;\r\n }\r\n\r\n data.Data.each(function (note)\r\n {\r\n note.NotcDate = Date.create(note.NotcDate).format('{MM}/{dd}/{yyyy}');\r\n note.EmailBody = $sce.trustAsHtml(note.EmailBody);\r\n if (note.DispType === 1 || note.DispType === 3)\r\n {\r\n //note.NotcDescription = '';\r\n note.NotcType = 'Attachment';\r\n //note.RcptEmail = '';\r\n //note.NotcDate = '';\r\n }\r\n });\r\n\r\n $scope.kendo.notificationsGridInit(data.Data);\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n });\r\n }\r\n\r\n $scope.$parent.applyAction = function () {\r\n if (!validatorSvc.executeValidations()) return;\r\n getNotifications();\r\n };\r\n\r\n $scope.handleRowClick = function handleRowClick(item)\r\n {\r\n switch (item.DispType)\r\n {\r\n case 0:\r\n $scope.emailPopUp = item;\r\n $scope.emailPopUp.show = true;\r\n break;\r\n\r\n case 1:\r\n case 2:\r\n if (item.EdocDtlKey > 0) $scope.openEdoc(item.EdocDtlKey);\r\n else\r\n scope.notifier.show(localStrings.getLocalizedString(\"DocumentNotRetrieved\"), 'error');\r\n break;\r\n\r\n case 3:\r\n if (item.AttachGUID !== null) $scope.openAttachment(item.AttachGUID);\r\n else\r\n scope.notifier.show(localStrings.getLocalizedString(\"DocumentNotRetrieved\"), 'error');\r\n break;\r\n }\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n //set the side menu location info\r\n $scope.locationInfo.menuLocation = 6;\r\n $scope.locationInfo.subMenuLocation = 60;\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"AccountSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"2\";\r\n $scope.emailPopUp = {show: false};\r\n };\r\n })\r\n .controller('adviceSideMenuCtrl', function ($scope, $filter, WebFunctions, validatorSvc, documentService, templates, localizationSvc)\r\n {\r\n 'use strict';\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"DocumentsLocalization\");\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n validatorSvc.clearValidationScopes();\r\n\r\n $scope.locationInfo.menuLocation = 6;\r\n $scope.locationInfo.subMenuLocation = 60;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"AccountSideMenu\");\r\n\r\n $scope.locationInfo.sideMenuData.tenNinetyNineAdvice = {\r\n yearsBack: 5\r\n };\r\n $scope.exportReport = false;\r\n };\r\n })\r\n .controller(\"adviceCtrl\", function ($scope, $filter, WebFunctions, templates, localStrings, validatorSvc, documentService)\r\n {\r\n 'use strict';\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.adviceGrid = {};\r\n $scope.kendo.adviceGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var dataItem = this.dataItem(this.select()[0]);\r\n if(!dataItem.EdocDtlKey)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"Documents\"), localStrings.getLocalizedString(\"SelectedDocumentNoLonger\"));\r\n return;\r\n }\r\n\r\n $scope.openEdoc(dataItem.EdocDtlKey);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"PmtYear\",\r\n title: localStrings.getLocalizedString(\"AdviceYear\"),\r\n width: 100,\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"DateTimeFormatted\",\r\n title: localStrings.getLocalizedString(\"ProcessDate\"),\r\n width: 150,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Name\",\r\n title: localStrings.getLocalizedString(\"BusinessEntity\"),\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"PaymentType\",\r\n title: localStrings.getLocalizedString(\"PaymentType\"),\r\n width: 150,\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: [],\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.$parent.applyAction = function ()\r\n {\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n $scope.predicate = 'DateTimeFormatted';\r\n $scope.reverse = false;\r\n $scope.modalifier.hide();\r\n\r\n documentService.Get1099AdviceList(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.locationInfo.sideMenuData.tenNinetyNineAdvice.yearsBack).then(\r\n function (data)\r\n {\r\n if (data.Success)\r\n {\r\n if (data.Data.length === 0) {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"TenNinetyNineKAdvice\"));\r\n }\r\n else\r\n {\r\n data.Data.each(function (element)\r\n {\r\n element.DateTimeFormatted = $filter('date')(element.DateTime, 'MM/dd/yyyy');\r\n element.PmtYear = element.PmtYear.toString();\r\n });\r\n\r\n $scope.kendo.adviceGridInit(data.Data);\r\n }\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n });\r\n };\r\n\r\n $scope.kendo.adviceGridInit = function (ds)\r\n {\r\n $scope.kendo.adviceGridDS = new kendo.data.DataSource({\r\n data: ds\r\n });\r\n\r\n $scope.kendo.adviceGridDS.read();\r\n $scope.kendo.adviceGrid.dataSource.data($scope.kendo.adviceGridDS.data());\r\n };\r\n\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AccountActivity))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n $scope.initialize = function ()\r\n {\r\n //set the side menu location info\r\n $scope.locationInfo.menuLocation = 6;\r\n $scope.locationInfo.subMenuLocation = 60;\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"AccountSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"3\";\r\n };\r\n })\r\n;","/**\r\n * Created by jvitoria on 9/5/14.\r\n */\r\nangular.module(\"pnFuelCardsCards\", ['core.objects'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider\r\n .when(\"/FuelCards/Cards/ViewCards\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"ViewCards\"),\r\n controller: \"viewCardsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"FuelCardsCardsLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/FuelCards/Cards/AddCards\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"AddCards\"),\r\n controller: \"addCardsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"FuelCardsCardsLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/FuelCards/Cards/AddTemplates\",\r\n {\r\n templateUrl: \"fuelCards/cards/addTemplates/addTemplates.tpl.html\",\r\n controller: \"addTemplatesCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"FuelCardsCardsLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/FuelCards/Cards/Departments\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Departments\"),\r\n controller: \"departmentsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"FuelCardsCardsLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/FuelCards/Cards/DepartmentSetup\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"DepartmentSetup\"),\r\n controller: \"departmentSetupCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"FuelCardsCardsLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/FuelCards/Cards/Locations\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"Locations\"),\r\n controller: \"locationsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"FuelCardsCardsLocalization\");\r\n }\r\n }\r\n })\r\n ;\r\n })\r\n .controller('fuelCardsCardsSideMenuCtrl', function ($scope, $rootScope, FuelCardsService)\r\n {\r\n 'use strict';\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.locationInfo.sideMenuData)\r\n $scope.locationInfo.sideMenuData = {};\r\n };\r\n })\r\n .controller(\"viewCardsCtrl\", function ($scope, FuelCardsService, WebFunctions, WebFunctionGroups, customerService, validatorSvc, $filter, $q, $timeout, templates, localStrings)\r\n {\r\n 'use strict';\r\n\r\n if (!$scope.appInfo.fuelCards)\r\n $scope.appInfo.fuelCards = {};\r\n $scope.appInfo.fuelCards.viewCards = {shown: true};\r\n $scope.appInfo.fuelCards.modalEdit = {shown: false};\r\n $scope.appInfo.fuelCards.modalPin = {shown: false};\r\n $scope.appInfo.fuelCards.modalReissue = {shown: false};\r\n $scope.appInfo.fuelCards.modalDeactivate = {shown: false};\r\n $scope.appInfo.fuelCards.modalChangeCardNo = {shown: false, mode: 'edit'};\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.viewCardsGrid = {};\r\n $scope.kendo.viewCardsGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var dataItem = this.dataItem(this.select()[0]);\r\n $scope.displayFuelCard(dataItem.Key);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"Description\",\r\n title: localStrings.getLocalizedString(\"CardDescription\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Status\",\r\n title: localStrings.getLocalizedString(\"Status\"),\r\n width: 100,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"ActivationDate\",\r\n title: localStrings.getLocalizedString(\"ActivationDate\"),\r\n width: 100,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"ExpirationDate\",\r\n title: localStrings.getLocalizedString(\"ExpirationDate\"),\r\n width: 100,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \" \",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n //height: $(document).height() - 375,\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.viewCardsGridInit = function ()\r\n {\r\n $scope.kendo.viewCardsGridDS = new kendo.data.DataSource({\r\n data: $scope.appInfo.fuelCards.viewCards.cards\r\n });\r\n\r\n $scope.kendo.viewCardsGridDS.read();\r\n $scope.kendo.viewCardsGrid.dataSource.data($scope.kendo.viewCardsGridDS.data());\r\n };\r\n\r\n $scope.$parent.applyAction = function ()\r\n {\r\n $scope.appInfo.fuelCards.viewCards.cards = [];\r\n $scope.modalifier.hide();\r\n $scope.appInfo.fuelCards.viewCards.shown = true;\r\n $scope.appInfo.fuelCards.modalEdit.shown = false;\r\n $scope.appInfo.fuelCards.modalReissue.shown = false;\r\n $scope.appInfo.fuelCards.modalReissue.shown = false;\r\n $scope.appInfo.fuelCards.modalDeactivate.shown = false;\r\n FuelCardsService.getCards\r\n (\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.locationInfo.sideMenuData.viewCards.cardFormat,\r\n $scope.locationInfo.sideMenuData.viewCards.cardNumber,\r\n $scope.locationInfo.sideMenuData.viewCards.active === \"True\" ? -1 : 0,\r\n $scope.locationInfo.sideMenuData.viewCards.expired === \"True\" ? -1 : 0,\r\n $scope.locationInfo.sideMenuData.viewCards.pending === \"True\" ? -1 : 0,\r\n $scope.locationInfo.sideMenuData.viewCards.locked === \"True\" ? -1 : 0,\r\n $scope.locationInfo.sideMenuData.viewCards.cancelled === \"True\" ? -1 : 0,\r\n $scope.locationInfo.sideMenuData.viewCards.department,\r\n $scope.locationInfo.sideMenuData.viewCards.template\r\n ).then\r\n (\r\n function (data)\r\n {\r\n if (data.Cards.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"Cards\"));\r\n return;\r\n }\r\n\r\n $scope.appInfo.fuelCards.viewCards.cards = [];\r\n angular.forEach(data.Cards, function (item)\r\n {\r\n var desc = item.NumberMasked + ' - ' + item.Description;\r\n desc += item.Template === -1 ? ' (Template)' : '';\r\n\r\n var status = $filter('filter')($scope.appInfo.fuelCards.statusCodes, {Key: item.Status});\r\n\r\n var act = $filter('date')(item.ActivationDate, 'MM/dd/yyyy') || '';\r\n var exp = $filter('date')(item.ExpirationDate, 'MM/dd/yyyy') || '';\r\n\r\n $scope.appInfo.fuelCards.viewCards.cards.push({\r\n Key: item.Key,\r\n Sort: item.Description,\r\n Description: desc,\r\n Status: status[0].Description,\r\n ActivationDate: act,\r\n ExpirationDate: exp\r\n });\r\n });\r\n $scope.kendo.viewCardsGridInit();\r\n }\r\n );\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n //if user doesnt have permission for the section landing page, test to see if they can land on another one\r\n //before sending them to the home page\r\n if (!$scope.checkCurrentUserPermissions(WebFunctionGroups.FuelCardsCards))\r\n {\r\n if ($scope.checkCurrentUserPermissions(WebFunctionGroups.FuelCardsTrans))\r\n $scope.goTo(\"/FuelCards/Transactions/TransactionDetails\");\r\n else if ($scope.checkCurrentUserPermissions(WebFunctionGroups.FuelCardsPrices))\r\n $scope.goTo(\"/FuelCards/Prices/LookupPrices\");\r\n else\r\n $scope.goTo(\"/Home\");\r\n }\r\n\r\n validatorSvc.clearValidationScopes();\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 40;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsCardsSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"0\";\r\n\r\n $scope.appInfo.fuelCards.statusCodes = [\r\n { Key: '0', Description: localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"Active\")) },\r\n { Key: '1', Description: localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"Cancelled\")) },\r\n { Key: '2', Description: localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"Expired\")) },\r\n { Key: '3', Description: localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"Locked\")) },\r\n { Key: '4', Description: localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"Pending\")) }\r\n ];\r\n $scope.appInfo.fuelCards.viewCards.cards = [];\r\n FuelCardsService.getCardsContext(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey\r\n ).then(\r\n function (data) {\r\n $scope.appInfo.fuelCards.formats = $filter('orderBy')(data.CardFormats, 'Description');\r\n $scope.appInfo.fuelCards.embossingReasons = $filter('orderBy')(data.CardEmbossingReasons, 'Description');\r\n $scope.appInfo.fuelCards.deactivateReasons = $filter('orderBy')(data.CardDeactivationReasons, 'Description');\r\n $scope.appInfo.fuelCards.states = data.States;\r\n $scope.appInfo.fuelCards.alertRules = $filter('orderBy')(data.CardAlertRules, 'ID');\r\n $scope.appInfo.fuelCards.templates = $filter('orderBy')(data.CustomerCardTemplates, 'Description');\r\n $scope.appInfo.fuelCards.company = data.Company;\r\n }\r\n );\r\n\r\n FuelCardsService.getCardsDepartments($scope.appInfo.webUser.CurrentAuthorization.CustKey)\r\n .then(function (data) {\r\n if (data.Successful) {\r\n $scope.appInfo.fuelCards.departments = $filter('orderBy')(data.Departments, 'Description');\r\n }\r\n }\r\n );\r\n\r\n customerService.getCustomerLocations($scope.appInfo.webUser.CurrentAuthorization.CustKey, 2)\r\n .then(function (data) {\r\n if (data.Successful) {\r\n $scope.appInfo.fuelCards.locations = $filter('orderBy')(data.Locations, 'Description');\r\n }\r\n }\r\n );\r\n\r\n $scope.hideModals();\r\n };\r\n\r\n $scope.saveCards = function (state)\r\n {\r\n var recStatus = 0;\r\n var closeModal = false;\r\n var card = $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0];\r\n\r\n if (card.Description.isBlank())\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"Required\"), 'error');\r\n $scope.setFocusOnReady('#efc-description');\r\n return;\r\n }\r\n\r\n switch (state)\r\n {\r\n case 'save':\r\n recStatus = 16;\r\n break;\r\n\r\n case 'saveAndClose':\r\n recStatus = 16;\r\n closeModal = true;\r\n break;\r\n\r\n case 'saveCN':\r\n recStatus = 16;\r\n card.Number_Formatted = null;\r\n card.Number_Masked = null;\r\n break;\r\n\r\n case 'add':\r\n recStatus = 4;\r\n break;\r\n\r\n case 'template':\r\n\r\n if (!$scope.isValidForWebTemplate(card))\r\n return;\r\n\r\n recStatus = 4;\r\n card.Number = 0;\r\n card.NumberMasked = null;\r\n card.Template = \"-1\";\r\n card.PIN = null;\r\n card.Activation_Date = null;\r\n card.Expiration_Date = null;\r\n card.Cards_Issued = '0';\r\n card.Emboss_Date = null;\r\n card.Emboss_Line_1 = null;\r\n card.Emboss_Line_2 = null;\r\n card.Emboss_Line_3 = null;\r\n card.Export_To_Embosser = '0';\r\n card.Marked_For_Export = '0';\r\n card.Last_Emboss_Date = null;\r\n card.CardDeactRsn_Key = 0;\r\n card.Deactivation_Date = null;\r\n card.HasTransactions = '0';\r\n card.Key = 0;\r\n card.TimeStamp = null;\r\n card.Status = $scope.securityOptions.allowPending ? '4' : '0';\r\n closeModal = true;\r\n break;\r\n }\r\n\r\n FuelCardsService.saveCards\r\n (\r\n recStatus,\r\n card,\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardCFs[0],\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey\r\n ).then\r\n (\r\n function (data)\r\n {\r\n if (!closeModal)\r\n $scope.displayFuelCard(card.Key);\r\n else\r\n $scope.initialize();\r\n\r\n $scope.resetDirtyFlags($scope.editCards);\r\n }\r\n );\r\n };\r\n\r\n $scope.displayFuelCard = function (key)\r\n {\r\n FuelCardsService.getCardDetails\r\n (\r\n key,\r\n $scope.checkCurrentUserPermission(WebFunctions.ViewCardNumbers)\r\n ).then\r\n (\r\n function (data)\r\n {\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails = data.CardDetails;\r\n $scope.appInfo.fuelCards.modalEdit.origCardDetails = angular.copy(data.CardDetails);\r\n\r\n $scope.setSecurityOptions();\r\n $scope.resetDirtyFlags($scope.editCards);\r\n }\r\n );\r\n };\r\n\r\n $scope.displayModelPin = function (state)\r\n {\r\n switch (state)\r\n {\r\n case 'display':\r\n $scope.saveChangesPrompt();\r\n validatorSvc.clearAllValidations();\r\n $scope.appInfo.fuelCards.modalPin.PIN1 = null;\r\n $scope.appInfo.fuelCards.modalPin.PIN2 = null;\r\n $scope.appInfo.fuelCards.modalPin.error = false;\r\n $scope.appInfo.fuelCards.modalPin.shown = true;\r\n break;\r\n\r\n case 'save':\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0].PIN = $scope.appInfo.fuelCards.modalPin.PIN1;\r\n $scope.appInfo.fuelCards.modalPin.shown = false;\r\n $scope.saveCards('save');\r\n break;\r\n }\r\n };\r\n\r\n $scope.displayModelReissue = function (state)\r\n {\r\n switch (state)\r\n {\r\n case 'display':\r\n $scope.saveChangesPrompt();\r\n $scope.appInfo.fuelCards.modalReissue.selection = $scope.appInfo.fuelCards.embossingReasons[0].Key;\r\n $scope.appInfo.fuelCards.modalReissue.shown = true;\r\n break;\r\n\r\n case 'save':\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0].CardEmbRsn_Key = $scope.appInfo.fuelCards.modalReissue.selection;\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0].Export_To_Embosser = '-1';\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0].Emboss_Date = new Date();\r\n $scope.appInfo.fuelCards.modalReissue.shown = false;\r\n $scope.saveCards('save');\r\n break;\r\n }\r\n };\r\n\r\n $scope.displayModelDeactReasons = function (state)\r\n {\r\n switch (state)\r\n {\r\n case 'display':\r\n $scope.saveChangesPrompt();\r\n $scope.appInfo.fuelCards.modalDeactivate.selection = $scope.appInfo.fuelCards.deactivateReasons[0].Key;\r\n $scope.appInfo.fuelCards.modalDeactivate.shown = true;\r\n break;\r\n\r\n case 'save':\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0].CardDeactRsn_Key = $scope.appInfo.fuelCards.modalDeactivate.selection;\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0].Status = '1';\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0].Deactivation_Date = new Date().toISOString().slice(0, 19);\r\n $scope.appInfo.fuelCards.modalDeactivate.shown = false;\r\n $scope.saveCards('save');\r\n break;\r\n }\r\n };\r\n\r\n $scope.displayChangeCardNo = function (command)\r\n {\r\n switch (command)\r\n {\r\n case 'open':\r\n $scope.saveChangesPrompt().then(\r\n function ()\r\n {\r\n $scope.saveCards('save');\r\n $scope.appInfo.fuelCards.modalChangeCardNo.mode = 'edit';\r\n $scope.appInfo.fuelCards.modalChangeCardNo.shown = true;\r\n },\r\n function ()\r\n {\r\n $scope.appInfo.fuelCards.modalChangeCardNo.mode = 'edit';\r\n $scope.appInfo.fuelCards.modalChangeCardNo.shown = true;\r\n }\r\n );\r\n break;\r\n\r\n case 'save':\r\n if ($scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0].HasTransactions === '-1')\r\n $scope.appInfo.fuelCards.modalChangeCardNo.mode = 'confirm';\r\n else\r\n {\r\n $scope.saveCards('saveCN');\r\n $scope.displayChangeCardNo(localStrings.getLocalizedString(\"Close\"));\r\n }\r\n break;\r\n\r\n case 'confirm':\r\n $scope.saveCards('saveCN');\r\n $scope.displayChangeCardNo(localStrings.getLocalizedString(\"Close\"));\r\n break;\r\n\r\n case 'close':\r\n $scope.appInfo.fuelCards.modalChangeCardNo.shown = false;\r\n $scope.appInfo.fuelCards.modalChangeCardNo.mode = 'edit';\r\n break;\r\n }\r\n };\r\n\r\n $scope.hideModals = function ()\r\n {\r\n $scope.appInfo.fuelCards.viewCards.shown = true;\r\n $scope.appInfo.fuelCards.modalEdit.shown = false;\r\n $scope.appInfo.fuelCards.modalReissue.shown = false;\r\n $scope.appInfo.fuelCards.modalReissue.shown = false;\r\n $scope.appInfo.fuelCards.modalDeactivate.shown = false;\r\n $scope.appInfo.fuelCards.modalChangeCardNo.shown = false;\r\n validatorSvc.clearAllValidations();\r\n };\r\n\r\n $scope.isValidForWebTemplate = function (card)\r\n {\r\n var isValid = true;\r\n var format = $filter('filter')($scope.appInfo.fuelCards.formats, {Key: card.CardFmt_Key}, true)[0] || {};\r\n\r\n if (angular.isUndefinedOrNullOrEmpty(format) || format.VisibleOnWeb === 0)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"CardFormatInvalid\"), 'error');\r\n return false;\r\n }\r\n\r\n if (card.Template === '-1')\r\n {\r\n angular.forEach($scope.appInfo.fuelCards.templates, function (item)\r\n {\r\n if (card.Description === item.Description)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"TemplateDescriptionUnique\"), 'error');\r\n isValid = false;\r\n }\r\n\r\n //if(card.Number === item.Number)\r\n //{\r\n // $scope.notifier.show('Template card number must be unique', 'error');\r\n // isValid = false;\r\n //}\r\n });\r\n }\r\n\r\n //physical card w/o auto number or pending\r\n if (format.PhysicalCard === -1 && format.AutoNo === 0 && format.AllowPending === 0)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"PhysicalCardsError\"), 'error');\r\n isValid = false;\r\n }\r\n\r\n //expiration dates\r\n if (format.UseExpirationDates === -1 && format.DefaultLifetimeSelection === 0 && format.AllowDefaultByCustomer === 0)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ExpirationDateConfiguredError\"), 'error');\r\n isValid = false;\r\n }\r\n\r\n //expiration dates\r\n if (format.UseExpirationDates === -1 && format.AllowDefaultByCustomer === -1)\r\n {\r\n\r\n var nextDate = angular.isUndefinedOrNullOrEmpty(card.Next_Exp_Date) ? new Date('01/01/1900') : new Date(card.Next_Exp_Date);\r\n var expDate = angular.isUndefinedOrNullOrEmpty(card.Expiration_Date) ? new Date('01/01/1900') : new Date(card.Expiration_Date);\r\n var today = new Date();\r\n\r\n if (expDate <= today && nextDate <= today)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"MissingExpirationDate\"), 'error');\r\n isValid = false;\r\n }\r\n }\r\n\r\n return isValid;\r\n };\r\n\r\n $scope.saveChangesPrompt = function ()\r\n {\r\n var deferred = $q.defer();\r\n if ($scope.editCards.$dirty)\r\n $scope.modalifier.confirm(localStrings.getLocalizedString(\"UnsavedChanges\"), deferred.resolve, deferred.reject);\r\n else\r\n deferred.reject();\r\n\r\n return deferred.promise;\r\n };\r\n\r\n $scope.setSecurityOptions = function ()\r\n {\r\n\r\n $scope.securityOptions = {\r\n readOnly: true,\r\n formTitle: '',\r\n\r\n viewCardNumber: false,\r\n displayCardNumber: '',\r\n canChangeCardNo: false,\r\n\r\n showVehicleInfo: false,\r\n showCardAuths: false,\r\n showProdSite: false,\r\n showTaxExemeptions: false,\r\n showEmbossingAlert: false,\r\n\r\n showChangePin: false,\r\n showReissue: false,\r\n reissueTitle: '',\r\n showDeactivate: false,\r\n showSaveTemplate: false,\r\n\r\n shipToLocation: '',\r\n cardType: '',\r\n department: '',\r\n format: '',\r\n state: '',\r\n cardStatus: '',\r\n deactivationReason: '',\r\n embossingReason: '',\r\n alertRule: ''\r\n };\r\n\r\n function keyLookup(list, match, field, value)\r\n {\r\n if(!Object.isArray(list) || list.length === 0 || angular.isUndefinedOrNullOrEmpty(match)|| angular.isUndefinedOrNullOrEmpty(field))\r\n return value;\r\n\r\n var item = list.find({Key: match});\r\n\r\n if (item)\r\n return item[field];\r\n else\r\n return value;\r\n }\r\n\r\n var card = $scope.appInfo.fuelCards.modalEdit.cardDetails.CardInfos[0];\r\n var format = $filter('filter')($scope.appInfo.fuelCards.formats, {Key: card.CardFmt_Key}, true)[0];\r\n\r\n //sanity check\r\n if (!card || !format)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"Cards\"), localStrings.getLocalizedString(\"CardSelectionFailed\"));\r\n return;\r\n }\r\n\r\n //form options\r\n $scope.securityOptions.readOnly = !($scope.checkCurrentUserPermission(WebFunctions.EditCards) &&\r\n (format.AllowEditAfterEmbossed === -1 ||\r\n card.Cards_Issued === '0'));\r\n $scope.securityOptions.formTitle = $scope.securityOptions.readOnly ? localStrings.getLocalizedString(\"ViewCard\") : localStrings.getLocalizedString(\"EditCard\");\r\n $scope.securityOptions.formTitle += card.Template === \"-1\" ? ' Template' : '';\r\n $scope.securityOptions.allowPending = format.AllowPending === -1;\r\n\r\n //card number options\r\n $scope.securityOptions.autoNo = format.AutoNo === -1;\r\n $scope.securityOptions.maxCardNoLength = format.Mask.match(/0/g).length || 20;\r\n $scope.securityOptions.canChangeCardNo = !$scope.securityOptions.readOnly && !$scope.securityOptions.autoNo && $scope.checkCurrentUserPermission(WebFunctions.ViewCardNumbers);\r\n\r\n // section visibility options\r\n $scope.securityOptions.showEmbossingAlert = card.Export_To_Embosser === '-1';\r\n $scope.securityOptions.showCardAuths = $scope.securityOptions.readOnly ||\r\n card.CardAlertRule_Key > 0 ||\r\n card.Max_Trans_PerDay > 0 ||\r\n $scope.appInfo.fuelCards.modalEdit.cardDetails.CardCFs.length > 0;\r\n $scope.securityOptions.showVehicleInfo = format.AllowVehicleInfo === -1;\r\n $scope.securityOptions.showProdSite = card.Auth_By_Product !== '0' && card.Single_Site_Auth_Site_Key !== 0;\r\n $scope.securityOptions.showTaxExemeptions = $scope.appInfo.fuelCards.modalEdit.cardDetails.CardTaxExs.length > 0;\r\n\r\n // button options\r\n $scope.securityOptions.showSave = !$scope.securityOptions.readOnly;\r\n $scope.securityOptions.showChangePin = !$scope.securityOptions.readOnly && format.AllowPIN !== 0;\r\n $scope.securityOptions.showReissue = !$scope.securityOptions.readOnly;\r\n $scope.securityOptions.reissueTitle = format.PhysicalCard === 0 ? localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"ActivateCard\")) : localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"ReissueCard\"));\r\n $scope.securityOptions.showDeactivate = !$scope.securityOptions.readOnly;\r\n $scope.securityOptions.showSaveTemplate = $scope.checkCurrentUserPermission(WebFunctions.AddNewCards);\r\n\r\n // child field lookups\r\n $scope.securityOptions.shipToLocation = keyLookup($scope.appInfo.fuelCards.locations, card.CustLocKey, 'ID', '(Default)');\r\n $scope.securityOptions.format = format.Description;\r\n $scope.securityOptions.department = keyLookup($scope.appInfo.fuelCards.departments, card.CardDptKey, 'Description', '');\r\n $scope.securityOptions.state = keyLookup($scope.appInfo.fuelCards.states, card.Vehicle_State_Key, 'Description', '');\r\n $scope.securityOptions.cardType = card.Type === \"0\" ? 'Card Holder' : 'Vehicle Card';\r\n $scope.securityOptions.cardStatus = keyLookup($scope.appInfo.fuelCards.statusCodes, card.Status, 'Description', '');\r\n $scope.securityOptions.deactivationReason = keyLookup($scope.appInfo.fuelCards.deactivateReasons, card.CardDeactRsn_Key, 'Description', '');\r\n $scope.securityOptions.embossingReason = keyLookup($scope.appInfo.fuelCards.embossingReasons, card.CardEmbRsn_Key, 'Description', '');\r\n $scope.securityOptions.alertRule = keyLookup($scope.appInfo.fuelCards.alertRules, card.CardAlertRule_Key, 'ID', '');\r\n\r\n //show the card detail screen\r\n $scope.appInfo.fuelCards.viewCards.shown = false;\r\n $scope.appInfo.fuelCards.modalEdit.shown = true;\r\n };\r\n })\r\n .controller(\"viewCardsSideMenuCtrl\", function ($scope, FuelCardsService, WebFunctions, reportingService, $filter)\r\n {\r\n 'use strict';\r\n $scope.cols = [];\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.viewCards) $scope.locationInfo.sideMenuData.viewCards = [];\r\n $scope.locationInfo.sideMenuData.viewCards.reportType = 'ViewCards';\r\n $scope.locationInfo.sideMenuData.viewCards.cardFormat = '0';\r\n $scope.locationInfo.sideMenuData.viewCards.cardNumber = '';\r\n $scope.locationInfo.sideMenuData.viewCards.active = 'True';\r\n $scope.locationInfo.sideMenuData.viewCards.expired = 'False';\r\n $scope.locationInfo.sideMenuData.viewCards.pending = 'False';\r\n $scope.locationInfo.sideMenuData.viewCards.locked = 'False';\r\n $scope.locationInfo.sideMenuData.viewCards.cancelled = 'False';\r\n $scope.$root.reportSettings.reportKey = 20;\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.viewCards.cardFormat = $scope.reportSettings.loadOptions.cardFormat;\r\n $scope.locationInfo.sideMenuData.viewCards.cardNumber = $scope.reportSettings.loadOptions.cardNumber;\r\n $scope.locationInfo.sideMenuData.viewCards.active = $scope.reportSettings.loadOptions.active;\r\n $scope.locationInfo.sideMenuData.viewCards.expired = $scope.reportSettings.loadOptions.expired;\r\n $scope.locationInfo.sideMenuData.viewCards.pending = $scope.reportSettings.loadOptions.pending;\r\n $scope.locationInfo.sideMenuData.viewCards.locked = $scope.reportSettings.loadOptions.locked;\r\n $scope.locationInfo.sideMenuData.viewCards.cancelled = $scope.reportSettings.loadOptions.cancelled;\r\n $scope.locationInfo.sideMenuData.viewCards.department = $scope.reportSettings.loadOptions.department;\r\n $scope.locationInfo.sideMenuData.viewCards.template = $scope.reportSettings.loadOptions.template;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.cardFormat = $scope.locationInfo.sideMenuData.viewCards.cardFormat;\r\n $scope.reportSettings.saveOptions.cardNumber = $scope.locationInfo.sideMenuData.viewCards.cardNumber;\r\n $scope.reportSettings.saveOptions.active = $scope.locationInfo.sideMenuData.viewCards.active;\r\n $scope.reportSettings.saveOptions.expired = $scope.locationInfo.sideMenuData.viewCards.expired;\r\n $scope.reportSettings.saveOptions.pending = $scope.locationInfo.sideMenuData.viewCards.pending;\r\n $scope.reportSettings.saveOptions.locked = $scope.locationInfo.sideMenuData.viewCards.locked;\r\n $scope.reportSettings.saveOptions.cancelled = $scope.locationInfo.sideMenuData.viewCards.cancelled;\r\n $scope.reportSettings.saveOptions.department = $scope.locationInfo.sideMenuData.viewCards.department;\r\n $scope.reportSettings.saveOptions.template = $scope.locationInfo.sideMenuData.viewCards.template;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n var format = $scope.locationInfo.sideMenuData.viewCards.cardFormat === '' ? '0' :\r\n $scope.locationInfo.sideMenuData.viewCards.cardFormat;\r\n var active = $scope.locationInfo.sideMenuData.viewCards.active === \"True\" ? -1 : 0;\r\n var expired = $scope.locationInfo.sideMenuData.viewCards.expired === \"True\" ? -1 : 0;\r\n var pending = $scope.locationInfo.sideMenuData.viewCards.pending === \"True\" ? -1 : 0;\r\n var locked = $scope.locationInfo.sideMenuData.viewCards.locked === \"True\" ? -1 : 0;\r\n var cancelled = $scope.locationInfo.sideMenuData.viewCards.cancelled === \"True\" ? -1 : 0;\r\n var department = $scope.locationInfo.sideMenuData.viewCards.department === '' ? '0':\r\n $scope.locationInfo.sideMenuData.viewCards.department;\r\n\r\n var qs = \"reportName=\" + 'CustomerCardList' +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-CardFormatKey=\" + format +\r\n \"&RP-CardNumDesc=\" + $scope.locationInfo.sideMenuData.viewCards.cardNumber +\r\n \"&RP-IsActive=\" + active +\r\n \"&RP-IsExpired=\" + expired +\r\n \"&RP-IsPending=\" + pending +\r\n \"&RP-IsLocked=\" + locked +\r\n \"&RP-IsCancelled=\" + cancelled +\r\n \"&RP-Department=\" + department +\r\n \"&RP-Template=\" + $scope.locationInfo.sideMenuData.viewCards.template +\r\n \"&RP-CanViewCardNumbers=\" + $scope.checkCurrentUserPermission(WebFunctions.ViewCardNumbers);\r\n\r\n reportingService.exportReport(qs, args.format);\r\n });\r\n })\r\n .controller(\"addCardsCtrl\", function ($scope, $compile, FuelCardsService, WebFunctions, $filter, validatorSvc, templates, localStrings)\r\n {\r\n 'use strict';\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.columns = [\r\n {\r\n field: \"description\",\r\n title: localStrings.getLocalizedString(\"CardDescription\"),\r\n attributes: {class: \"alignLeft\"},\r\n editor: function (element, options)\r\n {\r\n $(\"\")\r\n .attr(\"name\", options.field)\r\n .attr(\"data-bind\", \"value:\" + options.field)\r\n .attr(\"class\", \"k-input k-textbox\")\r\n .attr(\"maxlength\", 30)\r\n .prop('required', true)\r\n .attr(\"data-required-msg\", localStrings.getLocalizedString(\"Required\"))\r\n .appendTo(element);\r\n\r\n $('')\r\n .attr(\"data-for\", options.field)\r\n .attr(\"class\", \"k-invalid-msg\")\r\n .appendTo(element);\r\n }\r\n },\r\n {\r\n field: \"number\",\r\n title: localStrings.getLocalizedString(\"CardNumber\"),\r\n width: 160,\r\n attributes: {class: \"alignLeft\"},\r\n editor: function (element, options)\r\n {\r\n $(\"\")\r\n .attr(\"name\", options.field)\r\n .attr(\"data-bind\", \"value:\" + options.field)\r\n .attr(\"maxlength\", $scope.context.maxCardNoLength)\r\n .prop('required', true)\r\n .attr(\"data-required-msg\", localStrings.getLocalizedString(\"Required\"))\r\n .appendTo(element)\r\n .kendoNumericTextBox({\r\n decimals: 0,\r\n format: \"#\",\r\n min: 0,\r\n spinners: false\r\n });\r\n\r\n $('')\r\n .attr(\"data-for\", options.field)\r\n .attr(\"class\", \"k-invalid-msg\")\r\n .appendTo(element);\r\n }\r\n },\r\n {\r\n field: \"PIN\",\r\n title: localStrings.getLocalizedString(\"PIN\"),\r\n width: 120,\r\n attributes: {class: \"alignLeft\"},\r\n editor: function (element, options)\r\n {\r\n $(\"\")\r\n .attr(\"name\", options.field)\r\n .attr(\"data-bind\", \"value:\" + options.field)\r\n .attr(\"maxlength\", 16)\r\n .appendTo(element)\r\n .kendoNumericTextBox({\r\n decimals: 0,\r\n format: \"#\",\r\n min: 0,\r\n spinners: false\r\n });\r\n }\r\n },\r\n {\r\n field: \"vehicleID\",\r\n title: localStrings.getLocalizedString(\"VehicleID\"),\r\n width: 100,\r\n attributes: {class: \"alignLeft\"},\r\n editor: function (element, options)\r\n {\r\n $(\"\")\r\n .attr(\"name\", options.field)\r\n .attr(\"data-bind\", \"value:\" + options.field)\r\n .attr(\"class\", \"k-input k-textbox\")\r\n .attr(\"maxlength\", 20)\r\n .appendTo(element);\r\n\r\n $('')\r\n .attr(\"data-for\", options.field)\r\n .attr(\"class\", \"k-invalid-msg\")\r\n .appendTo(element);\r\n }\r\n },\r\n {\r\n field: \"licenseNo\",\r\n title: localStrings.getLocalizedString(\"LicenseNo\"),\r\n width: 100,\r\n attributes: {class: \"alignLeft\"},\r\n editor: function (element, options)\r\n {\r\n $(\"\")\r\n .attr(\"name\", options.field)\r\n .attr(\"data-bind\", \"value:\" + options.field)\r\n .attr(\"class\", \"k-input k-textbox\")\r\n .attr(\"maxlength\", 15)\r\n .appendTo(element);\r\n\r\n $('')\r\n .attr(\"data-for\", options.field)\r\n .attr(\"class\", \"k-invalid-msg\")\r\n .appendTo(element);\r\n }\r\n },\r\n {\r\n field: \"state\",\r\n title: localStrings.getLocalizedString(\"LicenseState\"),\r\n width: 60,\r\n template: \"#=state.Code#\",\r\n attributes: {class: \"alignLeft\"},\r\n editor: function (element, options)\r\n {\r\n $scope.kendo.stateList = $(\"\")\r\n .attr(\"name\", options.field)\r\n .attr(\"data-bind\", \"value:\" + options.field)\r\n .appendTo(element)\r\n .kendoDropDownList({\r\n autoBind: false,\r\n dataSource: $scope.context.states,\r\n dataTextField: \"Code\",\r\n dataValueField: \"Key\",\r\n optionLabel: {\r\n Key: null,\r\n Code: \"\"\r\n }\r\n });\r\n }\r\n },\r\n {\r\n title: ' ',\r\n template: \"\",\r\n width: 50\r\n },\r\n {\r\n title: ' ',\r\n template: \"\",\r\n width: 50\r\n }\r\n ];\r\n $scope.kendo.addCardsGridOptions = {\r\n autoBind: true,\r\n columns: $scope.kendo.columns,\r\n dataSource: new kendo.data.DataSource({\r\n data: [],\r\n schema: {\r\n model: {\r\n id: \"description\",\r\n fields: {\r\n key: {\r\n type: \"number\",\r\n editable: false,\r\n nullable: false,\r\n validation: false\r\n },\r\n description: {\r\n type: \"string\",\r\n editable: true,\r\n nullable: true,\r\n validation: false\r\n },\r\n number: {\r\n type: \"number\",\r\n editable: true,\r\n nullable: true,\r\n validation: {\r\n unique: function (input)\r\n {\r\n if (input.attr(\"name\") === \"number\" && input.val() !== '')\r\n {\r\n var matches = $scope.kendo.addCardsGrid.dataSource.data().toJSON().findAll({number: input.val().toNumber()}) || [];\r\n input.attr(\"data-unique-msg\", localStrings.getLocalizedString(\"MustBeUnique\"));\r\n return matches.length <= 1;\r\n }\r\n\r\n return true;\r\n }\r\n }\r\n },\r\n PIN: {\r\n type: \"number\",\r\n editable: true,\r\n nullable: true,\r\n validation: false\r\n },\r\n vehicleID: {\r\n type: \"string\",\r\n editable: true,\r\n nullable: true,\r\n validation: false\r\n },\r\n licenseNo: {\r\n type: \"string\",\r\n editable: true,\r\n nullable: true,\r\n validation: false\r\n }, state: {\r\n editable: true,\r\n defaultValue: {Key: null, Code: \"\"}\r\n }\r\n }\r\n }\r\n }\r\n }),\r\n editable: {\r\n mode: \"inline\",\r\n update: true,\r\n destroy: true,\r\n createAt: \"bottom\"\r\n },\r\n filterable: false,\r\n messages: {\r\n commands: {\r\n cancel: \"\",\r\n canceledit: \"\",\r\n create: \"\",\r\n destroy: \"\",\r\n edit: \"\",\r\n save: \"\",\r\n select: \"\",\r\n update: \"\"\r\n }\r\n },\r\n mobile: true,\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: true,\r\n sortable: true\r\n };\r\n\r\n function addFooterBar()\r\n {\r\n var addCardAction = $('
    ').appendTo($('#addCardsGrid'));\r\n $compile(addCardAction)($scope);\r\n }\r\n\r\n $scope.$on(\"kendoWidgetCreated\", function (event, widget)\r\n {\r\n if (widget === $scope.kendo.addCardsGrid)\r\n {\r\n addFooterBar();\r\n\r\n $scope.kendo.addCardsGrid.table.on(\"keydown\", function (e)\r\n {\r\n if (e.keyCode === kendo.keys.TAB && e.target.closest(\"td\").getAttribute(\"data-container-for\") === \"state\")\r\n {\r\n $scope.addRow();\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n $scope.kendo.addCardsGrid.tbody.on(\"click\", \"tr:not(.k-grid-edit-row)\", function (e)\r\n {\r\n $scope.kendo.addCardsGrid.editRow($scope.kendo.addCardsGrid.tbody.find(\"tr.k-state-selected\"));\r\n });\r\n }\r\n });\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.AddNewCards) || !$scope.checkCurrentUserPermission(WebFunctions.EditCards))\r\n {\r\n $scope.goTo(\"/Home\");\r\n return;\r\n }\r\n\r\n validatorSvc.clearValidationScopes();\r\n\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 40;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsCardsSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData)\r\n {\r\n $scope.locationInfo.sideMenuData = {};\r\n }\r\n $scope.locationInfo.sideMenuData.subMenu = '1';\r\n\r\n $scope.context = {\r\n template: {},\r\n format: {},\r\n showCardNo: false,\r\n showPIN: false,\r\n showVehInfo: false\r\n };\r\n\r\n FuelCardsService.getCardsContext($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data)\r\n {\r\n if (!data.Successful)\r\n {\r\n $scope.modalifier.showSetupError();\r\n return;\r\n }\r\n\r\n $scope.context.formats = data.CardFormats;\r\n $scope.context.states = data.States;\r\n $scope.context.templates = data.CustomerCardTemplates.sortBy('Description');\r\n\r\n validateTemplates();\r\n\r\n if ($scope.context.templates.length === 0)\r\n {\r\n var msg = $scope.checkCurrentUserPermission(WebFunctions.AddNewCards) ? ' ' + localStrings.getLocalizedString(\"CreateOneOr\") + ' ' : ' ';\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"AddCards\"), localStrings.getLocalizedString(\"NoCardTemplates\") + msg + localStrings.getLocalizedString(\"ContactAccountAdmin\"));\r\n $scope.context.templateKey = 0;\r\n }\r\n else\r\n $scope.context.templateKey = $scope.context.templates[0].Key;\r\n\r\n // Need to make sure the template details are loaded when the add cards page is loaded\r\n if ($scope.context.templateKey > 0) {\r\n $scope.getTemplate($scope.context.templateKey);\r\n }\r\n });\r\n };\r\n\r\n $scope.addRow = function ()\r\n {\r\n if ($scope.kendo.templateDropDown.value().isBlank())\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"AddCards\"), localStrings.getLocalizedString(\"ValidTemplateRequired\"));\r\n return;\r\n }\r\n\r\n $scope.kendo.addCardsGrid.saveChanges();\r\n $scope.kendo.addCardsGrid.addRow();\r\n };\r\n\r\n $scope.getTemplate = function (key)\r\n {\r\n if (!key)\r\n {\r\n return;\r\n }\r\n\r\n FuelCardsService.getCardDetails(key).then(\r\n function (data)\r\n {\r\n if (!data.Successful)\r\n {\r\n $scope.modalifier.showSetupError();\r\n return;\r\n }\r\n\r\n //store complete card object\r\n $scope.context.templateDetails = data.CardDetails;\r\n\r\n //get selected template and format\r\n $scope.context.template = $filter('filter')($scope.context.templates, {Key: key.toNumber()}, true)[0];\r\n $scope.context.format = $filter('filter')($scope.context.formats, {Key: $scope.context.templateDetails.CardInfos[0].CardFmt_Key}, true)[0];\r\n $scope.context.maxCardNoLength = $scope.context.format.Mask.match(/0/g).length || 20;\r\n\r\n $scope.kendo.addCardsGrid.cancelRow();\r\n var cols = $scope.kendo.columns.clone();\r\n\r\n if ($scope.context.template.PhysicalCard !== -1)\r\n cols.remove({field: 'number'});\r\n\r\n if ($scope.context.template.AllowPIN === -1)\r\n cols.remove({field: 'PIN'});\r\n\r\n if ($scope.context.format.AllowVehicleInfo === -1)\r\n {\r\n cols.remove({field: 'vehicleID'});\r\n cols.remove({field: 'licenseNo'});\r\n cols.remove({field: 'state'});\r\n }\r\n\r\n $scope.kendo.addCardsGrid.setOptions({\r\n columns: cols\r\n });\r\n\r\n addFooterBar();\r\n });\r\n };\r\n\r\n $scope.saveCards = function ()\r\n {\r\n $scope.kendo.addCardsGrid.saveChanges();\r\n\r\n if ($scope.kendo.addCardsGrid.tbody.find(\".k-invalid\").length > 0)\r\n return;\r\n\r\n var cards = $scope.kendo.addCardsGrid.dataSource.data();\r\n\r\n //make sure there is at least one card to save\r\n if (angular.isUndefinedOrNullOrEmpty(cards))\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"NoCardsToSave\"), 'error');\r\n return;\r\n }\r\n\r\n //process each card entry for save\r\n angular.forEach(\r\n cards,\r\n function (item)\r\n {\r\n //create a complete card record from the selected template and push to the DB\r\n var newCard = angular.copy($scope.context.templateDetails.CardInfos[0]);\r\n\r\n newCard.Cust_Key = $scope.appInfo.webUser.CurrentAuthorization.CustKey;\r\n newCard.Description = item.description;\r\n newCard.Number = item.number;\r\n newCard.PIN = item.PIN;\r\n newCard.Expiration_Date = $scope.context.template.SetExpirationDate;\r\n newCard.VehicleID = item.vehicleID;\r\n newCard.Vehicle_License_No = item.licenseNo;\r\n newCard.Vehicle_State_Key = item.state.Key;\r\n newCard.Template = 0;\r\n newCard.Status = newCard.CardFmt_Allow_Pending === '-1' ? '4' : '0';\r\n\r\n FuelCardsService.addCard(\r\n 4,\r\n newCard,\r\n $scope.context.templateDetails.CardCFs[0],\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey).then(\r\n function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (!data.CardNumberValid)\r\n //notify on failure\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"CardNumberUnique\"), 'error');\r\n }\r\n else\r\n {\r\n //remove saved cards\r\n var result = getCard();\r\n var i = cards.indexOf(result);\r\n cards.splice(i, 1);\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ChangesSaved\"), \"success\");\r\n }\r\n }\r\n else\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"RecordNotSaved\"), 'error');\r\n }\r\n });\r\n\r\n //javascript closure to capture index and hold it until the promise returns\r\n /*jshint latedef: false */\r\n var getCard = (function ()\r\n {\r\n var myItem = item;\r\n return function ()\r\n {\r\n return myItem;\r\n };\r\n })();\r\n });\r\n };\r\n\r\n /*jshint latedef: false */\r\n var validateTemplates = function ()\r\n {\r\n for (var i = $scope.context.templates.length - 1; i >= 0; i--)\r\n {\r\n if ($scope.context.templates[i].PhysicalCard === -1 && !($scope.context.templates[i].AutoNoKey === -1 ||\r\n $scope.context.templates[i].AllowPending === -1))\r\n {\r\n $scope.context.templates.splice(i, 1);\r\n }\r\n }\r\n };\r\n\r\n })\r\n .controller(\"locationsCtrl\", function ($scope, FuelCardsService, customerService, validatorSvc, $filter, WebFunctions, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.kendo = {};\r\n $scope.kendo.locationsGrid = {};\r\n $scope.kendo.locationsGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var selectedRows = this.select();\r\n var dataItem = this.dataItem(selectedRows[0]);\r\n $scope.selectLocation(dataItem);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"ID\",\r\n title: localStrings.getLocalizedString(\"ID\"),\r\n width: 100,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Description\",\r\n title: localStrings.getLocalizedString(\"Description\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Address1\",\r\n title: localStrings.getLocalizedString(\"Address\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"City\",\r\n title: localStrings.getLocalizedString(\"City\"),\r\n width: 125,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"County\",\r\n title: localStrings.getLocalizedString(\"County\"),\r\n width: 125,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"State\",\r\n title: localStrings.getLocalizedString(\"StateProvince\"),\r\n width: 90,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"PostalCode\",\r\n title: localStrings.getLocalizedString(\"PostalCode\"),\r\n width: 90,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.locationsGridInit = function ()\r\n {\r\n $scope.kendo.locationsGridDS = new kendo.data.DataSource({\r\n data: $scope.appInfo.fuelCards.locations.results\r\n });\r\n\r\n $scope.kendo.locationsGridDS.read();\r\n $scope.kendo.locationsGrid.dataSource.data($scope.kendo.locationsGridDS.data());\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n $scope.checkForAppliedProfile();\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 40;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsCardsSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData)\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"5\";\r\n if (!$scope.appInfo.fuelCards.states)\r\n {\r\n FuelCardsService.getCardsContext(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey\r\n ).then(\r\n function (data)\r\n {\r\n $scope.appInfo.fuelCards.states = data.States;\r\n }\r\n );\r\n }\r\n $scope.appInfo.fuelCards.locations = {\r\n results: [],\r\n selected: {},\r\n disableCtrls: true,\r\n LocIDFormat: 1,\r\n LocIDLength: 10\r\n };\r\n\r\n $scope.canAddorSave = $scope.checkCurrentUserPermission(WebFunctions.ViewCards) && ($scope.checkCurrentUserPermission(WebFunctions.AddNewCards) ||\r\n $scope.checkCurrentUserPermission(WebFunctions.EditCards));\r\n\r\n validatorSvc.clearValidationScopes();\r\n\r\n if (!$scope.appInfo.fuelCards.states)\r\n {\r\n FuelCardsService.getCardsContext(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey\r\n ).then(\r\n function (data)\r\n {\r\n $scope.appInfo.fuelCards.states = data.States;\r\n $scope.appInfo.fuelCards.states.unshift({Key: 0, Name: ' '});\r\n $scope.pullLocations();\r\n }\r\n );\r\n }\r\n else\r\n $scope.pullLocations();\r\n $scope.predicate = 'ID';\r\n $scope.reverse = false;\r\n };\r\n\r\n $scope.addLocation = function ()\r\n {\r\n $scope.clearLocation();\r\n $scope.appInfo.fuelCards.locations.disableCtrls = false;\r\n };\r\n\r\n $scope.clearLocation = function ()\r\n {\r\n angular.copy(FuelCardsService.blankLocation, $scope.appInfo.fuelCards.locations.selected);\r\n $scope.appInfo.fuelCards.locations.disableCtrls = true;\r\n validatorSvc.clearAllValidations();\r\n };\r\n\r\n $scope.deleteLocation = function (location)\r\n {\r\n var yes = function ()\r\n {\r\n $scope.pushLocation(8, location);\r\n };\r\n\r\n $scope.modalifier.confirm(localStrings.getLocalizedString(\"DeleteLocation\"), yes);\r\n };\r\n\r\n $scope.saveLocation = function ()\r\n {\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n if ($scope.appInfo.fuelCards.locations.selected.Key === 0)\r\n {\r\n $scope.appInfo.fuelCards.locations.selected.CustKey = $scope.appInfo.webUser.CurrentAuthorization.CustKey;\r\n $scope.appInfo.fuelCards.locations.selected.Type = 2;\r\n $scope.pushLocation(4, $scope.appInfo.fuelCards.locations.selected);\r\n } else\r\n $scope.pushLocation(16, $scope.appInfo.fuelCards.locations.selected);\r\n };\r\n\r\n $scope.selectLocation = function (location)\r\n {\r\n $scope.clearLocation();\r\n angular.copy(location, $scope.appInfo.fuelCards.locations.selected);\r\n $scope.appInfo.fuelCards.locations.disableCtrls = !$scope.checkCurrentUserPermission(WebFunctions.EditCards);\r\n };\r\n\r\n $scope.pullLocations = function ()\r\n {\r\n customerService.getCustomerLocations($scope.appInfo.webUser.CurrentAuthorization.CustKey, 2)\r\n .then(function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (data.Locations.length > 0)\r\n {\r\n $scope.appInfo.fuelCards.locations.LocIDFormat = data.LocIDFormat || 0;\r\n $scope.appInfo.fuelCards.locations.LocIDLength = data.LocIDLength || 10;\r\n $scope.appInfo.fuelCards.locations.results = data.Locations\r\n .each(function (loc, i)\r\n {\r\n var state = $scope.appInfo.fuelCards.states.find({Key: loc.StateKey});\r\n loc.State = state ? state.Code : null;\r\n })\r\n .sortBy('Description');\r\n $scope.selectLocation($scope.appInfo.fuelCards.locations.results[0]);\r\n $scope.kendo.locationsGridInit();\r\n $scope.kendo.locationsGridInit();\r\n }\r\n else\r\n $scope.notifier.show(localStrings.getLocalizedString(\"NoResults\"), 'warning');\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n }\r\n );\r\n\r\n };\r\n\r\n $scope.pushLocation = function (status, location)\r\n {\r\n customerService.saveCustomerLocations(\r\n status,\r\n location,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey\r\n )\r\n .then(function (data)\r\n {\r\n $scope.clearLocation();\r\n $scope.pullLocations();\r\n $scope.resetDirtyFlags($scope.appInfo.fuelCards.locations.locationsForm);\r\n }\r\n );\r\n };\r\n\r\n $scope.updatePhone = function ()\r\n {\r\n $scope.appInfo.fuelCards.locations.selected.Phone = $scope.appInfo.fuelCards.locations.selected.PhoneFormatted.replace(/[^0-9]/g, '');\r\n };\r\n })\r\n .controller(\"departmentsCtrl\", function ($scope, $filter, $timeout, FuelCardsService, validatorSvc, WebFunctions, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.cols = [];\r\n $scope.kendo = {departmentsGridReady: false};\r\n $scope.kendo.departmentsGrid = {};\r\n $scope.kendo.departmentsGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var dataItem = this.dataItem(this.select()[0]);\r\n $scope.selectRow(dataItem.deptKey);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"deptName\",\r\n title: localStrings.getLocalizedString(\"Description\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"cell1Value\",\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"cell2Value\",\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"cell3Value\",\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"cell4Value\",\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"cell5Value\",\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n //height: $(document).height() - 375,\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.departmentsGridInit = function ()\r\n {\r\n $scope.kendo.departmentsGridDS = new kendo.data.DataSource({\r\n data: $scope.tableArray\r\n });\r\n\r\n $scope.kendo.departmentsGridDS.read();\r\n $scope.kendo.departmentsGrid.dataSource.data($scope.kendo.departmentsGridDS.data());\r\n\r\n if ($scope.cols[0])\r\n $(\"#departmentsGrid th[data-field=cell1Value] a\").html($scope.cols[0].FieldName);\r\n else\r\n $scope.kendo.departmentsGrid.hideColumn(1);\r\n\r\n if ($scope.cols[1])\r\n $(\"#departmentsGrid th[data-field=cell2Value] a\").html($scope.cols[1].FieldName);\r\n else\r\n $scope.kendo.departmentsGrid.hideColumn(2);\r\n\r\n if ($scope.cols[2])\r\n $(\"#departmentsGrid th[data-field=cell3Value] a\").html($scope.cols[2].FieldName);\r\n else\r\n $scope.kendo.departmentsGrid.hideColumn(3);\r\n\r\n if ($scope.cols[3])\r\n $(\"#departmentsGrid th[data-field=cell4Value] a\").html($scope.cols[3].FieldName);\r\n else\r\n $scope.kendo.departmentsGrid.hideColumn(4);\r\n\r\n if ($scope.cols[4])\r\n $(\"#departmentsGrid th[data-field=cell5Value] a\").html($scope.cols[4].FieldName);\r\n else\r\n $scope.kendo.departmentsGrid.hideColumn(5);\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 40;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsCardsSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"3\";\r\n $scope.departments = [];\r\n $scope.fields = [];\r\n $scope.values = [];\r\n $scope.selDept = {};\r\n $scope.selVals = [];\r\n $scope.disableControls = true;\r\n\r\n $scope.canAddorSave = $scope.checkCurrentUserPermission(WebFunctions.ViewCards) && ($scope.checkCurrentUserPermission(WebFunctions.AddNewCards) ||\r\n $scope.checkCurrentUserPermission(WebFunctions.EditCards));\r\n\r\n validatorSvc.clearValidationScopes();\r\n $scope.pullDepartments();\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.tableArray))\r\n $scope.selectRow($scope.tableArray[0].deptKey);\r\n };\r\n\r\n $scope.createObjects = function (data)\r\n {\r\n $scope.display = {\r\n hideCol1: true,\r\n hideCol2: true,\r\n hideCol3: true,\r\n hideCol4: true,\r\n hideCol5: true,\r\n disableControls: true\r\n };\r\n\r\n if (data.Successful)\r\n {\r\n $scope.departments = data.Departments || [];\r\n $scope.fields = data.Fields || [];\r\n $scope.values = data.Values || [];\r\n\r\n if ($scope.departments.length === 0 && $scope.fields.length === 0)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"NoResults\"), 'warning');\r\n }\r\n }\r\n else\r\n {\r\n $scope.modalifier.showSetupError();\r\n return;\r\n }\r\n\r\n //(rare) catch any empty field names and give them a default value\r\n angular.forEach($scope.fields, function (item)\r\n {\r\n if (item.Key > 0 && item.FieldName.isBlank())\r\n item.FieldName = localStrings.getLocalizedString(\"DeptField\") + ' ' + item.FieldNumber;\r\n });\r\n\r\n // No depts defined, create empty binding objs\r\n if ($scope.departments.length === 0)\r\n {\r\n $scope.selDept = {\r\n \"CustKey\": $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n \"Description\": \"\",\r\n \"Key\": 0,\r\n \"TimeStamp\": \"\"\r\n };\r\n\r\n // create a blank value obj for any defined fields\r\n angular.forEach($scope.fields, function (field)\r\n {\r\n $scope.selVals.push({\r\n \"CardDptFldKey\": field.Key,\r\n \"CardDptKey\": 0,\r\n \"FieldValue\": \"\",\r\n \"Key\": 0,\r\n \"TimeStamp\": \"\"\r\n });\r\n });\r\n }\r\n else\r\n // depts exist, create any needed empty values for fields not previously defined\r\n {\r\n var temp = {};\r\n angular.forEach($scope.departments, function (dept)\r\n {\r\n angular.forEach($scope.fields, function (field)\r\n {\r\n temp = ($filter('filter')($scope.values, {\r\n CardDptKey: dept.Key,\r\n CardDptFldKey: field.Key\r\n }));\r\n if (temp.length === 0)\r\n {\r\n $scope.values.push({\r\n \"CardDptFldKey\": field.Key,\r\n \"CardDptKey\": dept.Key,\r\n \"FieldValue\": \"\",\r\n \"Key\": 0,\r\n \"TimeStamp\": \"\"\r\n });\r\n }\r\n });\r\n });\r\n }\r\n\r\n if ($scope.departments.length > 0 && $scope.fields.length > 0)\r\n $scope.makeTable();\r\n\r\n if ($scope.departments.length > 0 && $scope.fields.length === 0)\r\n $scope.loadTable();\r\n\r\n if ($scope.departments.length === 0)\r\n $scope.tableArray = [];\r\n\r\n validatorSvc.clearAllValidations();\r\n\r\n $scope.kendo.departmentsGridInit();\r\n };\r\n\r\n $scope.deleteDept = function ()\r\n {\r\n var yes = function ()\r\n {\r\n $scope.pushDepartments(8);\r\n };\r\n\r\n $scope.modalifier.confirm(localStrings.getLocalizedString(\"DeleteDepartment\"), yes);\r\n };\r\n\r\n $scope.pullDepartments = function ()\r\n {\r\n FuelCardsService.getCardsDepartments($scope.appInfo.webUser.CurrentAuthorization.CustKey)\r\n .then(function (data)\r\n {\r\n $scope.createObjects(data);\r\n $scope.resetDirtyFlags($scope.departmentForm);\r\n }\r\n );\r\n };\r\n\r\n $scope.pushDepartments = function (recStatus)\r\n {\r\n if (recStatus !== 8 && !validatorSvc.executeValidations())\r\n return;\r\n\r\n if (angular.isUndefinedOrNullOrEmpty(recStatus))\r\n recStatus = $scope.selDept.Key === 0 ? 4 : 16;\r\n\r\n $scope.selDept.Description = $scope.selDept.newDesc;\r\n\r\n FuelCardsService.saveCardsDepartments(\r\n recStatus,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n [$scope.selDept],\r\n null,\r\n $scope.selVals,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey\r\n )\r\n .then(function (data)\r\n {\r\n $scope.selDept = {};\r\n $scope.selVals = [];\r\n $scope.display.disableControls = true;\r\n $scope.createObjects(data);\r\n $scope.resetDirtyFlags($scope.departmentForm);\r\n }\r\n );\r\n\r\n $scope.selDept = {};\r\n $scope.selVals = [];\r\n $scope.display.disableControls = true;\r\n\r\n };\r\n\r\n $scope.addRow = function ()\r\n {\r\n $scope.display.disableControls = !$scope.canAddorSave;\r\n $scope.selDept = {\r\n CustKey: $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n Description: \"\",\r\n Key: 0,\r\n TimeStamp: ''\r\n };\r\n\r\n $scope.selVals = [];\r\n\r\n angular.forEach($scope.fields, function (item)\r\n {\r\n $scope.selVals.push({\r\n CardDptFldKey: item.Key,\r\n CardDptKey: 0,\r\n FieldValue: '',\r\n Key: 0,\r\n TimeStamp: ''\r\n });\r\n });\r\n\r\n $scope.setFocusOnReady(\"#fc-dept-description\");\r\n };\r\n\r\n $scope.selectRow = function (key)\r\n {\r\n validatorSvc.clearAllValidations();\r\n var dept = $filter('filter')($scope.departments, {Key: key}, true)[0];\r\n $scope.selDept = dept;\r\n $scope.selDept.newDesc = dept.Description;\r\n $scope.selVals = $scope.values.findAll({CardDptKey: dept.Key}).sortBy(function (n)\r\n {\r\n return $scope.fields.find({Key: n.CardDptFldKey}).FieldNumber;\r\n });\r\n $scope.display.disableControls = !$scope.canAddorSave;\r\n\r\n $scope.setFocusOnReady(\"#fc-dept-description\");\r\n };\r\n\r\n $scope.makeTable = function ()\r\n {\r\n $scope.tableArray = [];\r\n\r\n //get columns into the righ torder\r\n $scope.cols = $filter('orderBy')($scope.fields, 'FieldNumber');\r\n\r\n angular.forEach($scope.departments, function (dept)\r\n {\r\n var row = {};\r\n row.deptKey = dept.Key;\r\n row.deptName = dept.Description;\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.cols[0]))\r\n {\r\n var cell1 = $filter('filter')($scope.values, {\r\n CardDptKey: dept.Key,\r\n CardDptFldKey: $scope.cols[0].Key\r\n })[0];\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty(cell1))\r\n {\r\n row.cell1Key = cell1.Key;\r\n row.cell1Value = cell1.FieldValue;\r\n $scope.display.hideCol1 = false;\r\n }\r\n }\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.cols[1]))\r\n {\r\n var cell2 = $filter('filter')($scope.values, {\r\n CardDptKey: dept.Key,\r\n CardDptFldKey: $scope.cols[1].Key\r\n })[0];\r\n if (!angular.isUndefinedOrNullOrEmpty(cell2))\r\n {\r\n row.cell2Key = cell2.Key;\r\n row.cell2Value = cell2.FieldValue;\r\n $scope.display.hideCol2 = false;\r\n }\r\n }\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.cols[2]))\r\n {\r\n var cell3 = $filter('filter')($scope.values, {\r\n CardDptKey: dept.Key,\r\n CardDptFldKey: $scope.cols[2].Key\r\n })[0];\r\n if (!angular.isUndefinedOrNullOrEmpty(cell3))\r\n {\r\n row.cell3Key = cell3.Key;\r\n row.cell3Value = cell3.FieldValue;\r\n $scope.display.hideCol3 = false;\r\n }\r\n }\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.cols[3]))\r\n {\r\n var cell4 = $filter('filter')($scope.values, {\r\n CardDptKey: dept.Key,\r\n CardDptFldKey: $scope.cols[3].Key\r\n })[0];\r\n if (!angular.isUndefinedOrNullOrEmpty(cell4))\r\n {\r\n row.cell4Key = cell4.Key;\r\n row.cell4Value = cell4.FieldValue;\r\n $scope.display.hideCol4 = false;\r\n }\r\n }\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.cols[4]))\r\n {\r\n var cell5 = $filter('filter')($scope.values, {\r\n CardDptKey: dept.Key,\r\n CardDptFldKey: $scope.cols[4].Key\r\n })[0];\r\n if (!angular.isUndefinedOrNullOrEmpty(cell5))\r\n {\r\n row.cell5Key = cell5.Key;\r\n row.cell5Value = cell5.FieldValue;\r\n $scope.display.hideCol5 = false;\r\n }\r\n }\r\n\r\n $scope.tableArray.push(row);\r\n });\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.tableArray))\r\n $scope.tableArray = $filter('orderBy')($scope.tableArray, 'department');\r\n };\r\n\r\n $scope.loadTable = function ()\r\n {\r\n $scope.tableArray = [];\r\n angular.forEach($scope.departments, function (dept)\r\n {\r\n $scope.tableArray.push({deptKey: dept.Key, deptName: dept.Description});\r\n });\r\n };\r\n })\r\n .controller(\"departmentSetupCtrl\", function ($scope, FuelCardsService, validatorSvc, $filter, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n\r\n $scope.initialize = function ()\r\n {\r\n\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 40;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsCardsSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"4\";\r\n\r\n $scope.formDisabled = $scope.checkCurrentUserPermission(WebFunctions.ViewCards) && !($scope.checkCurrentUserPermission(WebFunctions.AddNewCards) ||\r\n $scope.checkCurrentUserPermission(WebFunctions.EditCards));\r\n validatorSvc.clearValidationScopes();\r\n $scope.pullFields();\r\n };\r\n\r\n $scope.setFields = function ()\r\n {\r\n validatorSvc.clearAllValidations();\r\n $scope.fields = [{}, {}, {}, {}, {}];\r\n for (var index = 0; index < 5; ++index)\r\n {\r\n var match = $filter('filter')($scope.results, {FieldNumber: index + 1})[0];\r\n if (angular.isUndefinedOrNullOrEmpty(match))\r\n {\r\n $scope.fields[index] = {\r\n \"CustKey\": $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n \"FieldName\": \"\",\r\n \"FieldNumber\": index + 1,\r\n \"Key\": 0,\r\n \"TimeStamp\": \"\"\r\n };\r\n }\r\n else\r\n {\r\n $scope.fields[index] = match;\r\n }\r\n }\r\n\r\n $scope.setFocusOnReady(\"#fc-deptSU-content input:first\");\r\n };\r\n\r\n $scope.clickCancel = function ()\r\n {\r\n $scope.setFields();\r\n };\r\n\r\n $scope.clickSave = function ()\r\n {\r\n //fire off validations\r\n if (!validatorSvc.executeValidations())\r\n return;\r\n\r\n //remove any empty records\r\n for (var i = $scope.fields.length - 1; i >= 0; i--)\r\n {\r\n if ($scope.fields[i].Key === 0 && $scope.fields[i].FieldName === '')\r\n $scope.fields.splice(i, 1);\r\n }\r\n\r\n //save the fields\r\n $scope.pushFields();\r\n };\r\n\r\n $scope.pullFields = function ()\r\n {\r\n FuelCardsService.getCardsDepartments($scope.appInfo.webUser.CurrentAuthorization.CustKey)\r\n .then(function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n $scope.results = data.Fields || [];\r\n }\r\n else\r\n {\r\n $scope.modalifier.showSetupError();\r\n $scope.results = [];\r\n }\r\n $scope.setFields();\r\n }\r\n );\r\n\r\n };\r\n\r\n $scope.pushFields = function ()\r\n {\r\n FuelCardsService.saveCardsDepartments(\r\n 5,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n null,\r\n $scope.fields,\r\n null,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey\r\n )\r\n .then(function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (data.Successful)\r\n {\r\n $scope.results = data.Fields || [];\r\n $scope.resetDirtyFlags($scope.deptSetupForm);\r\n }\r\n else\r\n {\r\n $scope.results = [];\r\n }\r\n $scope.setFields();\r\n }\r\n }\r\n );\r\n };\r\n });","/**\r\n * Created by jvitoria on 9/5/14.\r\n */\r\nangular.module(\"pnFuelCardsPrices\", ['core.objects'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider\r\n .when(\"/FuelCards/Prices/LookupPrices\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"LookupPrices\"),\r\n controller: \"pricesLookupCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"FuelCardsPricesLocalization\");\r\n }\r\n }\r\n })\r\n .when(\"/FuelCards/Prices/PriceNoticeSettings\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"PriceNoticeSettings\"),\r\n controller: \"priceNoticeSettingsCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"FuelCardsPricesLocalization\");\r\n }\r\n }\r\n });\r\n })\r\n\r\n .controller('fuelCardsPricesSideMenuCtrl', function ($scope)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.locationInfo.sideMenuData)\r\n $scope.locationInfo.sideMenuData = {};\r\n };\r\n })\r\n\r\n .controller(\"pricesLookupCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CPPriceNotices))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 42;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsPricesSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData)\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"0\";\r\n };\r\n })\r\n\r\n .controller(\"pricesLookupSideMenuCtrl\", function ($scope, $filter, FuelCardsService, reportingService, localizationSvc, $timeout)\r\n {\r\n 'use strict';\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"FuelCardsPricesLocalization\");\r\n $scope.initialize = function ()\r\n {\r\n\r\n // instantiate variables\r\n if (!$scope.locationInfo.sideMenuData)\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.lookupPrices = {\r\n reportType: 'PricesLookup',\r\n site: 0,\r\n product: 0,\r\n groupBy: 4\r\n };\r\n $scope.context = {\r\n sites: [{ CustContCPSite_Site_Key: 0, Site_Description: localStrings.getLocalizedString(\"Any\") }],\r\n products: [{ ProdAliasGrp_Key: 0, ProdAliasGrp_Description: localStrings.getLocalizedString(\"Any\") }],\r\n maxCPDays: 7\r\n };\r\n\r\n //set save / load settings parameter\r\n $scope.$root.reportSettings.reportKey = 30;\r\n\r\n //get context data for drop-downs\r\n FuelCardsService.getPriceNoticesSettings(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.Customer.CPPrcNtcRuleKey).then(\r\n function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (data.PriceNoticesSettingsSites.length > 0)\r\n {\r\n $scope.context.sites = $scope.context.sites.concat($filter('filter')(data.PriceNoticesSettingsSites, {Site_Selected: '-1'}));\r\n $scope.context.sites = $filter('orderBy')($scope.context.sites, 'Site_Description');\r\n }\r\n else\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"NoSitesConfigured\"), 'warning');\r\n }\r\n\r\n if (data.PriceNoticesSettingsGroups.length > 0)\r\n {\r\n //pull All Products record from the array and handle separately\r\n data.PriceNoticesSettingsGroups.splice(0, 1);\r\n\r\n $scope.context.products = $scope.context.products.concat($filter('filter')(data.PriceNoticesSettingsGroups, {ProdAliasGrp_Selected: '-1'}));\r\n $scope.context.products = $filter('orderBy')($scope.context.products, 'ProdAliasGrp_Description');\r\n }\r\n else\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"NoProductsConfigured\"), 'warning');\r\n }\r\n\r\n $scope.context.maxCPDays = data.CPPriceRuleMaxDays;\r\n }\r\n else\r\n $scope.notifier.show(localStrings.getLocalizedString(\"FailedLoadContextualData\"), 'error');\r\n }\r\n );\r\n\r\n //Override default date selector options\r\n $scope.dateSelector.selection = 13;\r\n $scope.dateSelector.maxNumOfDays = $scope.context.maxCPDays || 7;\r\n $scope.dateSelector.overrideDefaults = true;\r\n $timeout(function () {\r\n $scope.dateSelector.options = [\r\n { name: localStrings.getLocalizedString(\"AllDays\"), value: 13 },\r\n { name: localStrings.getLocalizedString(\"Today\"), value: 0 },\r\n { name: localStrings.getLocalizedString(\"Yesterday\"), value: 1 },\r\n { name: localStrings.getLocalizedString(\"Tomorrow\"), value: 2 },\r\n { name: localStrings.getLocalizedString(\"LastSevenDays\"), value: 9 },\r\n { name: localStrings.getLocalizedString(\"SelectDays\"), value: 12 }];\r\n }, 0);\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.lookupPrices = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.lookupPrices;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n // Notify the user their date selection exceeds the configured limit\r\n var maxCPDays = [$scope.context.maxCPDays];\r\n if ((Date.parse($scope.dateSelector.endDate) - Date.parse($scope.dateSelector.startDate)) > ($scope.context.maxCPDays * 86400000))\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"PricingLimitedTo\", maxCPDays), 'warning');\r\n $scope.dateSelector.numOfDays = $scope.context.maxCPDays;\r\n }\r\n\r\n var qs = \"reportName=\" + 'CPPriceNotices' +\r\n \"&RP-CustContKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustContKey +\r\n \"&RP-FromDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-ThruDate=\" + $scope.dateSelector.endDate +\r\n \"&RP-SiteKey=\" + $scope.locationInfo.sideMenuData.lookupPrices.site +\r\n \"&RP-ProductKey=\" + $scope.locationInfo.sideMenuData.lookupPrices.product +\r\n \"&RP-GroupBy=\" + $scope.locationInfo.sideMenuData.lookupPrices.groupBy;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n\r\n .controller(\"priceNoticeSettingsCtrl\", function ($scope, FuelCardsService, WebFunctions, $filter, templates, localStrings)\r\n {\r\n 'use strict';\r\n $scope.kendo = {};\r\n $scope.kendo.productsGrid = {};\r\n $scope.kendo.productsGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"ProdAliasGrp_Selected\",\r\n title: localStrings.getLocalizedString(\"Select\"),\r\n width: 70,\r\n attributes: {class: \"alignCenter\"},\r\n filterable: false,\r\n template: \"\"\r\n },\r\n {\r\n field: \"ProdAliasGrp_Description\",\r\n title: localStrings.getLocalizedString(\"Product\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n }\r\n ],\r\n dataSource: [],\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n $scope.kendo.sitesGrid = {};\r\n $scope.kendo.sitesGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"Site_Description\",\r\n title: localStrings.getLocalizedString(\"SiteDescription\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Site_Address1\",\r\n title: localStrings.getLocalizedString(\"Address\"),\r\n width: 150,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Site_City\",\r\n title: localStrings.getLocalizedString(\"City\"),\r\n width: 150,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"State_Code\",\r\n title: localStrings.getLocalizedString(\"State\"),\r\n width: 60,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Site_Zip\",\r\n title: localStrings.getLocalizedString(\"Zip\"),\r\n width: 60,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: [],\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n $scope.kendo.siteSearchGrid = {};\r\n $scope.kendo.siteSearchGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"ProdAliasGrp_Selected\",\r\n title: localStrings.getLocalizedString(\"Select\"),\r\n width: 70,\r\n attributes: {class: \"alignCenter\"},\r\n filterable: false,\r\n template: \"\"\r\n },\r\n {\r\n field: \"Site_Description\",\r\n title: localStrings.getLocalizedString(\"Description\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Site_Address1\",\r\n title: localStrings.getLocalizedString(\"Address\"),\r\n width: 150,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Site_City\",\r\n title: localStrings.getLocalizedString(\"City\"),\r\n width: 150,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"State_Code\",\r\n title: localStrings.getLocalizedString(\"State\"),\r\n width: 60,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Site_Zip\",\r\n title: localStrings.getLocalizedString(\"Zip\"),\r\n width: 60,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: true,\r\n selectable: \"row\",\r\n sortable: true,\r\n height:250 \r\n };\r\n\r\n $scope.kendo.siteSearchGridInit = function (ds)\r\n {\r\n $scope.kendo.siteSearchGridDS = new kendo.data.DataSource({\r\n data: ds\r\n });\r\n\r\n $scope.kendo.siteSearchGridDS.read();\r\n $scope.kendo.siteSearchGrid.dataSource.data($scope.kendo.siteSearchGridDS.data());\r\n };\r\n\r\n $scope.kendo.sitesGridInit = function (ds)\r\n {\r\n $scope.kendo.sitesGridDS = new kendo.data.DataSource({\r\n data: ds,\r\n schema: {\r\n model: {\r\n fields: {\r\n Site_Description: {\r\n editable: false\r\n },\r\n Site_Address1: {\r\n editable: false\r\n },\r\n Site_City: {\r\n editable: false\r\n },\r\n State_Code: {\r\n editable: false\r\n },\r\n Site_Zip: {\r\n editable: false\r\n },\r\n Site_Selected: {\r\n editable: false\r\n }\r\n }\r\n }\r\n },\r\n //filter: [\r\n // {field: \"Site_Selected\", operator: \"eq\", value: \"'-1'\"}\r\n //],\r\n batch: true\r\n });\r\n\r\n $scope.kendo.sitesGridDS.read();\r\n $scope.kendo.sitesGrid.dataSource.data($scope.kendo.sitesGridDS.data());\r\n };\r\n\r\n $scope.kendo.productsGridInit = function (ds)\r\n {\r\n $scope.kendo.productsGridDS = new kendo.data.DataSource({\r\n data: ds,\r\n schema: {\r\n model: {\r\n fields: {\r\n ProdAliasGrp_Selected: {\r\n editable: false\r\n },\r\n ProdAliasGrp_Description: {\r\n editable: false\r\n }\r\n }\r\n }\r\n },\r\n batch: true\r\n });\r\n\r\n $scope.kendo.productsGridDS.read();\r\n $scope.kendo.productsGrid.dataSource.data($scope.kendo.productsGridDS.data());\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CPPriceNotices))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 42;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsPricesSideMenu\");\r\n if (!$scope.locationInfo.sideMenuData)\r\n $scope.locationInfo.sideMenuData = {};\r\n $scope.locationInfo.sideMenuData.subMenu = \"1\";\r\n $scope.getWebProfileMessage(5);\r\n $scope.initPriceNoticesSettings();\r\n $scope.initModalSiteSelector();\r\n };\r\n\r\n $scope.initPriceNoticesSettings = function ()\r\n {\r\n $scope.appInfo.fuelCards.priceNoticesSettings = {};\r\n $scope.appInfo.fuelCards.priceNoticesSettings.methods = {};\r\n $scope.appInfo.fuelCards.priceNoticesSettings.allProducts = {\r\n CustContCPProd_Key: -1,\r\n CustContCPProd_CustCont_Key: null,\r\n ProdAliasGrp_Key: -1,\r\n ProdAliasGrp_ID: \"All\",\r\n ProdAliasGrp_Description: localStrings.getLocalizedString(\"AllProducts\"),\r\n ProdAliasGrp_Selected: \"0\",\r\n ts: null\r\n };\r\n $scope.refreshPriceNoticesSettings();\r\n };\r\n\r\n $scope.refreshPriceNoticesSettings = function ()\r\n {\r\n\r\n FuelCardsService.getPriceNoticesSettings(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey\r\n ).then\r\n (\r\n function (data)\r\n {\r\n //pull All Products record from the array and handle separately\r\n if (data.PriceNoticesSettingsGroups.length > 0)\r\n $scope.appInfo.fuelCards.priceNoticesSettings.allProducts = data.PriceNoticesSettingsGroups.splice(0, 1)[0] || [];\r\n\r\n $scope.kendo.sitesGridInit(data.PriceNoticesSettingsSites.sortBy('Site_Description'));\r\n $scope.kendo.productsGridInit(data.PriceNoticesSettingsGroups.sortBy('ProdAliasGrp_Description'));\r\n $scope.appInfo.fuelCards.priceNoticesSettings.methods = data.PriceNoticesSettingsMethods;\r\n\r\n $scope.kendo.sitesGrid.dataItems().forEach(function (item)\r\n {\r\n if (item.Site_Selected === '0')\r\n {\r\n $(\"tr[data-uid='\" + item.uid + \"']\").hide();\r\n }\r\n });\r\n }\r\n );\r\n\r\n if (!$scope.appInfo.fuelCards.company)\r\n {\r\n FuelCardsService.getCardsContext(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CompKey\r\n ).then(\r\n function (data)\r\n {\r\n $scope.appInfo.fuelCards.states = data.States;\r\n $scope.appInfo.fuelCards.company = data.Company;\r\n }\r\n );\r\n }\r\n };\r\n\r\n $scope.initModalSiteSelector = function ()\r\n {\r\n $scope.appInfo.fuelCards.modalSiteSelector = {};\r\n $scope.appInfo.fuelCards.modalSiteSelector.shown = false;\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch = {};\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch.city = null;\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch.state = '';\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch.postal = null;\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch.limit = false;\r\n $scope.appInfo.fuelCards.modalSiteSelector.toManyResults = false;\r\n $scope.appInfo.fuelCards.modalSiteSelector.maxResults = 100;\r\n };\r\n\r\n $scope.showModalSiteSelector = function ()\r\n {\r\n $scope.initModalSiteSelector();\r\n $scope.appInfo.fuelCards.modalSiteSelector.shown = true;\r\n };\r\n\r\n $scope.retrieveSites = function ()\r\n {\r\n FuelCardsService.getSearchSites(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch.city,\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch.state,\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch.postal,\r\n $scope.appInfo.fuelCards.modalSiteSelector.siteSearch.limit\r\n ).then\r\n (\r\n function (data)\r\n {\r\n $scope.kendo.siteSearchGridInit(data.SearchSites.sortBy('Site_Description'));\r\n\r\n if (data.SearchSites.length === 0)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"NoResults\"), 'warning');\r\n return;\r\n }\r\n\r\n \r\n if ($scope.kendo.siteSearchGridDS.data().length > $scope.appInfo.fuelCards.modalSiteSelector.maxResults)\r\n $scope.appInfo.fuelCards.modalSiteSelector.toManyResults = true;\r\n else\r\n $scope.appInfo.fuelCards.modalSiteSelector.toManyResults = false;\r\n }\r\n );\r\n };\r\n\r\n $scope.checkAllProducts = function ()\r\n {\r\n angular.forEach($scope.kendo.productsGridDS.data(), function (item)\r\n {\r\n item.ProdAliasGrp_Selected = $scope.appInfo.fuelCards.priceNoticesSettings.allProducts.ProdAliasGrp_Selected || '0';\r\n });\r\n };\r\n\r\n $scope.disableNotices = function ()\r\n {\r\n angular.forEach($scope.appInfo.fuelCards.priceNoticesSettings.methods, function (item)\r\n {\r\n item.EmailSelected = '0';\r\n item.AltEmailSelected = '0';\r\n item.PhoneTextSelected = '0';\r\n });\r\n };\r\n\r\n $scope.addSites = function ()\r\n {\r\n angular.forEach($scope.kendo.siteSearchGridDS.data(), function (site)\r\n {\r\n if (site.CustContCPSite_Key === 0 && site.Site_Selected === '-1')\r\n {\r\n $scope.kendo.sitesGridDS.add(site);\r\n }\r\n });\r\n $scope.initModalSiteSelector();\r\n };\r\n\r\n $scope.removeSite = function (row)\r\n {\r\n row.Site_Selected = '0';\r\n $(\"tr[data-uid='\" + row.uid + \"']\").hide();\r\n };\r\n\r\n $scope.savePriceNoticeSettings = function ()\r\n {\r\n var products = $scope.kendo.productsGridDS.data().toJSON();\r\n var sites = $scope.kendo.sitesGridDS.data().toJSON();\r\n var hasProducts = products.any({ProdAliasGrp_Selected: '-1'});\r\n var hasSites = sites.any({Site_Selected: '-1'});\r\n if (!hasProducts || !hasSites)\r\n {\r\n $scope.modalifier.show(localStrings.getLocalizedString(\"PriceNoticeSettings\"), localStrings.getLocalizedString(\"AtLeastOneProduct\"));\r\n return;\r\n }\r\n\r\n //put All Products back in its array for save\r\n products.unshift($scope.appInfo.fuelCards.priceNoticesSettings.allProducts);\r\n\r\n FuelCardsService.savePriceNoticeSettings(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n sites,\r\n products,\r\n $scope.appInfo.fuelCards.priceNoticesSettings.methods\r\n ).then\r\n (\r\n function (data)\r\n {\r\n $scope.initialize();\r\n }\r\n );\r\n };\r\n })\r\n;","/**\r\n * Created by jvitoria on 9/5/14.\r\n */\r\nangular.module(\"pnFuelCardsTransactions\", ['core.objects'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider\r\n .when(\"/FuelCards/Transactions/TransactionDetails\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TransactionDetails\"),\r\n controller: \"transactionDetailsCtrl\"\r\n })\r\n .when(\"/FuelCards/Transactions/TransactionSummary\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TransactionSummary\"),\r\n controller: \"transactionSummaryCtrl\"\r\n })\r\n .when(\"/FuelCards/Transactions/TransactionByInvoice\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TransactionByInvoice\"),\r\n controller: \"transactionByInvoiceCtrl\"\r\n })\r\n .when(\"/FuelCards/Transactions/TransactionTaxRecap\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TransactionTaxRecap\"),\r\n controller: \"transactionTaxRecapCtrl\"\r\n })\r\n .when(\"/FuelCards/Transactions/TaxDetails\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TaxDetails\"),\r\n controller: \"taxDetailsCtrl\"\r\n })\r\n .when(\"/FuelCards/Transactions/TaxSummary\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TaxSummary\"),\r\n controller: \"taxSummaryCtrl\"\r\n })\r\n .when(\"/FuelCards/Transactions/TransactionAlerts\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"TransactionAlerts\"),\r\n controller: \"transactionsAlertsCtrl\"\r\n });\r\n })\r\n\r\n .controller('fuelCardsTransactionsSideMenuCtrl', function ($scope)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.locationInfo.sideMenuData)\r\n $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.appInfo.fuelCards)\r\n $scope.appInfo.fuelCards = {};\r\n if (!$scope.appInfo.fuelCards)\r\n $scope.appInfo.fuelCards.transactionAlerts = {};\r\n };\r\n })\r\n\r\n .controller(\"transactionDetailsCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CardTransactions))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 41;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsTransactionsSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"0\";\r\n };\r\n })\r\n\r\n .controller(\"transactionDetailsSideMenuCtrl\", function ($scope, validatorSvc, reportingService, WebFunctions)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n $scope.$root.reportSettings.reportKey = 22;\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"0\",\r\n transactionDetails: {\r\n cardNoDesc: '',\r\n inclUnbilled: true,\r\n inclBilled: false,\r\n groupBy: \"0\",\r\n inclAdditionalInfo: false,\r\n viewCardNumbers: $scope.checkCurrentUserPermission(WebFunctions.ViewCardNumbers) || false\r\n }\r\n };\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.transactionDetails = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.transactionDetails;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var rptName = 'CardTransactionDetails';\r\n var additionalInfoReportName = $scope.appInfo.webUser.CurrentAuthorization.Customer.CPInvcRecapSumTaxesByInvcGrp ? 'CardTransactionDetailsByTaxInvGroups' : 'CardTransactionDetailsIAD';\r\n rptName = $scope.locationInfo.sideMenuData.transactionDetails.inclAdditionalInfo ? additionalInfoReportName : rptName;\r\n\r\n var qs = \"reportName=\" + rptName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-CardNoDesc=\" + $scope.locationInfo.sideMenuData.transactionDetails.cardNoDesc +\r\n \"&RP-BegDate=\" + $scope.urlFormatDate($scope.dateSelector.startDate) +\r\n \"&RP-EndDate=\" + $scope.urlFormatDate($scope.dateSelector.endDate) +\r\n \"&RP-InclBilled=\" + $scope.locationInfo.sideMenuData.transactionDetails.inclBilled +\r\n \"&RP-InclUnbilled=\" + $scope.locationInfo.sideMenuData.transactionDetails.inclUnbilled +\r\n \"&RP-GroupBy=\" + $scope.locationInfo.sideMenuData.transactionDetails.groupBy +\r\n \"&RP-ViewCardNumbers=\" + $scope.locationInfo.sideMenuData.transactionDetails.viewCardNumbers;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n\r\n $scope.updateOptions = function ()\r\n {\r\n if ($scope.locationInfo.sideMenuData.transactionDetails.inclUnbilled === false && $scope.locationInfo.sideMenuData.transactionDetails.inclBilled === false)\r\n {\r\n $scope.locationInfo.sideMenuData.transactionDetails.inclUnbilled = true;\r\n }\r\n };\r\n })\r\n\r\n .controller(\"transactionSummaryCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CardTransactions))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 41;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsTransactionsSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"1\";\r\n };\r\n })\r\n\r\n .controller(\"transactionSummarySideMenuCtrl\", function ($scope, validatorSvc, reportingService, WebFunctions)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n $scope.$root.reportSettings.reportKey = 23;\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"1\",\r\n transactionSummary: {\r\n cardNoDesc: '',\r\n invoiceNo: '',\r\n inclUnbilled: true,\r\n enableUnbilled: true,\r\n inclBilled: true,\r\n enableBilled: true,\r\n recap1: 4,\r\n recap2: 0\r\n }\r\n };\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.transactionSummary = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n $scope.updateOptions();\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.transactionSummary;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var qs = \"reportName=\" + 'CardTransactionSummary' +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-CardNoDesc=\" + $scope.locationInfo.sideMenuData.transactionSummary.cardNoDesc +\r\n \"&RP-InvoiceNo=\" + $scope.locationInfo.sideMenuData.transactionSummary.invoiceNo +\r\n \"&RP-BegDate=\" + $scope.urlFormatDate($scope.dateSelector.startDate) +\r\n \"&RP-EndDate=\" + $scope.urlFormatDate($scope.dateSelector.endDate) +\r\n \"&RP-InclBilled=\" + $scope.locationInfo.sideMenuData.transactionSummary.inclBilled +\r\n \"&RP-InclUnbilled=\" + $scope.locationInfo.sideMenuData.transactionSummary.inclUnbilled +\r\n \"&RP-Recap1=\" + $scope.locationInfo.sideMenuData.transactionSummary.recap1 +\r\n \"&RP-Recap2=\" + $scope.locationInfo.sideMenuData.transactionSummary.recap2 +\r\n \"&RP-ViewCardNumbers=\" + $scope.checkCurrentUserPermission(WebFunctions.ViewCardNumbers) || false;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n\r\n $scope.updateOptions = function ()\r\n {\r\n if ($scope.locationInfo.sideMenuData.transactionSummary.invoiceNo === '')\r\n {\r\n $scope.locationInfo.sideMenuData.transactionSummary.enableUnbilled = true;\r\n $scope.locationInfo.sideMenuData.transactionSummary.enableBilled = true;\r\n }\r\n else\r\n {\r\n $scope.locationInfo.sideMenuData.transactionSummary.inclUnbilled = false;\r\n $scope.locationInfo.sideMenuData.transactionSummary.inclBilled = true;\r\n $scope.locationInfo.sideMenuData.transactionSummary.enableUnbilled = false;\r\n $scope.locationInfo.sideMenuData.transactionSummary.enableBilled = false;\r\n }\r\n\r\n if ($scope.locationInfo.sideMenuData.transactionSummary.inclUnbilled === false && $scope.locationInfo.sideMenuData.transactionSummary.inclBilled === false)\r\n {\r\n $scope.locationInfo.sideMenuData.transactionSummary.inclUnbilled = true;\r\n }\r\n };\r\n })\r\n\r\n .controller(\"transactionByInvoiceCtrl\", function ($scope, validatorSvc, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n validatorSvc.clearValidationScopes();\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CardTransactions))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 41;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsTransactionsSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"2\";\r\n };\r\n })\r\n\r\n .controller(\"transactionByInvoiceSideMenuCtrl\", function ($scope, reportingService, WebFunctions, validatorSvc)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n $scope.$root.reportSettings.reportKey = 24;\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"2\",\r\n transactionByInvoice: {\r\n invoiceNo: '',\r\n groupBy: 0,\r\n inclAdditionalInfo: false\r\n }\r\n };\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.transactionByInvoice = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.transactionByInvoice;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var rptName = 'CardTransactionsByInvoice';\r\n var additionalInfoReportName = $scope.appInfo.webUser.CurrentAuthorization.Customer.CPInvcRecapSumTaxesByInvcGrp ? 'CardTransactionsByInvoiceWithTaxInvGroups' : 'CardTransactionsByInvoiceIAD';\r\n rptName = $scope.locationInfo.sideMenuData.transactionByInvoice.inclAdditionalInfo ? additionalInfoReportName : rptName;\r\n\r\n var qs = \"reportName=\" + rptName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-InvoiceNo=\" + $scope.locationInfo.sideMenuData.transactionByInvoice.invoiceNo +\r\n \"&RP-BegDate=\" + $scope.urlFormatDate($scope.dateSelector.startDate) +\r\n \"&RP-EndDate=\" + $scope.urlFormatDate($scope.dateSelector.endDate) +\r\n \"&RP-GroupBy=\" + $scope.locationInfo.sideMenuData.transactionByInvoice.groupBy +\r\n \"&RP-ViewCardNumbers=\" + $scope.checkCurrentUserPermission(WebFunctions.ViewCardNumbers) || false;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n\r\n .controller(\"taxDetailsCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CardTransactions))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 41;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsTransactionsSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"3\";\r\n };\r\n })\r\n\r\n .controller(\"taxDetailsSideMenuCtrl\", function ($scope, validatorSvc, reportingService, FuelCardsService, WebFunctions, localizationSvc)\r\n {\r\n 'use strict';\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"FuelCardsTransactionsLocalization\");\r\n $scope.initialize = function ()\r\n {\r\n\r\n validatorSvc.clearValidationScopes();\r\n FuelCardsService.getTaxAuthorities(\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey\r\n ).then(\r\n function (data)\r\n {\r\n $scope.appInfo.fuelCards.taxAuthorities = data.TaxAuthorities;\r\n $scope.appInfo.fuelCards.taxAuthorities.unshift({ Key: 0, Description: localStrings.getLocalizedString(\"None\") });\r\n\r\n $scope.$root.reportSettings.reportKey = 25;\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"3\",\r\n taxDetails: {\r\n invoiceNo: '',\r\n taxAuthKey: '0',\r\n groupBy1: 1,\r\n enableGroupBy1None: true,\r\n groupBy2: 0,\r\n enableGroupBy2: true,\r\n groupBy3: 0,\r\n enableGroupBy3: false,\r\n inclTransDetail: true,\r\n inclAdditionalInfo: false,\r\n enableInclAdditionalInfo: true\r\n }\r\n };\r\n \r\n }\r\n );\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.taxDetails = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n $scope.updateOptions();\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.taxDetails;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var rptName = 'CardTaxDetails';\r\n rptName += $scope.locationInfo.sideMenuData.taxDetails.inclTransDetail ? 'IT' : 'NT';\r\n rptName = $scope.locationInfo.sideMenuData.taxDetails.inclAdditionalInfo ? 'CardTaxDetailsIAD' : rptName;\r\n\r\n var taxAuthKey = $scope.locationInfo.sideMenuData.taxDetails.taxAuthKey ? $scope.locationInfo.sideMenuData.taxDetails.taxAuthKey : '0';\r\n\r\n var qs = \"reportName=\" + rptName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-InvoiceNo=\" + $scope.locationInfo.sideMenuData.taxDetails.invoiceNo +\r\n \"&RP-BegDate=\" + $scope.urlFormatDate($scope.dateSelector.startDate) +\r\n \"&RP-EndDate=\" + $scope.urlFormatDate($scope.dateSelector.endDate) +\r\n \"&RP-TaxAuthKey=\" + taxAuthKey +\r\n \"&RP-GroupBy1=\" + $scope.locationInfo.sideMenuData.taxDetails.groupBy1 +\r\n \"&RP-GroupBy2=\" + $scope.locationInfo.sideMenuData.taxDetails.groupBy2 +\r\n \"&RP-GroupBy3=\" + $scope.locationInfo.sideMenuData.taxDetails.groupBy3;\r\n \r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n\r\n $scope.updateOptions = function ()\r\n {\r\n if ($scope.locationInfo.sideMenuData.taxDetails.inclTransDetail === true)\r\n {\r\n $scope.locationInfo.sideMenuData.taxDetails.enableInclAdditionalInfo = true;\r\n $scope.locationInfo.sideMenuData.taxDetails.enableGroupBy1None = true;\r\n }\r\n else\r\n {\r\n $scope.locationInfo.sideMenuData.taxDetails.enableInclAdditionalInfo = false;\r\n $scope.locationInfo.sideMenuData.taxDetails.inclAdditionalInfo = false;\r\n if ($scope.locationInfo.sideMenuData.taxDetails.groupBy1 === \"0\")\r\n {\r\n $scope.locationInfo.sideMenuData.taxDetails.groupBy1 = \"1\";\r\n $scope.notifier.show(localStrings.getLocalizedString(\"IncludeTransactionDetailsWarning\"), 'warning');\r\n }\r\n $scope.locationInfo.sideMenuData.taxDetails.enableGroupBy1None = false;\r\n }\r\n\r\n if ($scope.locationInfo.sideMenuData.taxDetails.groupBy1 === \"0\")\r\n {\r\n $scope.locationInfo.sideMenuData.taxDetails.groupBy2 = \"0\";\r\n $scope.locationInfo.sideMenuData.taxDetails.enableGroupBy2 = false;\r\n }\r\n else\r\n {\r\n $scope.locationInfo.sideMenuData.taxDetails.enableGroupBy2 = true;\r\n }\r\n\r\n if ($scope.locationInfo.sideMenuData.taxDetails.groupBy2 === \"0\")\r\n {\r\n $scope.locationInfo.sideMenuData.taxDetails.groupBy3 = \"0\";\r\n $scope.locationInfo.sideMenuData.taxDetails.enableGroupBy3 = false;\r\n }\r\n else\r\n {\r\n $scope.locationInfo.sideMenuData.taxDetails.enableGroupBy3 = true;\r\n }\r\n };\r\n })\r\n\r\n .controller(\"taxSummaryCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CardTransactions))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 41;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsTransactionsSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"4\";\r\n };\r\n })\r\n\r\n .controller(\"taxSummarySideMenuCtrl\", function ($scope, validatorSvc, reportingService, WebFunctions)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n $scope.$root.reportSettings.reportKey = 26;\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"4\",\r\n taxSummary: {\r\n invoiceNo: '',\r\n groupBy1: \"1\",\r\n groupBy2: \"0\",\r\n groupBy3: \"0\",\r\n enableGroupBy2: true,\r\n enableGroupBy3: false\r\n }\r\n };\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.taxSummary = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n $scope.updateOptions();\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.taxSummary;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var rptName = 'CardTaxSummary';\r\n rptName = $scope.appInfo.webUser.CurrentAuthorization.Customer.CPInvcRecapSumTaxesByInvcGrp ? 'CardTaxSummaryByTaxInvGroups' : rptName;\r\n\r\n var qs = \"reportName=\" + rptName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-InvoiceNo=\" + $scope.locationInfo.sideMenuData.taxSummary.invoiceNo +\r\n \"&RP-BegDate=\" + $scope.urlFormatDate($scope.dateSelector.startDate) +\r\n \"&RP-EndDate=\" + $scope.urlFormatDate($scope.dateSelector.endDate) +\r\n \"&RP-GroupBy1=\" + $scope.locationInfo.sideMenuData.taxSummary.groupBy1 +\r\n \"&RP-GroupBy2=\" + $scope.locationInfo.sideMenuData.taxSummary.groupBy2 +\r\n \"&RP-GroupBy3=\" + $scope.locationInfo.sideMenuData.taxSummary.groupBy3;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n\r\n $scope.updateOptions = function ()\r\n {\r\n if ($scope.locationInfo.sideMenuData.taxSummary.groupBy1 === \"0\")\r\n {\r\n $scope.locationInfo.sideMenuData.taxSummary.groupBy2 = \"0\";\r\n $scope.locationInfo.sideMenuData.taxSummary.enableGroupBy2 = false;\r\n }\r\n else\r\n {\r\n $scope.locationInfo.sideMenuData.taxSummary.enableGroupBy2 = true;\r\n }\r\n\r\n if ($scope.locationInfo.sideMenuData.taxSummary.groupBy2 === \"0\")\r\n {\r\n $scope.locationInfo.sideMenuData.taxSummary.groupBy3 = \"0\";\r\n $scope.locationInfo.sideMenuData.taxSummary.enableGroupBy3 = false;\r\n }\r\n else\r\n {\r\n $scope.locationInfo.sideMenuData.taxSummary.enableGroupBy3 = true;\r\n }\r\n };\r\n })\r\n\r\n .controller(\"transactionsAlertsCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CardTransactions))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 41;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsTransactionsSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"6\";\r\n };\r\n })\r\n\r\n .controller(\"transactionsAlertsSideMenuCtrl\", function ($scope, validatorSvc, reportingService, WebFunctions)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n if (!$scope.locationInfo.sideMenuData.transactionsAlerts) $scope.locationInfo.sideMenuData.transactionsAlerts = {};\r\n $scope.locationInfo.sideMenuData.transactionsAlerts.reportType = 'fuelCardsTransactionsAlerts';\r\n $scope.locationInfo.sideMenuData.transactionsAlerts.reportCount = '10';\r\n $scope.$root.reportSettings.reportKey = 28;\r\n };\r\n\r\n $scope.refreshTransactionAlerts = function ()\r\n {\r\n $scope.appInfo.fuelCards.transactionAlerts = {};\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.transactionsAlerts = $scope.reportSettings.loadOptions.controls;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.transactionsAlerts;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var qs = \"reportName=CPAlertReportsArchive\" +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-NumberToReturn=\" + $scope.locationInfo.sideMenuData.transactionsAlerts.reportCount;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n })\r\n\r\n .controller(\"transactionTaxRecapCtrl\", function ($scope, WebFunctions, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.CardTransactions))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = 41;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"FuelCardsTransactionsSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"7\";\r\n };\r\n })\r\n\r\n .controller(\"transactionTaxRecapSideMenuCtrl\", function ($scope, validatorSvc, reportingService, WebFunctions)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n $scope.kendo = {};\r\n $scope.$root.reportSettings.reportKey = 34;\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"7\",\r\n transactionTaxRecap: {\r\n cardNoDesc: '',\r\n inclUnbilled: true,\r\n enableUnbilled: true,\r\n inclBilled: true,\r\n enableBilled: true,\r\n groupBy: 0,\r\n recap1: 0,\r\n recap2: 0,\r\n showTaxRecap: false\r\n }\r\n };\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.transactionTaxRecap = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n $scope.updateOptions();\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.transactionTaxRecap;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n var rptName = \r\n $scope.appInfo.webUser.CurrentAuthorization.Customer.CPInvcRecapSumTaxesByInvcGrp ? 'CardTransactionwithTaxRecapsAndTaxInvoiceGroups' : 'CardTransactionwithTaxRecaps';\r\n var qs = \"reportName=\" + rptName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-CardNoDesc=\" + $scope.locationInfo.sideMenuData.transactionTaxRecap.cardNoDesc +\r\n \"&RP-BegDate=\" + $scope.urlFormatDate($scope.dateSelector.startDate) +\r\n \"&RP-EndDate=\" + $scope.urlFormatDate($scope.dateSelector.endDate) +\r\n \"&RP-InclBilled=\" + $scope.locationInfo.sideMenuData.transactionTaxRecap.inclBilled +\r\n \"&RP-InclUnbilled=\" + $scope.locationInfo.sideMenuData.transactionTaxRecap.inclUnbilled +\r\n \"&RP-GroupBy=\" + $scope.locationInfo.sideMenuData.transactionTaxRecap.groupBy +\r\n \"&RP-RecapBy1=\" + $scope.locationInfo.sideMenuData.transactionTaxRecap.recap1 +\r\n \"&RP-RecapBy2=\" + $scope.locationInfo.sideMenuData.transactionTaxRecap.recap2 +\r\n \"&RP-ShowTaxRecapByGroupBy=\" + $scope.locationInfo.sideMenuData.transactionTaxRecap.showTaxRecap;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n };\r\n\r\n $scope.updateOptions = function ()\r\n {\r\n if ($scope.locationInfo.sideMenuData.transactionTaxRecap.inclUnbilled === false && $scope.locationInfo.sideMenuData.transactionTaxRecap.inclBilled === false)\r\n {\r\n $scope.locationInfo.sideMenuData.transactionTaxRecap.inclUnbilled = true;\r\n }\r\n };\r\n });","/**\r\n * Created by rhampton on 7/25/2014.\r\n */\r\nangular.module(\"pnOrders\", ['core.objects', 'services.orders', 'core.directives'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider\r\n .when(\"/Orders/EditOrder/:ordKey?\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"EditOrder\"),\r\n controller: \"editOrderCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"OrdersLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Orders/DisplayOrder/:ordKey?\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"DisplayOrder\"),\r\n controller: \"displayOrderCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"OrdersLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Orders/OpenOrders\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"OpenOrders\"),\r\n controller: \"openOrdersCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"OrdersLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Orders/OrderHistory\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"OrderHistory\"),\r\n controller: \"orderHistoryCtrl\"\r\n }\r\n );\r\n })\r\n .controller(\"ordersSideMenuCtrl\", function ($scope)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n $scope.checkForAppliedProfile();\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 20;\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenuData.canOpenAddOrders = $scope.appInfo.webUser.CurrentAuthorization.CanAddEditWebOrders;\r\n };\r\n })\r\n .controller(\"displayOrderCtrl\", function ($scope, $filter, $route, $routeParams, validatorSvc, WebProfileService, customerService,\r\n userAccountService, ordersService, templates, localStrings, globalizationSvc)\r\n {\r\n 'use strict';\r\n\r\n function hasErrors(errors)\r\n {\r\n var errorsDisplayed = false;\r\n angular.forEach(errors, function (item)\r\n {\r\n $scope.notifier.show(item, 'error');\r\n errorsDisplayed = true;\r\n });\r\n\r\n return errorsDisplayed;\r\n }\r\n\r\n function getOrderContext()\r\n {\r\n // Do not try to load an order if the user info isnt loaded\r\n if (!$scope.appInfo.userLoaded) {\r\n $scope.goTo('Orders/OpenOrders/');\r\n return;\r\n }\r\n\r\n ordersService.getOrdersContext($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data)\r\n {\r\n if (!data.Successful || angular.isUndefinedOrNullOrEmpty(data.WOGSettings))\r\n {\r\n $scope.modalifier.showSetupError();\r\n $scope.displayOrders.show.buttonBar = false;\r\n return;\r\n }\r\n\r\n $scope.displayOrders.context.WOGSettings = data.WOGSettings[0] || [];\r\n $scope.displayOrders.context.PONumber = data.PONumber;\r\n $scope.displayOrders.context.DeliveryDT = data.DeliveryDT;\r\n\r\n setButtonVisiblity();\r\n }\r\n );\r\n }\r\n\r\n function handleCancelOrder()\r\n {\r\n $scope.displayOrders.show.cancelCommentModal = false;\r\n ordersService.saveOrderDetails($scope.displayOrders.orderDetails).then(\r\n function (data)\r\n {\r\n if (hasErrors(data.OrderDetails.Errors))\r\n {\r\n enableButton();\r\n return;\r\n }\r\n\r\n $scope.notifier.show(localStrings.getLocalizedString(\"SavedChanges\"), \"success\");\r\n $scope.goTo('Orders/OpenOrders/');\r\n });\r\n }\r\n\r\n function handlePendingOrder()\r\n {\r\n ordersService.saveOrderDetails($scope.displayOrders.orderDetails).then(\r\n function (data)\r\n {\r\n //notify and drop out on errors\r\n if (angular.isUndefinedOrNullOrEmpty(data.OrderDetails.OrdKey) || data.OrderDetails.OrdKey === 0)\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ChangesNotSaved\"), \"error\");\r\n enableButton();\r\n return;\r\n }\r\n\r\n if (hasErrors(data.OrderDetails.Errors))\r\n {\r\n enableButton();\r\n return;\r\n }\r\n\r\n //notify and handle success\r\n $scope.notifier.show(localStrings.getLocalizedString(\"SavedChanges\"), \"success\");\r\n $scope.goTo('Orders/EditOrder/' + data.OrderDetails.OrdKey);\r\n });\r\n }\r\n\r\n function handleReOpenOrder()\r\n {\r\n var yes = function ()\r\n {\r\n ordersService.saveOrderDetails($scope.displayOrders.orderDetails).then(\r\n function (data)\r\n {\r\n if (hasErrors(data.OrderDetails.Errors))\r\n {\r\n enableButton();\r\n return;\r\n }\r\n\r\n $scope.goTo('Orders/EditOrder/' + data.OrderDetails.OrdKey);\r\n });\r\n };\r\n\r\n var no = function () {\r\n enableButton();\r\n };\r\n\r\n $scope.modalifier.confirm(localStrings.getLocalizedString(\"IfYouReopenOrder\") + '
    ' + localStrings.getLocalizedString(\"MayNoLonger\") + '

    ' + localStrings.getLocalizedString(\"WishToContinue\"), yes, no);\r\n }\r\n\r\n function handleSubmitOrder()\r\n {\r\n ordersService.saveOrderDetails($scope.displayOrders.orderDetails).then(\r\n function (data)\r\n {\r\n if (hasErrors(data.OrderDetails.Errors))\r\n {\r\n enableButton();\r\n return;\r\n }\r\n\r\n //notify and handle success\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ChangesBeenSubmitted\"), \"success\");\r\n $route.reload();\r\n });\r\n }\r\n\r\n function enableButton() {\r\n $('#displayOrderReOpen').removeAttr('disabled');\r\n $('#displayOrderSubmit').removeAttr('disabled');\r\n $('#displayOrderCancel').removeAttr('disabled');\r\n $('#displayOrderCancelComment').removeAttr('disabled');\r\n }\r\n\r\n function setButtonVisiblity()\r\n {\r\n // show buttons based ont he order status\r\n switch ($scope.displayOrders.orderDetails.OrdStatusKey)\r\n {\r\n case 16:\r\n $scope.displayOrders.show.reopenBtn = false;\r\n $scope.displayOrders.show.submitBtn = submitOnHold();\r\n $scope.displayOrders.show.cancelBtn = true;\r\n break;\r\n\r\n case 0:\r\n case 1:\r\n $scope.displayOrders.show.reopenBtn = true;\r\n $scope.displayOrders.show.submitBtn = false;\r\n $scope.displayOrders.show.cancelBtn = true;\r\n break;\r\n\r\n case 10:\r\n $scope.displayOrders.show.reopenBtn = false;\r\n $scope.displayOrders.show.submitBtn = false;\r\n $scope.displayOrders.show.cancelBtn = true;\r\n break;\r\n\r\n default:\r\n $scope.displayOrders.show.reopenBtn = false;\r\n $scope.displayOrders.show.submitBtn = false;\r\n $scope.displayOrders.show.cancelBtn = false;\r\n break;\r\n }\r\n }\r\n\r\n function submitOnHold()\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty($scope.displayOrders.context.WOGSettings))\r\n return false;\r\n else\r\n return $scope.displayOrders.context.WOGSettings.SubmitOnHold || $scope.displayOrders.context.WOGSettings.CrStatus !== 1;\r\n }\r\n\r\n $scope.initialize = function ()\r\n {\r\n //clear any residual validations from the scope\r\n validatorSvc.clearValidationScopes();\r\n\r\n //set the side menu location info\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenuData.addOrder = $scope.locationInfo.sideMenuData.addOrder || {};\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 20;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"OrdersSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"2\";\r\n\r\n //start with a clean data structure\r\n $scope.displayOrders = {\r\n show: {\r\n reopenBtn: false,\r\n submitBtn: false,\r\n cancelBtn: false,\r\n tankIDCol: false,\r\n cancelCommentModal: false\r\n },\r\n context: {},\r\n orderDetails: ordersService.blankOrderHeaderObj()\r\n };\r\n\r\n $scope.globalizationSvc = globalizationSvc;\r\n\r\n //get the credit hold message\r\n WebProfileService.getWebProfileMessage($scope.appInfo.profileKey, 25).then(function (data)\r\n {\r\n $scope.displayOrders.context.creditHoldMessage = data;\r\n });\r\n\r\n getOrderContext();\r\n\r\n //get the order to be displayed\r\n if ($routeParams.ordKey)\r\n {\r\n ordersService.getOrderDetails($routeParams.ordKey).then(\r\n function (data)\r\n {\r\n $scope.displayOrders.orderDetails = data.OrderDetails || {};\r\n\r\n //get the tank/product context for this location\r\n $scope.getLocationDetails();\r\n\r\n setButtonVisiblity();\r\n }\r\n );\r\n }\r\n };\r\n\r\n $scope.getLocationDetails = function getLocationDetails()\r\n {\r\n $scope.displayOrders.context.tanksAndEquipment = [];\r\n ordersService.getOrderLocationInfo($scope.displayOrders.orderDetails.CustLocKey, $scope.displayOrders.orderDetails.ReqDelivDateTime).then(\r\n function (data)\r\n {\r\n if (!data.Successful || angular.isUndefinedOrNullOrEmpty(data.TanksAndEquipment))\r\n {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"NoTankInformation\"), 'error');\r\n return;\r\n }\r\n else\r\n {\r\n $scope.displayOrders.context.tanksAndEquipment = data.TanksAndEquipment;\r\n }\r\n\r\n //use default directions if the order has none\r\n if (angular.isUndefinedOrNullOrEmpty($scope.displayOrders.orderDetails.OrdDelivDirections))\r\n $scope.displayOrders.orderDetails.OrdDelivDirections = data.DeliveryDirections;\r\n\r\n //determine if TankID column is shown\r\n $scope.displayOrders.show.tankIDCol = false;\r\n angular.forEach($scope.displayOrders.context.tanksAndEquipment, function (item)\r\n {\r\n // check if ID is null or undefined first\r\n if (item.ID) {\r\n $scope.displayOrders.show.tankIDCol = !item.ID.isBlank();\r\n }\r\n\r\n //match and copy over the qty to be displayed\r\n if (!angular.isUndefinedOrNullOrEmpty(item.TankNumber)) {\r\n var tank = $filter('filter')($scope.displayOrders.orderDetails.OrderDetails, { TankNumber: item.TankNumber }, true)[0];\r\n item.Quantity = angular.isUndefinedOrNullOrEmpty(tank) ? 0 : globalizationSvc.formatNumeric(tank.OrderQty);\r\n }\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty(item.EquipmentKey)) {\r\n var equipment = $filter('filter')($scope.displayOrders.orderDetails.OrderDetails, { EquipmentKey: item.EquipmentKey }, true)[0];\r\n item.Quantity = angular.isUndefinedOrNullOrEmpty(equipment) ? 0 : globalizationSvc.formatNumeric(equipment.OrderQty);\r\n }\r\n \r\n });\r\n }\r\n );\r\n };\r\n\r\n $scope.hasAnyTanks = function () {\r\n return hasAnyItems('TankNumber');\r\n };\r\n\r\n $scope.hasAnyEquipment = function () {\r\n return hasAnyItems('EquipmentKey');\r\n };\r\n\r\n function hasAnyItems(keyProperty) {\r\n if ($scope.displayOrders.context && $scope.displayOrders.context.tanksAndEquipment) {\r\n for (var i = 0; i < $scope.displayOrders.context.tanksAndEquipment.length; i++) {\r\n if ($scope.displayOrders.context.tanksAndEquipment[i][keyProperty]) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n $scope.saveOrder = function saveOrder(command)\r\n {\r\n $scope.displayOrders.orderDetails.Command = command;\r\n $scope.displayOrders.orderDetails.OrdCreatedByContKey = $scope.appInfo.webUser.CurrentAuthorization.CustContKey;\r\n\r\n switch (command)\r\n {\r\n case 'Pending':\r\n handlePendingOrder();\r\n break;\r\n\r\n case 'Submit':\r\n handleSubmitOrder();\r\n break;\r\n\r\n case 'ReOpen':\r\n handleReOpenOrder();\r\n break;\r\n\r\n case 'Cancel':\r\n handleCancelOrder();\r\n break;\r\n }\r\n };\r\n\r\n $scope.cancelCommentModalDialogClose = function () {\r\n enableButton();\r\n };\r\n\r\n })\r\n .controller(\"editOrderCtrl\", function ($scope, $filter, $route, $routeParams, validatorSvc, WebProfileService, customerService, userAccountService, ordersService, templates, localStrings, globalizationSvc, $timeout)\r\n {\r\n 'use strict';\r\n\r\n $scope.editOrders = {\r\n show: {\r\n buttonBar: true,\r\n shipTo: false,\r\n tankIDCol: false,\r\n submitBtn: false,\r\n cancelCommentModal: false\r\n },\r\n locations: undefined,\r\n contacts: undefined,\r\n context: {},\r\n orderDetails: {}\r\n };\r\n\r\n $scope.prevCustLocKey = undefined;\r\n $scope.hideTankAndEquipment = false;\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.ordersGrid = {};\r\n $scope.kendo.ordersGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"TankNumber\",\r\n title: localStrings.getLocalizedString(\"Tank\"),\r\n attributes: {class: \"alignCenter\"},\r\n width: 50,\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"TankID\",\r\n title: localStrings.getLocalizedString(\"ID\"),\r\n width: 100,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Product\",\r\n title: localStrings.getLocalizedString(\"Product\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"OrderQty\",\r\n title: localStrings.getLocalizedString(\"Quantity\"),\r\n width: 100,\r\n format: \"{0:n0}\",\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n },\r\n template: '',\r\n editor: function (element, options)\r\n {\r\n $(\"\")\r\n .attr(\"name\", options.field)\r\n .attr(\"data-bind\", \"value:\" + options.field)\r\n .attr(\"class\", \"alignRight\")\r\n .appendTo(element)\r\n .kendoNumericTextBox({\r\n decimals: 0,\r\n format: \"#\",\r\n min: 0,\r\n spinners: false\r\n });\r\n\r\n $('')\r\n .attr(\"data-for\", options.field)\r\n .attr(\"class\", \"k-invalid-msg\")\r\n .appendTo(element);\r\n }\r\n }\r\n ],\r\n dataSource: [],\r\n editable: true,\r\n filterable: false,\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n $scope.kendo.ordersEquipmentGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"EquipmentID\",\r\n title: localStrings.getLocalizedString(\"Equipment\"),\r\n width: 200,\r\n attributes: { class: \"alignLeft\" },\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n },\r\n template: \"# if (EquipmentID) { # #:EquipmentID# - #:EquipmentDescription# # } # \"\r\n },\r\n {\r\n field: \"Product\",\r\n title: localStrings.getLocalizedString(\"Product\"),\r\n attributes: { class: \"alignLeft\" },\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"OrderQty\",\r\n title: localStrings.getLocalizedString(\"Quantity\"),\r\n width: 100,\r\n format: \"{0:n0}\",\r\n attributes: { class: \"alignRight\" },\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n },\r\n editor: function (element, options) {\r\n $(\"\")\r\n .attr(\"name\", options.field)\r\n .attr(\"data-bind\", \"value:\" + options.field)\r\n .attr(\"class\", \"alignRight\")\r\n .appendTo(element)\r\n .kendoNumericTextBox({\r\n decimals: 0,\r\n format: \"#\",\r\n min: 0,\r\n spinners: false\r\n });\r\n\r\n $('')\r\n .attr(\"data-for\", options.field)\r\n .attr(\"class\", \"k-invalid-msg\")\r\n .appendTo(element);\r\n }\r\n }\r\n ],\r\n dataSource: [],\r\n editable: true,\r\n filterable: false,\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.ordersGridInit = function (ds, showIdCol)\r\n {\r\n $scope.kendo.ordersGridDS = new kendo.data.DataSource({\r\n data: ds,\r\n schema: {\r\n model: {\r\n id: \"TankNumber\",\r\n fields: {\r\n TankNumber: {\r\n type: \"number\",\r\n editable: false,\r\n nullable: false,\r\n validation: false\r\n },\r\n TankID: {\r\n type: \"string\",\r\n editable: true,\r\n nullable: true,\r\n validation: false\r\n },\r\n Product: {\r\n type: \"string\",\r\n editable: false,\r\n nullable: false,\r\n validation: false\r\n },\r\n OrderQty: {\r\n type: \"number\",\r\n editable: true,\r\n nullable: false,\r\n validation: {\r\n capacity: function (e)\r\n {\r\n if(e.is('[name=OrderQty]'))\r\n {\r\n var rowData = $scope.kendo.ordersGrid.dataItem(e.closest('tr'));\r\n var val = e.getKendoNumericTextBox().value();\r\n\r\n rowData.OrderQty = val; //stop kendo from zeroing out the value on error\r\n\r\n if (e.val().isBlank())\r\n {\r\n e.attr(\"data-capacity-msg\", localStrings.getLocalizedString(\"Required\"));\r\n return false;\r\n }\r\n\r\n if (val < 0)\r\n {\r\n e.attr(\"data-capacity-msg\", localStrings.getLocalizedString(\"MinValueZero\"));\r\n return false;\r\n }\r\n\r\n if (val > rowData.MaxVolume)\r\n {\r\n var rowDataMaxVolume = [rowData.MaxVolume];\r\n e.attr(\"data-capacity-msg\", localStrings.getLocalizedString(\"MaxValue\", rowDataMaxVolume));\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n $scope.kendo.ordersGridDS.read();\r\n $scope.kendo.ordersGrid.dataSource.data($scope.kendo.ordersGridDS.data());\r\n\r\n if (showIdCol)\r\n $scope.kendo.ordersGrid.showColumn(1);\r\n else\r\n $scope.kendo.ordersGrid.hideColumn(1);\r\n };\r\n $scope.kendo.ordersEquipmentGridInit = function (ds) {\r\n $scope.kendo.ordersEquipmentGridDS = new kendo.data.DataSource({\r\n data: ds,\r\n schema: {\r\n model: {\r\n id: \"EquipmentKey\",\r\n fields: {\r\n EquipmentKey: {\r\n type: \"number\",\r\n editable: false\r\n },\r\n EquipmentID: {\r\n type: \"string\",\r\n editable: false\r\n },\r\n EquipmentDescription: {\r\n type: \"string\",\r\n editable: false\r\n },\r\n Product: {\r\n type: \"string\",\r\n editable: false\r\n },\r\n OrderQty: {\r\n type: \"number\",\r\n editable: true,\r\n nullable: false,\r\n validation: {\r\n capacity: function (e) {\r\n if (e.is('[name=OrderQty]')) {\r\n var rowData = $scope.kendo.ordersEquipmentGrid.dataItem(e.closest('tr'));\r\n var val = e.getKendoNumericTextBox().value();\r\n\r\n rowData.OrderQty = val; //stop kendo from zeroing out the value on error\r\n\r\n if (e.val().isBlank()) {\r\n e.attr(\"data-capacity-msg\", localStrings.getLocalizedString(\"Required\"));\r\n return false;\r\n }\r\n\r\n if (val < 0) {\r\n e.attr(\"data-capacity-msg\", localStrings.getLocalizedString(\"MinValueZero\"));\r\n return false;\r\n }\r\n\r\n // If equipment does not have ActualSize or RatedSize (MaxVolume) -> we won't be validating MaxVolume\r\n if (!angular.isUndefinedOrNullOrEmpty(rowData.MaxVolume)) {\r\n if (val > rowData.MaxVolume) {\r\n var rowDataMaxVolume = [rowData.MaxVolume];\r\n e.attr(\"data-capacity-msg\", localStrings.getLocalizedString(\"MaxValue\", rowDataMaxVolume));\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n $scope.kendo.ordersEquipmentGridDS.read();\r\n $scope.kendo.ordersEquipmentGrid.dataSource.data($scope.kendo.ordersEquipmentGridDS.data());\r\n };\r\n\r\n var validateOrderDate =\r\n {\r\n name: 'validateOrderDate',\r\n validationMessage: localStrings.getLocalizedString(\"RequestedDeliveryDateTimeIs\") + '
    ' + localStrings.getLocalizedString(\"NotAvailable\"),\r\n validatorError: function ()\r\n {\r\n if ($scope.editOrders.orderDetails.Command === 'Cancel')\r\n {\r\n return true;\r\n }\r\n\r\n if ($scope.editOrders.orderDetails.ReqDelivDateTime.isBlank()) {\r\n return false;\r\n }\r\n\r\n var valueDate = new Date($scope.editOrders.orderDetails.ReqDelivDateTime);\r\n var nowDate = new Date();\r\n\r\n return valueDate < nowDate ? false : true;\r\n }\r\n };\r\n var savedTankData = [], dataBetweenDateChanges = [];\r\n $scope.validateOrderDate = new pdi.ng.validate.PdiValidation(validateOrderDate);\r\n\r\n function hasErrors(errors)\r\n {\r\n var errorsDisplayed = false;\r\n angular.forEach(errors, function (item)\r\n {\r\n $scope.notifier.show(item, 'error');\r\n errorsDisplayed = true;\r\n });\r\n\r\n return errorsDisplayed;\r\n }\r\n\r\n function getContactsContext()\r\n {\r\n userAccountService.listContacts($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data)\r\n {\r\n if (!data.Successful || angular.isUndefinedOrNullOrEmpty(data.CustomerContacts))\r\n {\r\n $scope.modalifier.showSetupError();\r\n $scope.editOrders.show.buttonBar = false;\r\n return;\r\n }\r\n\r\n angular.forEach(data.CustomerContacts, function (item)\r\n {\r\n item.fullName = item.FirstName + ' ' + item.LastName;\r\n });\r\n\r\n $scope.editOrders.contacts = data.CustomerContacts.findAll({Active: -1}).sortBy('fullName');\r\n\r\n });\r\n }\r\n\r\n function getCreditHoldMsg()\r\n {\r\n WebProfileService.getWebProfileMessage($scope.appInfo.profileKey, 25).then(function (data)\r\n {\r\n $scope.editOrders.context.creditHoldMessage = data;\r\n });\r\n }\r\n\r\n function getLocationsContext()\r\n {\r\n ordersService.getOrderCustomerLocations($scope.appInfo.webUser.CurrentAuthorization.CustKey, $scope.editOrders.orderDetails.ReqDelivDateTime || $scope.editOrders.context.MinDateTime).then(\r\n function (data) {\r\n if (!data.Successful || angular.isUndefinedOrNullOrEmpty(data.OrderLocations)) {\r\n $scope.modalifier.showSetupError();\r\n $scope.editOrders.show.buttonBar = false;\r\n return;\r\n }\r\n\r\n $scope.editOrders.locations = data.OrderLocations.remove({ Active: 0 }).sortBy('Description');\r\n\r\n if ($scope.editOrders.locations.length > 1)\r\n $scope.editOrders.show.shipTo = true;\r\n else {\r\n $scope.editOrders.show.shipTo = false;\r\n }\r\n\r\n if (angular.isUndefinedOrNullOrEmpty($routeParams.ordKey)) {\r\n // in case of a new order, remove all locations without valid tanks / equipment\r\n $scope.editOrders.locations = $scope.editOrders.locations.remove({ HasValidTankOrEquipment: 0 });\r\n $scope.editOrders.orderDetails.CustLocKey = $scope.editOrders.locations[0].Key;\r\n $scope.updateCustomerLocationData();\r\n } else {\r\n // in case of an existing order, remove all locations without valid tanks / equipment except location on order\r\n $scope.editOrders.locations = $scope.editOrders.locations.filter(function (l) {\r\n return l.HasValidTankOrEquipment !== 0 || l.Key === $scope.editOrders.orderDetails.CustLocKey;\r\n });\r\n $scope.editOrders.locations.sort(function (l) {\r\n return l.CustLocKey - (l.CustLocKey === $scope.editOrders.orderDetails.CustLocKey ? l.Key + 1 : l.CustLocKey - 2);\r\n });\r\n }\r\n });\r\n }\r\n\r\n function getOrderContext()\r\n {\r\n ordersService.getOrdersContext($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data)\r\n {\r\n if (!data.Successful || angular.isUndefinedOrNullOrEmpty(data.WOGSettings))\r\n {\r\n $scope.modalifier.showSetupError();\r\n $scope.editOrders.show.buttonBar = false;\r\n return;\r\n }\r\n\r\n $scope.editOrders.context.WOGSettings = data.WOGSettings[0] || [];\r\n $scope.editOrders.context.PONumber = data.PONumber;\r\n $scope.editOrders.context.DeliveryDT = data.DeliveryDT;\r\n\r\n $scope.editOrders.show.submitBtn = data.WOGSettings.SubmitOnHold || data.WOGSettings.CrStatus !== 1;\r\n getLocationsContext();\r\n }\r\n );\r\n }\r\n\r\n function loadExistingOrder()\r\n {\r\n ordersService.getOrderDetails($routeParams.ordKey).then(\r\n function (data)\r\n {\r\n savedTankData = data.OrderDetails.OrderDetails.clone();\r\n data.OrderDetails.OrderDetails = [];\r\n $scope.editOrders.orderDetails = data.OrderDetails;\r\n $scope.editOrders.context.DeliveryDT = data.OrderDetails.ReqDelivDateTime;\r\n $scope.editOrders.show.cancelBtn = true;\r\n\r\n $scope.editOrders.orderDetails.CustContKey = $scope.editOrders.orderDetails.CustContKey.toNumber();\r\n $scope.prevCustLocKey = $scope.initialOrderCustLocKey = $scope.editOrders.orderDetails.CustLocKey;\r\n $scope.updateCustomerLocationData();\r\n }\r\n );\r\n }\r\n\r\n function loadNewOrder()\r\n {\r\n $scope.editOrders.orderDetails = new ordersService.blankOrderHeaderObj();\r\n\r\n $scope.editOrders.orderDetails.CustContKey = $scope.appInfo.webUser.CurrentAuthorization.CustContKey;\r\n\r\n }\r\n Number.isInteger = Number.isInteger || function (value) {\r\n return typeof value === \"number\" &&\r\n isFinite(value) &&\r\n Math.floor(value) === value;\r\n };\r\n function qtyValidityStates(items) {\r\n return items.map(\r\n function (order) {\r\n if (!Number.isInteger(order.OrderQty)) {\r\n return false;\r\n }\r\n\r\n if (order.OrderQty < 0) {\r\n return false;\r\n }\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty(order.MaxVolume) && order.OrderQty > order.MaxVolume) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n );\r\n }\r\n\r\n // This returns an array of boolean values\r\n // use .every to see if all the values are true or false\r\n function validOrderQtys(items) {\r\n return (qtyValidityStates(items).every(Boolean));\r\n }\r\n\r\n function validOrder()\r\n {\r\n $scope.orderQtyWarning = {\r\n show: false,\r\n text: ''\r\n };\r\n\r\n var orderTotal = ($scope.kendo.ordersGrid.dataSource.data().toJSON().sum('OrderQty') || 0) + ($scope.kendo.ordersEquipmentGrid.dataSource.data().toJSON().sum('OrderQty') || 0);\r\n var OrdQtyParams = [$scope.editOrders.context.WOGSettings.OrdMinQty, $scope.editOrders.context.WOGSettings.OrdMaxQty];\r\n\r\n if (!validOrderQtys($scope.kendo.ordersGrid.dataSource.data()) || !validOrderQtys($scope.kendo.ordersEquipmentGrid.dataSource.data())) {\r\n $scope.orderQtyWarning = {\r\n show: true,\r\n text: localStrings.getLocalizedString(\"InvalidTankQuantity\")\r\n };\r\n }\r\n\r\n if (orderTotal < $scope.editOrders.context.WOGSettings.OrdMinQty)\r\n {\r\n $scope.orderQtyWarning = {\r\n show: true,\r\n text: localStrings.getLocalizedString(\"DoesNotMeetMinimum\", OrdQtyParams)\r\n };\r\n }\r\n\r\n if (orderTotal > $scope.editOrders.context.WOGSettings.OrdMaxQty)\r\n {\r\n $scope.orderQtyWarning = {\r\n show: true,\r\n text: localStrings.getLocalizedString(\"OrderExceedsMaximum\", OrdQtyParams)\r\n };\r\n }\r\n\r\n return validatorSvc.executeValidations() && !$scope.orderQtyWarning.show;\r\n }\r\n\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n $scope.checkForAppliedProfile();\r\n\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenuData.addOrder = $scope.locationInfo.sideMenuData.addOrder || {};\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 20;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"OrdersSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"2\";\r\n\r\n getContactsContext();\r\n getOrderContext();\r\n getCreditHoldMsg();\r\n\r\n if ($routeParams.ordKey) {\r\n loadExistingOrder();\r\n }\r\n else {\r\n loadNewOrder();\r\n }\r\n };\r\n\r\n $scope.saveOrder = function saveOrder(command) {\r\n // If command is submit we need to save the details before we submit them.\r\n if (command === 'Submit') {\r\n $scope.editOrders.orderDetails.Command = 'Pending';\r\n } else {\r\n $scope.editOrders.orderDetails.Command = command;\r\n }\r\n\r\n if (!validOrder()) {\r\n enableButton();\r\n return;\r\n }\r\n\r\n $scope.resetDirtyFlags($scope.editOrders.editForm);\r\n\r\n $scope.editOrders.orderDetails.OrdCreatedByContKey = $scope.appInfo.webUser.CurrentAuthorization.CustContKey;\r\n $scope.editOrders.orderDetails.OrderDetails = $scope.kendo.ordersGrid.dataSource.data().toJSON().concat($scope.kendo.ordersEquipmentGrid.dataSource.data().toJSON());\r\n ordersService.saveOrderDetails($scope.editOrders.orderDetails).then(\r\n function (data) {\r\n //notify and drop out on errors\r\n if (angular.isUndefinedOrNullOrEmpty(data.OrderDetails.OrdKey) || data.OrderDetails.OrdKey === 0) {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ChangesNotSaved\"), \"error\");\r\n hasErrors(data.OrderDetails.Errors);\r\n enableButton();\r\n return;\r\n }\r\n\r\n if (hasErrors(data.OrderDetails.Errors)) {\r\n enableButton();\r\n return;\r\n }\r\n\r\n if ($scope.editOrders.orderDetails.Command !== command) {\r\n data.OrderDetails.Command = command;\r\n\r\n ordersService.saveOrderDetails(data.OrderDetails).then(\r\n function (submit) {\r\n //notify and drop out on errors\r\n if (angular.isUndefinedOrNullOrEmpty(submit.OrderDetails.OrdKey) || submit.OrderDetails.OrdKey === 0) {\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ChangesNotSaved\"), \"error\");\r\n hasErrors(submit.OrderDetails.Errors);\r\n enableButton();\r\n return;\r\n }\r\n\r\n if (hasErrors(submit.OrderDetails.Errors)) {\r\n enableButton();\r\n return;\r\n }\r\n });\r\n }\r\n\r\n //notify and handle success\r\n switch (command) {\r\n case 'Pending':\r\n $scope.notifier.show(localStrings.getLocalizedString(\"SavedChanges\"), \"success\");\r\n $scope.goTo('Orders/EditOrder/' + data.OrderDetails.OrdKey);\r\n loadExistingOrder();\r\n enableButton();\r\n break;\r\n\r\n case 'Submit':\r\n $scope.notifier.show(localStrings.getLocalizedString(\"ChangesBeenSubmitted\"), \"success\");\r\n $scope.goTo('Orders/DisplayOrder/' + data.OrderDetails.OrdKey);\r\n break;\r\n\r\n case 'Cancel':\r\n $scope.notifier.show(localStrings.getLocalizedString(\"SavedChanges\"), \"success\");\r\n $scope.goTo('Orders/OpenOrders/');\r\n break;\r\n }\r\n }\r\n );\r\n };\r\n\r\n $scope.cancelCommentModalDialogClose = function () {\r\n enableButton();\r\n };\r\n\r\n function enableButton() {\r\n $('#editOrderPending').removeAttr('disabled');\r\n $('#editOrderSubmit').removeAttr('disabled');\r\n $('#editOrderCancel').removeAttr('disabled');\r\n $('#editOrderCancelComment').removeAttr('disabled');\r\n }\r\n\r\n function mergeTankData(target, source)\r\n {\r\n //filter out records with non-existent tank / equipment\r\n target = target.filter(function (t) {\r\n for (var i = 0; i < source.length; i++) {\r\n if ((t.TankNumber && source[i].TankNumber === t.TankNumber) || (t.EquipmentKey && source[i].EquipmentKey === t.EquipmentKey)) {\r\n return true;\r\n }\r\n }\r\n if (t.TankNumber && $scope.initialOrderCustLocKey === $scope.editOrders.orderDetails.CustLocKey) {\r\n $scope.notifier.show(\"Tank #\" + t.TankNumber + \" is no longer valid for this customer's location and will be removed from the order. Please click save or resubmit the order to proceed\", 'warning');\r\n }\r\n return false;\r\n });\r\n //iterate through each item(s) in the source array\r\n source.each(function (s)\r\n {\r\n var t = null;\r\n if (s.EquipmentKey) {\r\n t = target.find({ EquipmentKey: s.EquipmentKey });\r\n if (!t) {\r\n t = {};\r\n target.add(t);\r\n }\r\n } else {\r\n //look for a matching item in the target\r\n t = target.find({TankNumber: s.TankNumber});\r\n\r\n //not matching item so lets make one\r\n if (!t)\r\n t = target\r\n .add(new ordersService.blankOrderDetailsObj())\r\n .last();\r\n }\r\n\r\n //if the source property value is empty, copy over the target value\r\n for (var p in s)\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty(t[p]))\r\n t[p] = s[p];\r\n }\r\n\r\n //set null quantity to zero\r\n if (angular.isUndefinedOrNullOrEmpty(t['OrderQty'])) t['OrderQty'] = 0;\r\n });\r\n\r\n $scope.editOrders.orderDetails.OrderDetails = target.filter(function (t) { return t.TankNumber; }).sortBy('TankNumber');\r\n $scope.editOrders.orderDetails.OrderEquipmentDetails = target.filter(function (t) { return t.EquipmentKey; }).sortBy('EquipmentID');\r\n savedTankData = [];\r\n }\r\n\r\n function copyTankData(source)\r\n {\r\n var finalItems = [];\r\n //iterate through each item (s) in the source array\r\n source.each(function (s)\r\n {\r\n var existing = dataBetweenDateChanges.find({ CustFuelTankKey: s.CustFuelTankKey });\r\n\r\n if (existing) {\r\n finalItems.push(existing);\r\n } else {\r\n //set null quantity to zero\r\n if (angular.isUndefinedOrNullOrEmpty(s['OrderQty'])) s['OrderQty'] = 0;\r\n finalItems.push(s);\r\n }\r\n });\r\n\r\n $scope.editOrders.orderDetails.OrderDetails = finalItems.sortBy('TankNumber');\r\n }\r\n function copyEquipmentData(source) {\r\n var finalItems = [];\r\n source.each(function (s) {\r\n var existing = dataBetweenDateChanges.find({ EquipmentKey: s.EquipmentKey });\r\n if (existing) {\r\n finalItems.push(existing);\r\n } else {\r\n //set null quantity to zero\r\n if (angular.isUndefinedOrNullOrEmpty(s['OrderQty'])) s['OrderQty'] = 0;\r\n finalItems.push(s);\r\n }\r\n });\r\n\r\n $scope.editOrders.orderDetails.OrderEquipmentDetails = finalItems.sortBy('EquipmentID');\r\n }\r\n\r\n var updateCustomerLocationDataLock = 0;\r\n $scope.updateCustomerLocationData = function() {\r\n\r\n if (angular.isUndefinedOrNullOrEmpty($scope.editOrders.orderDetails.CustLocKey) || angular.isUndefinedOrNullOrEmpty($scope.editOrders.orderDetails.ReqDelivDateTime)) {\r\n return;\r\n }\r\n\r\n if (updateCustomerLocationDataLock === 0) {\r\n updateCustomerLocationDataLock++;\r\n // because of equipment we have to send also date parameter\r\n ordersService.getOrderLocationInfo($scope.editOrders.orderDetails.CustLocKey, $scope.editOrders.orderDetails.ReqDelivDateTime).then( // OMG this is string instead of date!\r\n function (data) {\r\n if (!data.Successful || angular.isUndefinedOrNullOrEmpty(data.TanksAndEquipment)) {\r\n $scope.editOrders.show.buttonBar = false;\r\n $scope.notifier.show('Could not find any tank information for the selected Ship To location', 'error');\r\n $scope.hideTankAndEquipment = true;\r\n updateCustomerLocationDataLock--;\r\n return;\r\n }\r\n else {\r\n var validTankOrEquipment = true;\r\n if (!savedTankData.isEmpty()) {\r\n mergeTankData(savedTankData, data.TanksAndEquipment);\r\n // check if order customer location has valid tank and / or equipment\r\n validTankOrEquipment = $scope.editOrders.orderDetails.OrderDetails.length > 0 || $scope.editOrders.orderDetails.OrderEquipmentDetails.length > 0;\r\n }\r\n else {\r\n copyTankData(data.TanksAndEquipment.filter(function (te) { return te.TankNumber; }));\r\n copyEquipmentData(data.TanksAndEquipment.filter(function (te) { return te.EquipmentKey; }));\r\n if ($scope.editOrders.orderDetails.OrderDetails.length <= 0) {\r\n $scope.notifier.show('Could not find any tank information for the selected Ship To location', 'warning');\r\n }\r\n }\r\n dataBetweenDateChanges = [];\r\n\r\n $scope.hideTankAndEquipment = !validTankOrEquipment;\r\n $scope.editOrders.show.buttonBar = validTankOrEquipment;\r\n }\r\n\r\n $scope.editOrders.context.DeliveryDT = data.DeliveryDT;\r\n\r\n if (angular.isUndefinedOrNullOrEmpty($scope.editOrders.orderDetails.OrdDelivDirections) ||\r\n angular.isUndefinedOrNullOrEmpty($scope.editOrders.orderDetails.OrdKey)) {\r\n $scope.editOrders.orderDetails.OrdDelivDirections = data.DeliveryDirections;\r\n }\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.prevCustLocKey) &&\r\n ($scope.prevCustLocKey) !== ($scope.editOrders.orderDetails.CustLocKey)) {\r\n $scope.editOrders.orderDetails.OrdDelivDirections = data.DeliveryDirections;\r\n $scope.prevCustLocKey = $scope.editOrders.orderDetails.CustLocKey;\r\n }\r\n\r\n $scope.kendo.ordersGridInit($scope.editOrders.orderDetails.OrderDetails, !$scope.editOrders.orderDetails.OrderDetails.all({ ID: \"\" }));\r\n $scope.kendo.ordersEquipmentGridInit($scope.editOrders.orderDetails.OrderEquipmentDetails);\r\n updateCustomerLocationDataLock--;\r\n }, function (error) {\r\n updateCustomerLocationDataLock--;\r\n throw error;\r\n }\r\n );\r\n }\r\n };\r\n\r\n $scope.$watch('editOrders.context.DeliveryDT', function updateDateTime()\r\n {\r\n let requestedDT, suggestedDT, theWinner;\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.editOrders.orderDetails.ReqDelivDateTime) && \r\n !isNaN(Date.parse($scope.editOrders.orderDetails.ReqDelivDateTime))) {\r\n requestedDT = new Date($scope.editOrders.orderDetails.ReqDelivDateTime.replace(/-/g, \"/\").replace(/T/g, \" \"));\r\n }\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.editOrders.context.DeliveryDT) && \r\n !isNaN(Date.parse($scope.editOrders.context.DeliveryDT)))\r\n {\r\n let temp = $scope.editOrders.context.DeliveryDT;\r\n suggestedDT = new Date(temp.replace(/-/g, \"/\").replace(/T/g, \" \"));\r\n }\r\n\r\n if (requestedDT >= suggestedDT) {\r\n theWinner = requestedDT;\r\n }\r\n\r\n //save for validation\r\n $scope.editOrders.context.MinDateTime = theWinner;\r\n $scope.editOrders.orderDetails.ReqDelivDateTime = $filter('date')(new Date(theWinner), 'MM/dd/yyyy h:mm a');\r\n });\r\n\r\n $scope.$watch('editOrders.orderDetails.ReqDelivDateTime', function (reqDelivDateTimeString, oldReqDelivDateTimeString) {\r\n // OMG using strings instead of Date objects :(...\r\n if (updateCustomerLocationDataLock === 0) {\r\n if (reqDelivDateTimeString !== oldReqDelivDateTimeString &&\r\n !angular.isUndefinedOrNullOrEmpty(oldReqDelivDateTimeString) && !angular.isUndefinedOrNullOrEmpty(reqDelivDateTimeString) &&\r\n angular.isString(oldReqDelivDateTimeString) && angular.isString(reqDelivDateTimeString)) {\r\n var oldReqDelivDateTime = new Date(oldReqDelivDateTimeString.replace(/-/g, \"/\").replace(/T/g, \" \"));\r\n var reqDelivDateTime = new Date(reqDelivDateTimeString.replace(/-/g, \"/\").replace(/T/g, \" \"));\r\n\r\n if (oldReqDelivDateTime.toDateString() !== reqDelivDateTime.toDateString()) {\r\n // user changed date => get equipment list for that date\r\n // we save quantities - so we will be able to merge them with new values, because a lot of items might be the same when you just change a date.\r\n dataBetweenDateChanges = $scope.kendo.ordersGrid.dataSource.data().toJSON().concat($scope.kendo.ordersEquipmentGrid.dataSource.data().toJSON());\r\n $scope.updateCustomerLocationData();\r\n }\r\n }\r\n }\r\n });\r\n\r\n $scope.hasAnyTanks = function () {\r\n return $scope.editOrders.orderDetails.OrderDetails && $scope.editOrders.orderDetails.OrderDetails.length > 0 && !\r\n $scope.hideTankAndEquipment;\r\n };\r\n\r\n $scope.hasAnyEquipment = function () {\r\n return $scope.editOrders.orderDetails.OrderEquipmentDetails && $scope.editOrders.orderDetails.OrderEquipmentDetails.length > 0 && !\r\n $scope.hideTankAndEquipment;\r\n };\r\n })\r\n .controller(\"openOrdersCtrl\", function ($scope, ordersService, templates, localStrings)\r\n {\r\n 'use strict'; \r\n $scope.checkForAppliedProfile();\r\n\r\n if (!$scope.appInfo.webUser.CurrentAuthorization.CanAddEditWebOrders) {\r\n $scope.goTo('Orders/OrderHistory');\r\n }\r\n\r\n function getOpenOrders()\r\n {\r\n ordersService.getOpenOrders($scope.appInfo.webUser.CurrentAuthorization.CustKey).then(\r\n function (data)\r\n {\r\n if (data.Successful)\r\n {\r\n if (!angular.isUndefinedOrNullOrEmpty(data.OpenOrders))\r\n {\r\n $scope.openOrders = data.OpenOrders;\r\n $scope.kendo.ordersGridInit();\r\n }\r\n else\r\n $scope.notifier.show(localStrings.getLocalizedString(\"SelectionCriteriaNoResults\"), 'warning');\r\n }\r\n else\r\n $scope.modalifier.showSetupError();\r\n }\r\n );\r\n }\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.ordersGrid = {};\r\n $scope.kendo.ordersGridOptions = {\r\n autoBind: false,\r\n columns: [\r\n {\r\n field: \"Number\",\r\n title: localStrings.getLocalizedString(\"Order\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"PONumber\",\r\n title: localStrings.getLocalizedString(\"PONumber\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"LocDescription\",\r\n title: localStrings.getLocalizedString(\"ShipTo\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Contact\",\r\n title: localStrings.getLocalizedString(\"Contact\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"DeliveryDate\",\r\n title: localStrings.getLocalizedString(\"DateTime\"),\r\n width: 130,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Status\",\r\n title: localStrings.getLocalizedString(\"Status\"),\r\n width: 130,\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"EnteredBy\",\r\n title: localStrings.getLocalizedString(\"EnteredBy\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.ordersGridInit = function ()\r\n {\r\n $scope.kendo.ordersGridDS = new kendo.data.DataSource({\r\n data: $scope.openOrders,\r\n schema: {\r\n parse: function (response)\r\n {\r\n $.each(response, function (idx, elem)\r\n {\r\n if (elem.DeliveryDate && typeof elem.DeliveryDate === \"string\")\r\n {\r\n elem.DeliveryDate = Date.create(elem.DeliveryDate).format('{MM}/{dd}/{yyyy} {12hr}:{mm} {tt}');\r\n }\r\n });\r\n return response;\r\n }\r\n }\r\n });\r\n\r\n $scope.kendo.ordersGridDS.read();\r\n $scope.kendo.ordersGrid.dataSource.data($scope.kendo.ordersGridDS.data());\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n\r\n if (!$scope.appInfo.webUser.CurrentAuthorization.CanAddEditWebOrders)\r\n $scope.goTo('Orders/OrderHistory');\r\n\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenuData.openOrders = $scope.locationInfo.sideMenuData.openOrders || {};\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 20;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"OrdersSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"1\";\r\n\r\n $scope.openOrders = [];\r\n getOpenOrders();\r\n };\r\n\r\n $scope.openOrder = function openOrder(order)\r\n {\r\n switch (order.Status)\r\n {\r\n case 'Pending':\r\n $scope.goTo('Orders/EditOrder/' + order.Key);\r\n break;\r\n\r\n default:\r\n $scope.goTo('Orders/DisplayOrder/' + order.Key);\r\n break;\r\n }\r\n };\r\n })\r\n .controller(\"orderHistoryCtrl\", function ($scope, customerService, templates)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.sideMenuData.orders = $scope.locationInfo.sideMenuData.orders || {};\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 20;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"OrdersSideMenu\");\r\n $scope.locationInfo.sideMenuData.subMenu = \"3\";\r\n };\r\n })\r\n .controller(\"orderHistorySideMenuCtrl\", function ($scope, validatorSvc, customerService, WebFunctions, $filter, reportingService, Authentication, localizationSvc)\r\n {\r\n 'use strict';\r\n // $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"OrdersLocalization\");\r\n $scope.initialize = function ()\r\n {\r\n validatorSvc.clearValidationScopes();\r\n if (!$scope.checkCurrentUserPermission(WebFunctions.ViewOrderHistoryandPriceNotices))\r\n {\r\n $scope.goTo(\"/Home\");\r\n }\r\n $scope.locationInfo.sideMenuData = $scope.locationInfo.sideMenuData || {};\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 20;\r\n $scope.locationInfo.sideMenuData.orders = {\r\n quotes: \"-1\",\r\n ordered: \"-1\",\r\n dispatched: \"-1\",\r\n delivered: \"-1\",\r\n billed: \"-1\",\r\n fuel: \"-1\",\r\n warehouse: \"-1\",\r\n noninventory: \"-1\",\r\n location: 0,\r\n productSearchText: '',\r\n packageSearchText: '',\r\n orderInvoiceBOLSearchTerm: '',\r\n reportType: 'Orders',\r\n showReportDetail: false\r\n };\r\n $scope.$root.reportSettings.reportKey = 13;\r\n\r\n customerService.getCustomerLocations($scope.appInfo.webUser.CurrentAuthorization.CustKey, 1).then(function (data)\r\n {\r\n $scope.locations = $filter('filter')(data.Locations, {Active: '!0'});\r\n $scope.locations.unshift({\r\n Active: -1,\r\n Description: localStrings.getLocalizedString(\"All\"),\r\n Key: 0\r\n });\r\n setTimeout(function() {\r\n $scope.locationInfo.sideMenuData.orders.location = 0;\r\n }, 0);\r\n });\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.orders = $scope.reportSettings.saveOptions.orders;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.orders = $scope.locationInfo.sideMenuData.orders;\r\n };\r\n\r\n $scope.$on('exportingReport', function (event, args)\r\n {\r\n $scope.applyAction(args.format);\r\n });\r\n\r\n $scope.applyAction = function (format)\r\n {\r\n if (!validatorSvc.executeValidations()) return;\r\n\r\n var reportName = $scope.locationInfo.sideMenuData.orders.showReportDetail ?\r\n \"OrdersDetailed\" : $scope.locationInfo.sideMenuData.orders.reportType;\r\n\r\n var qs = \"reportName=\" + reportName +\r\n \"&RP-CustKey=\" + $scope.appInfo.webUser.CurrentAuthorization.CustKey +\r\n \"&RP-IncludeStatusOpen=\" + $scope.locationInfo.sideMenuData.orders.quotes +\r\n \"&RP-IncludeStatusOrdered=\" + $scope.locationInfo.sideMenuData.orders.ordered +\r\n \"&RP-IncludeStatusDispatched=\" + $scope.locationInfo.sideMenuData.orders.dispatched +\r\n \"&RP-IncludeStatusDelivered=\" + $scope.locationInfo.sideMenuData.orders.delivered +\r\n \"&RP-IncludeStatusBilled=\" + $scope.locationInfo.sideMenuData.orders.billed +\r\n \"&RP-IncludeTypeFuel=\" + $scope.locationInfo.sideMenuData.orders.fuel +\r\n \"&RP-IncludeTypeWarehouse=\" + $scope.locationInfo.sideMenuData.orders.warehouse +\r\n \"&RP-StartDate=\" + $scope.dateSelector.startDate +\r\n \"&RP-EndDate=\" + $scope.dateSelector.endDate +\r\n \"&RP-ShipToKey=\" + $scope.locationInfo.sideMenuData.orders.location +\r\n \"&RP-ProductSearchTerm=\" + $scope.locationInfo.sideMenuData.orders.productSearchText +\r\n \"&RP-PackageSearchTerm=\" + $scope.locationInfo.sideMenuData.orders.packageSearchText +\r\n \"&RP-IncludeTypeNonInventory=\" + $scope.locationInfo.sideMenuData.orders.noninventory +\r\n \"&RP-OrderInvoiceBOLSearchTerm=\" + $scope.locationInfo.sideMenuData.orders.orderInvoiceBOLSearchTerm;\r\n\r\n if (format)\r\n reportingService.exportReport(qs, format);\r\n else\r\n reportingService.renderReport(qs);\r\n\r\n };\r\n })\r\n;","/**\r\n * Created by rhampton on 7/25/2014.\r\n */\r\nangular.module(\"pnODPricing\", ['core.objects', 'services.payments', 'core.directives'])\r\n .config(function ($routeProvider, templateProvider)\r\n {\r\n $routeProvider\r\n .when(\"/Orders/BulkFuelPrices\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"BulkFuelPrices\"),\r\n controller: \"bulkFuelPricesCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"OrdersLocalization\");\r\n }\r\n }\r\n }\r\n )\r\n .when(\"/Orders/WarehousePrices\",\r\n {\r\n templateUrl: templateProvider.getTemplate(\"WarehousePrices\"),\r\n controller: \"warehousePricesCtrl\",\r\n resolve: {\r\n localStrings: function (localizationSvc) {\r\n return localizationSvc.getCachedLocalizationsContainer(\"OrdersLocalization\");\r\n }\r\n }\r\n }\r\n );\r\n })\r\n .controller(\"odPricingSideMenuCtrl\", function ($scope)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n if (!$scope.locationInfo.sideMenuData) $scope.locationInfo.sideMenuData = {};\r\n };\r\n })\r\n .controller(\"bulkFuelPricesCtrl\", function ($scope, bulkFuelPriceNoticesService, $filter, templates, localStrings)\r\n {\r\n 'use strict';\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.bulkPricesGrid = {};\r\n $scope.kendo.bulkPricesGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var selectedRows = this.select();\r\n var dataItem = this.dataItem(selectedRows[0]);\r\n $scope.openEdoc(dataItem.EdocDtlKey);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"EffDateTimeFormatted\",\r\n title: localStrings.getLocalizedString(\"ReportDate\"),\r\n width: 100,\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n field: \"Location\",\r\n title: localStrings.getLocalizedString(\"Location\"),\r\n attributes: {class: \"alignLeft\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.bulkPricesGridInit = function ()\r\n {\r\n $scope.kendo.bulkPricesGridDS = new kendo.data.DataSource({\r\n data: $scope.appInfo.bulkFuelPrices\r\n });\r\n\r\n $scope.kendo.bulkPricesGridDS.read();\r\n $scope.kendo.bulkPricesGrid.dataSource.data($scope.kendo.bulkPricesGridDS.data());\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 21;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"OdPricingSideMenu\");\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"1\",\r\n bulkFuelPrices: {\r\n location: 0\r\n }\r\n };\r\n if (!$scope.appInfo.bulkFuelPrices) $scope.appInfo.bulkFuelPrices = [];\r\n };\r\n\r\n $scope.$parent.applyAction = function ()\r\n {\r\n $scope.modalifier.hide();\r\n $scope.predicate = 'EffDateTimeFormatted';\r\n $scope.reverse = false;\r\n bulkFuelPriceNoticesService.loadBulkFuelPrices($scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.locationInfo.sideMenuData.bulkFuelPrices.location,\r\n $scope.dateSelector.startDate,\r\n $scope.dateSelector.endDate).then(function (data)\r\n {\r\n if (data.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"BulkFuelPrices\"));\r\n }\r\n $scope.appInfo.bulkFuelPrices = data;\r\n angular.forEach($scope.appInfo.bulkFuelPrices, function (element)\r\n {\r\n element.EffDateTimeFormatted = $filter('date')(element.EffDateTime, 'MM/dd/yyyy');\r\n });\r\n $scope.kendo.bulkPricesGridInit();\r\n });\r\n };\r\n })\r\n .controller(\"bulkFuelPricesSideMenuCtrl\", function ($scope, templates, customerService, $filter, localizationSvc)\r\n {\r\n 'use strict';\r\n var localStrings = localizationSvc.getCachedLocalizationsContainer(\"OrdersLocalization\");\r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 21;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"OdPricingSideMenu\");\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"1\",\r\n bulkFuelPrices: {\r\n location: 0\r\n }\r\n };\r\n $scope.$root.reportSettings.reportKey = 16;\r\n customerService.getCustomerLocations($scope.appInfo.webUser.CurrentAuthorization.CustKey, 1).then(function (data)\r\n {\r\n $scope.locations = $filter('filter')(data.Locations, {Active: '!0'});\r\n $scope.locations.unshift({\r\n Active: -1,\r\n Description: localStrings.getLocalizedString(\"All\"),\r\n Key: 0\r\n });\r\n $scope.locationInfo.sideMenuData.bulkFuelPrices.location = 0;\r\n });\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.bulkFuelPrices = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.bulkFuelPrices;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n })\r\n .controller(\"warehousePricesCtrl\", function ($scope, warehousePriceNoticesService, $filter, templates, localStrings)\r\n {\r\n 'use strict';\r\n\r\n $scope.kendo = {};\r\n $scope.kendo.warehousePricesGrid = {};\r\n $scope.kendo.warehousePricesGridOptions = {\r\n autoBind: false,\r\n change: function (e)\r\n {\r\n var selectedRows = this.select();\r\n var dataItem = this.dataItem(selectedRows[0]);\r\n $scope.openEdoc(dataItem.EdocDtlKey);\r\n $scope.$apply();\r\n },\r\n columns: [\r\n {\r\n field: \"EffDateTimeFormatted\",\r\n title: localStrings.getLocalizedString(\"ReportDate\"),\r\n attributes: {class: \"alignRight\"},\r\n filterable: {\r\n cell: {\r\n operator: \"contains\",\r\n showOperators: false\r\n }\r\n }\r\n },\r\n {\r\n template: \"\",\r\n width: 50\r\n }\r\n ],\r\n dataSource: new kendo.data.DataSource(),\r\n editable: false,\r\n filterable: {\r\n mode: \"row\", extra: false\r\n },\r\n navigatable: true,\r\n pageable: false,\r\n scrollable: false,\r\n selectable: \"row\",\r\n sortable: true\r\n };\r\n\r\n $scope.kendo.warehousePricesGridInit = function ()\r\n {\r\n $scope.kendo.warehousePricesGridDS = new kendo.data.DataSource({\r\n data: $scope.appInfo.warehousePrices\r\n });\r\n\r\n $scope.kendo.warehousePricesGridDS.read();\r\n $scope.kendo.warehousePricesGrid.dataSource.data($scope.kendo.warehousePricesGridDS.data());\r\n };\r\n\r\n $scope.initialize = function ()\r\n {\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = 21;\r\n $scope.locationInfo.sideMenu = templates.getTemplate(\"OdPricingSideMenu\");\r\n $scope.locationInfo.sideMenuData = {\r\n subMenu: \"2\",\r\n warehousePrices: {}\r\n };\r\n if (!$scope.appInfo.warehousePrices) $scope.appInfo.warehousePrices = [];\r\n };\r\n\r\n $scope.$parent.applyAction = function ()\r\n {\r\n $scope.modalifier.hide();\r\n $scope.predicate = 'EffDateTimeFormatted';\r\n $scope.reverse = false;\r\n warehousePriceNoticesService.loadWarehousePrices($scope.appInfo.webUser.CurrentAuthorization.CustKey,\r\n $scope.dateSelector.startDate,\r\n $scope.dateSelector.endDate).then(function (data)\r\n {\r\n if (data.length === 0)\r\n {\r\n $scope.modalifier.showNoResults(localStrings.getLocalizedString(\"WarehousePrices\"));\r\n }\r\n $scope.appInfo.warehousePrices = data;\r\n angular.forEach($scope.appInfo.warehousePrices, function (element)\r\n {\r\n element.EffDateTimeFormatted = $filter('date')(element.EffDateTime, 'MM/dd/yyyy');\r\n });\r\n $scope.kendo.warehousePricesGridInit();\r\n });\r\n };\r\n\r\n\r\n })\r\n .controller(\"warehousePricesSideMenuCtrl\", function ($scope)\r\n {\r\n 'use strict';\r\n $scope.initialize = function ()\r\n {\r\n $scope.$root.reportSettings.reportKey = 31;\r\n };\r\n\r\n $scope.$root.reportSettings = $scope.$root.reportSettings || {};\r\n $scope.$root.reportSettings.unwrapReportSettings = function ()\r\n {\r\n $scope.locationInfo.sideMenuData.warehousePrices = $scope.reportSettings.loadOptions.controls;\r\n $scope.dateSelector = $scope.reportSettings.loadOptions.date;\r\n };\r\n\r\n $scope.$root.reportSettings.wrapReportSettings = function ()\r\n {\r\n $scope.reportSettings.saveOptions.controls = $scope.locationInfo.sideMenuData.warehousePrices;\r\n $scope.reportSettings.saveOptions.date = $scope.dateSelector;\r\n };\r\n })\r\n;","/**\r\n * Created by rhampton on 2/28/14.\r\n */\r\nangular.module('services.httpService', []);","/**\r\n * Created by rhampton on 6/17/2014.\r\n */\r\n\r\n\r\n/* ==============================================================================\r\n\r\n CORE.DIRECTIVES MODULE\r\n\r\n Defines the module namespace for the core.directives\r\n\r\n ============================================================================= */\r\nangular.module('core.directives', []);\r\n\r\n/* ==============================================================================\r\n\r\n Modal Dialog\r\n\r\n Shows and hides a modal dialog centered on the page.\r\n\r\n ============================================================================= */\r\nangular.module('core.directives')\r\n .directive('modalDialog', function ($rootScope)\r\n {\r\n return {\r\n restrict: 'E',\r\n scope: {\r\n show: '=',\r\n closeDialog: '&',\r\n closeText: '@',\r\n autoClose: '@'\r\n },\r\n replace: true, // Replace with the template below\r\n transclude: true, // we want to insert custom content inside the directive\r\n link: function (scope, element, attrs)\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty(attrs.autoClose))\r\n {\r\n attrs.autoClose = true;\r\n } else\r\n {\r\n attrs.autoClose = scope.$eval(attrs.autoClose);\r\n }\r\n\r\n scope.dialogStyle = {};\r\n if (attrs.width)\r\n scope.dialogStyle.width = attrs.width;\r\n if (attrs.height)\r\n scope.dialogStyle.height = attrs.height;\r\n\r\n\r\n },\r\n controller: function ($scope, $element, $attrs)\r\n {\r\n\r\n $scope.hideModal = function (source)\r\n {\r\n if ((source === 1) && (!$attrs.autoClose))\r\n {\r\n return;\r\n } // if clicked outside of modal and autoClose is set to false then don't close modal\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty($scope.closeDialog()))\r\n {\r\n $scope.closeDialog();\r\n }\r\n\r\n $scope.show = false;\r\n };\r\n },\r\n template: \"
    \"\r\n };\r\n })\r\n .directive('parseInt', [function ()\r\n {\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n link: function (scope, elem, attrs, controller)\r\n {\r\n controller.$formatters.push(function (modelValue)\r\n {\r\n return '' + modelValue;\r\n });\r\n\r\n controller.$parsers.push(function (viewValue)\r\n {\r\n return parseInt(viewValue, 10);\r\n });\r\n }\r\n };\r\n }])\r\n .directive('parseFloat', [function ()\r\n {\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n link: function (scope, elem, attrs, controller)\r\n {\r\n controller.$formatters.push(function (modelValue)\r\n {\r\n return '' + modelValue;\r\n });\r\n\r\n controller.$parsers.push(function (viewValue)\r\n {\r\n return parseFloat(viewValue);\r\n });\r\n }\r\n };\r\n }])\r\n .directive('parseDate', function ()\r\n {\r\n return {\r\n require: 'ngModel',\r\n link: function (scope, element, attr, ngModelCtrl)\r\n {\r\n function fromUser(text)\r\n {\r\n var transformedInput = text.replace(/[^0-9/]/, '');\r\n if (transformedInput !== text)\r\n {\r\n ngModelCtrl.$setViewValue(transformedInput);\r\n ngModelCtrl.$render();\r\n }\r\n return transformedInput;\r\n }\r\n\r\n ngModelCtrl.$parsers.push(fromUser);\r\n }\r\n };\r\n })\r\n .directive('dynamicHtml', function ($compile)\r\n {\r\n return {\r\n restrict: 'A',\r\n replace: true,\r\n link: function (scope, ele, attrs)\r\n {\r\n scope.$watch(attrs.dynamic, function (html)\r\n {\r\n ele.html(html);\r\n $compile(ele.contents())(scope);\r\n });\r\n }\r\n };\r\n })\r\n .directive('money', function ($filter)\r\n {\r\n 'use strict';\r\n var NUMBER_REGEXP = /^\\s*(\\-|\\+)?(\\d+|(\\d*(\\.\\d*)))\\s*$/;\r\n\r\n function link(scope, el, attrs, ngModelCtrl)\r\n {\r\n var min = parseFloat(attrs.min || 0);\r\n var precision = parseFloat(attrs.precision || 2);\r\n var symbol = attrs.symbol || '';\r\n var lastValidValue;\r\n\r\n function unFormatNumber(number)\r\n {\r\n number += '';\r\n\r\n if (number.toString().indexOf(',') > -1)\r\n {\r\n number = number.replace(/,/g, \"\");\r\n }\r\n if (number.toString().indexOf('$') > -1)\r\n {\r\n number = number.replace(/\\$/g, \"\");\r\n }\r\n if (number.length === 0)// || isNaN(number))\r\n return \"0\";\r\n return number;\r\n }\r\n\r\n function formatViewValue(value)\r\n {\r\n value = unFormatNumber(value);\r\n value = ngModelCtrl.$isEmpty(value) ? '' : '' + symbol + formatNumber(value, precision);\r\n lastValidValue = value;\r\n return value;\r\n }\r\n\r\n ngModelCtrl.$formatters.push(formatViewValue);\r\n\r\n function formatNumber(val, decimalPlaces)\r\n {\r\n val = unFormatNumber(val);\r\n val = parseFloat(val).toFixed(decimalPlaces);\r\n val = addCommas(val);\r\n return val;\r\n }\r\n\r\n function addCommas(nStr)\r\n {\r\n nStr += '';\r\n var x = nStr.split('.');\r\n var x1 = x[0];\r\n var x2 = x.length > 1 ? '.' + x[1] : '';\r\n var rgx = /(\\d+)(\\d{3})/;\r\n while (rgx.test(x1))\r\n {\r\n x1 = x1.replace(rgx, '$1' + ',' + '$2');\r\n }\r\n return x1 + x2;\r\n }\r\n\r\n ngModelCtrl.$parsers.push(function (value)\r\n {\r\n value = unFormatNumber(value);\r\n if (angular.isUndefined(value))\r\n {\r\n value = '';\r\n }\r\n // value = unFormatNumber(value);\r\n // Handle leading decimal point, like \".5\"\r\n if (value.indexOf('.') === 0)\r\n {\r\n value = '0' + value;\r\n }\r\n\r\n // Allow \"-\" inputs only when min < 0\r\n if (value.indexOf('-') === 0)\r\n {\r\n if (min >= 0)\r\n {\r\n value = null;\r\n ngModelCtrl.$setViewValue('');\r\n ngModelCtrl.$render();\r\n } else if (value === '-')\r\n {\r\n value = '';\r\n }\r\n }\r\n\r\n var empty = ngModelCtrl.$isEmpty(value);\r\n if (empty || NUMBER_REGEXP.test(value))\r\n {\r\n lastValidValue = (value === '') ? null : (empty ? value : parseFloat(value));\r\n } else\r\n {\r\n // Render the last valid input in the field\r\n ngModelCtrl.$setViewValue(formatViewValue(lastValidValue));\r\n ngModelCtrl.$render();\r\n }\r\n\r\n ngModelCtrl.$setValidity('number', true);\r\n return lastValidValue;\r\n });\r\n\r\n function applyFormat()\r\n {\r\n var value = unFormatNumber(ngModelCtrl.$modelValue);\r\n if (!isNaN(value))\r\n {\r\n ngModelCtrl.$viewValue = formatViewValue(value);\r\n lastValidValue = ngModelCtrl.$viewValue;\r\n ngModelCtrl.$render();\r\n }\r\n }\r\n\r\n el.bind('blur', applyFormat);\r\n el.bind('change', applyFormat);\r\n\r\n return applyFormat();\r\n }\r\n\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n link: link\r\n };\r\n })\r\n .directive('customAutofocus', function ()\r\n {\r\n return {\r\n restrict: 'A',\r\n link: function (scope, element, attrs)\r\n {\r\n scope.$watch(function ()\r\n {\r\n return scope.$eval(attrs.customAutofocus);\r\n }, function (newValue)\r\n {\r\n if (newValue === true)\r\n {\r\n element[0].select();\r\n element[0].focus();\r\n //use focus function instead of autofocus attribute to avoid cross browser problem.\r\n // And autofocus should only be used to mark an element to be focused when page loads.\r\n }\r\n });\r\n }\r\n };\r\n })\r\n .directive(\"toolTips\", function ($compile)\r\n {\r\n var clone = $compile('
    {{text}}
    ');\r\n\r\n function link(scope, el, attr)\r\n {\r\n if (scope.text && scope.text.length > 0)\r\n {\r\n el.qtip({\r\n position: {\r\n at: \"right middle\"\r\n },\r\n style: {\r\n tip: {\r\n corner: \"left top\"\r\n },\r\n classes: \"toolTipStyle\"\r\n },\r\n content: {\r\n text: function ()\r\n {\r\n return scope.$apply(function ()\r\n {\r\n return clone(scope);\r\n });\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n return {\r\n restrict: 'A',\r\n link: link,\r\n scope: {\r\n text: \"=toolTips\"\r\n }\r\n };\r\n })\r\n .directive('strength', ['$parse', function ($parse)\r\n {\r\n return {\r\n require: 'ngModel',\r\n restrict: 'A',\r\n scope: {\r\n passwordComplexity: \"=\",\r\n passwordMeterScore: \"=\"\r\n },\r\n link: function (scope, elem, attrs, ctrl)\r\n {\r\n ctrl.$parsers.unshift(function (viewValue)\r\n {\r\n var pwdValidLength, pwdHasLetter, pwdHasNumber, pwdHasSpecial;\r\n\r\n if (scope.passwordComplexity.EnforcePasswordComplexity)\r\n {\r\n pwdValidLength = (viewValue && viewValue.length >= scope.passwordComplexity.PasswordMinLength ? true : false);\r\n pwdHasLetter = (viewValue && (viewValue.match(/[A-Z]/g) && viewValue.match(/[A-Z]/g).length >= scope.passwordComplexity.PasswordMinUpperCase)) ? true : false;\r\n pwdHasNumber = (viewValue && (viewValue.match(/\\d/g) && viewValue.match(/\\d/g).length >= scope.passwordComplexity.PasswordMinNumbers)) ? true : false;\r\n pwdHasSpecial = (viewValue && (viewValue.match(/[^a-zA-Z0-9]/g) && viewValue.match(/[^a-zA-Z0-9]/g).length >= scope.passwordComplexity.PasswordMinUpperCase)) ? true : false;\r\n\r\n } else\r\n {\r\n pwdValidLength = (viewValue && viewValue.length >= 7 ? true : false);\r\n pwdHasLetter = (viewValue && /[A-Z]/.test(viewValue)) ? true : false;\r\n pwdHasNumber = (viewValue && /\\d/.test(viewValue)) ? true : false;\r\n pwdHasSpecial = (viewValue && /[^a-zA-Z0-9]/.test(viewValue)) ? true : false;\r\n }\r\n\r\n var score = +(viewValue.length) +\r\n (/[A-Z]/.test(viewValue) ? 1 : 0 ) +\r\n (/[a-z]/.test(viewValue) ? 1 : 0 ) +\r\n (/\\d/.test(viewValue) ? 1 : 0) +\r\n (/[^a-zA-Z0-9]/.test(viewValue) ? 1 : 0);\r\n\r\n var total = viewValue.length > 7 ? viewValue.length + 4 : 11;\r\n scope.passwordMeterScore = score / total;\r\n\r\n if (pwdValidLength && pwdHasLetter && pwdHasNumber && pwdHasSpecial)\r\n {\r\n ctrl.$setValidity('pwd', true);\r\n } else\r\n {\r\n ctrl.$setValidity('pwd', false);\r\n }\r\n return viewValue;\r\n });\r\n }\r\n };\r\n }])\r\n .directive('match', ['$parse', function ($parse)\r\n {\r\n return {\r\n require: 'ngModel',\r\n restrict: 'A',\r\n link: function (scope, elem, attrs, ctrl)\r\n {\r\n scope.$watch(function ()\r\n {\r\n return (ctrl.$pristine && angular.isUndefined(ctrl.$modelValue)) || $parse(attrs.match)(scope) === ctrl.$modelValue;\r\n }, function (currentValue)\r\n {\r\n ctrl.$setValidity('match', currentValue);\r\n });\r\n }\r\n };\r\n }])\r\n .directive('imageSlider', ['$interval', '$timeout', function ($interval, $timeout)\r\n {\r\n return {\r\n restrict: 'E',\r\n scope: {\r\n imageArray: '='\r\n },\r\n template: \"
    \",\r\n link: function (scope, elem, attrs, ctrl)\r\n {\r\n var start,\r\n stop,\r\n advance;\r\n\r\n // reverse thru the array and remove non-active images\r\n for (var i = scope.imageArray.length - 1; i >= 0; i--)\r\n {\r\n if (!scope.imageArray[i].Active)\r\n scope.imageArray.splice(i, 1);\r\n }\r\n\r\n scope.slider = {\"index\": 0};\r\n\r\n start = function ()\r\n {\r\n if (advance)\r\n return;\r\n\r\n advance = $interval(function ()\r\n {\r\n if (scope.slider.index === scope.imageArray.length - 1)\r\n scope.slider.index = 0;\r\n else\r\n ++scope.slider.index;\r\n }, 7000);\r\n };\r\n\r\n start();\r\n\r\n stop = function ()\r\n {\r\n if (advance)\r\n {\r\n $interval.cancel(advance);\r\n advance = undefined;\r\n }\r\n };\r\n\r\n scope.getPrevImage = function (index)\r\n {\r\n scope.pauseAutoAdvance();\r\n if (index === 0)\r\n scope.slider.index = scope.imageArray.length - 1;\r\n else\r\n scope.slider.index = index - 1;\r\n };\r\n\r\n scope.getNextImage = function (index)\r\n {\r\n scope.pauseAutoAdvance();\r\n if (index === scope.imageArray.length - 1)\r\n scope.slider.index = 0;\r\n else\r\n scope.slider.index = index + 1;\r\n };\r\n\r\n scope.pauseAutoAdvance = function ()\r\n {\r\n if (advance)\r\n {\r\n stop();\r\n $timeout(start, 20000);\r\n }\r\n };\r\n\r\n scope.$on('$destroy', function ()\r\n {\r\n stop();\r\n }\r\n );\r\n\r\n }\r\n };\r\n }])\r\n .directive('alphaNumeric', function ()\r\n {\r\n return {\r\n require: 'ngModel',\r\n link: function (scope, element, attrs, modelCtrl)\r\n {\r\n modelCtrl.$parsers.push(function (inputValue)\r\n {\r\n // this next if is necessary for when using ng-required on your input.\r\n // In such cases, when a letter is typed first, this parser will be called\r\n // again, and the 2nd time, the value will be undefined\r\n if (inputValue === undefined) return '';\r\n var transformedInput = attrs.alphaNumeric === '0' ? inputValue.replace(/[^0-9]/g, '') : inputValue.replace(/[^a-zA-Z0-9]/g, '');\r\n if (transformedInput !== inputValue)\r\n {\r\n modelCtrl.$setViewValue(transformedInput);\r\n modelCtrl.$render();\r\n }\r\n\r\n return transformedInput;\r\n });\r\n }\r\n };\r\n })\r\n .directive('autoresize', function ($window)\r\n {\r\n return function ($scope)\r\n {\r\n $scope.initializeWindowSize = function ()\r\n {\r\n $scope.maxHeight = Math.max(\r\n document.body.scrollHeight, document.documentElement.scrollHeight,\r\n document.body.offsetHeight, document.documentElement.offsetHeight,\r\n document.body.clientHeight, document.documentElement.clientHeight,\r\n window.innerHeight\r\n );\r\n $scope.windowHeight = $window.innerHeight;\r\n return $scope.windowWidth = $window.innerWidth;\r\n };\r\n $scope.initializeWindowSize();\r\n $scope.$watch('__height', function (newHeight, oldHeight)\r\n {\r\n $scope.initializeWindowSize();\r\n });\r\n return angular.element($window).bind('resize', function ()\r\n {\r\n $scope.initializeWindowSize();\r\n return $scope.$apply();\r\n });\r\n };\r\n })\r\n .directive('customContent', function ($compile)\r\n {\r\n return function (scope, el, attrs)\r\n {\r\n el.replaceWith($compile(attrs.html)(scope));\r\n };\r\n })\r\n .directive('onCloseFn', function ()\r\n {\r\n /*\r\n on-close-fn=\"myClosingActions()\"\r\n on-close-message='Thanks for visiting out site.'\r\n\r\n $scope.myClosingActions returns: true to display the stock browser 'Leaving Page' with your message,\r\n false displays nothing\r\n */\r\n return {\r\n scope: {\r\n onCloseFn: '&',\r\n onCloseMessage: '@'\r\n },\r\n link: function ($scope, elem, attrs)\r\n {\r\n window.onbeforeunload = function ()\r\n {\r\n if ($scope.onCloseFn())\r\n {\r\n return $scope.onCloseMessage || ' ';\r\n }\r\n };\r\n\r\n $scope.$on('$destroy', function ()\r\n {\r\n window.onbeforeunload = null;\r\n });\r\n }\r\n };\r\n })\r\n .directive('onLeaveFn', function ()\r\n {\r\n /*\r\n on-leave-fn=\"myClosingActions()\"\r\n on-leave-message='You have unsaved changes. Leaving the page will result in data lose.'\r\n\r\n $scope.myClosingActions returns: true to display the stock browser 'Leaving Page' with your message,\r\n false displays nothing\r\n */\r\n return {\r\n scope: {\r\n onLeaveIfFn: '&',\r\n onLeaveMessage: '@'\r\n },\r\n link: function ($scope, elem, attrs)\r\n {\r\n\r\n var $locationChangeStartUnbind = $scope.$on('$locationChangeStart', function (event, next, current)\r\n {\r\n if ($scope.onLeaveIfFn())\r\n {\r\n if (!confirm($scope.onLeaveMessage || 'Leave this page?'))\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n });\r\n\r\n $scope.$on('$destroy', function ()\r\n {\r\n $locationChangeStartUnbind();\r\n });\r\n }\r\n };\r\n })\r\n .directive('promptToSave', ['$timeout', function ($timeout)\r\n {\r\n return {\r\n link: function ($scope, elem, attrs, ctrl)\r\n {\r\n var menu = $scope.locationInfo.menuLocation,\r\n subMenu = $scope.locationInfo.subMenuLocation,\r\n sideMenu = $scope.locationInfo.sideMenuData.subMenu;\r\n\r\n $scope.$cancelPromptToSave = $scope.$on('$locationChangeStart', function (event, next, current)\r\n {\r\n var result = elem.find(\".ng-dirty:not(form)\").length + elem.find(\".k-dirty-cell\").length + elem.find(\".k-dirty\").length;\r\n\r\n if (result > 0)\r\n {\r\n var confirmPopUpText = \"This page may have unsaved changes.\\n\\nContinue without saving?\";\r\n if ($scope.localizationFilesInitialized)\r\n {\r\n var localizedString = $scope.pnLocalizationCtrl.localizations.getCachedLocalizationsContainer(\"AppLocalization\");\r\n confirmPopUpText = localizedString.stringFromCharacterEntity(localizedString.getLocalizedString(\"UnsavedChanges\") + \"\\n\\n\" + localizedString.getLocalizedString(\"ContinueWithoutSaving\"));\r\n }\r\n\r\n var response = confirm(confirmPopUpText);\r\n\r\n if (!response)\r\n {\r\n event.preventDefault();\r\n $scope.locationInfo.menuLocation = menu;\r\n $scope.locationInfo.subMenuLocation = subMenu;\r\n if ($scope.locationInfo.sideMenuData.pendingNav)\r\n $timeout.cancel($scope.locationInfo.sideMenuData.pendingNav);\r\n $scope.locationInfo.sideMenuData.subMenu = sideMenu;\r\n }\r\n }\r\n });\r\n\r\n $scope.$on('$destroy', function ()\r\n {\r\n $scope.$cancelPromptToSave();\r\n });\r\n }\r\n };\r\n }])\r\n .directive('processingOverlay', function ($rootScope, $window, $timeout)\r\n {\r\n return {\r\n restrict: 'EA',\r\n replace: true,\r\n link: function (scope, element, attrs)\r\n {\r\n var overlayContainer = document.getElementById('processingOverlay');\r\n overlayContainer.style.width = '994px';\r\n\r\n var mainContent = document.getElementsByClassName(\"main-content\")[0];\r\n\r\n $rootScope.$watch('mainContent.clientHeight', function ()\r\n {\r\n setHeight();\r\n });\r\n\r\n $rootScope.$watch('showLoader', function (show)\r\n {\r\n if (show)\r\n {\r\n overlayContainer.style.display = 'block';\r\n $timeout(function ()\r\n {\r\n setHeight();\r\n });\r\n }\r\n else\r\n {\r\n overlayContainer.style.display = 'none';\r\n }\r\n });\r\n\r\n function setHeight()\r\n {\r\n $(\"#processingOverlay\").height(mainContent.clientHeight);\r\n }\r\n },\r\n template: '
    '\r\n\r\n\r\n };\r\n })\r\n .directive('postRender', ['$timeout', function ($timeout) {\r\n // Use this directive when you need to reliably call a function after the element renders\r\n return {\r\n scope: {\r\n postRender: '&'\r\n },\r\n restrict: 'A',\r\n terminal: true,\r\n transclude: true,\r\n link: function (scope, element, attrs) {\r\n $timeout(scope.postRender, 0);\r\n }\r\n };\r\n }])\r\n .directive('pdiPaperworkPrompt', ['$rootScope', '$timeout', 'validatorSvc',\r\n function($rootScope, $timeout, validatorSvc) {\r\n return {\r\n require: 'form',\r\n restrict: 'A',\r\n link: function($scope, element, attrs) {\r\n\r\n var localizedString = $scope.pnLocalizationCtrl.localizations.getCachedLocalizationsContainer(\"AppLocalization\");\r\n var paperworkLocalizedString = $scope.pnLocalizationCtrl.localizations.getCachedLocalizationsContainer(\"PaperworkLocalization\");\r\n\r\n var confirmPopUpText = localizedString.getLocalizedString(\"SaveCurrentRecord\");\r\n var submitPopUpText = paperworkLocalizedString.getLocalizedString(\"CloseSubmitPaperwork\");\r\n\r\n var currentMenu = $scope.locationInfo.menuLocation;\r\n var currentSubMenu = $scope.locationInfo.subMenuLocation;\r\n var currentSideMenu = $scope.locationInfo.sideMenuData.subMenu;\r\n\r\n var counter = 0;\r\n\r\n var $locationChangeStartUnbind = $scope.$on('$locationChangeStart', function (event, next, current)\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty($scope.appInfo.paperwork)) { return; }\r\n if ($rootScope.loggingOut) { return; }\r\n if ($scope.submitClicked) { return; }\r\n\r\n counter++;\r\n\r\n // If the submit fails this will continuously run without the counter and the prompt won't close.\r\n if (counter > 1) { return; }\r\n\r\n // Just leave if we are viewOnly\r\n if ($scope.appInfo.paperwork.viewOnly) { return; }\r\n\r\n var result = findDirtyElements(element);\r\n let formName = attrs.name;\r\n let nextPath = parsePath(next);\r\n let submit = false;\r\n\r\n if (!nextPath.includes('EnterPaperwork')) {\r\n submit = true;\r\n }\r\n \r\n var yesFN = () => { yes(formName, nextPath, submit); };\r\n\r\n var noFN = () => { no(formName, nextPath); }; \r\n\r\n if (result > 0 || submit)\r\n {\r\n event.preventDefault();\r\n \r\n if (!submit) {\r\n $scope.modalifier.confirm(confirmPopUpText, yesFN, noFN);\r\n } else {\r\n $scope.modalifier.confirm(submitPopUpText, yesFN, noFN);\r\n }\r\n }\r\n });\r\n\r\n $scope.$on('$destroy', $locationChangeStartUnbind);\r\n\r\n function navigate(path, isValid) {\r\n parseMenuLocation(path, isValid);\r\n if (!isValid) return;\r\n $scope.goTo(path);\r\n }\r\n\r\n function localResetDirtyFlags(form) {\r\n form.$setPristine();\r\n $('.k-dirty').removeClass('k-dirty');\r\n $('.k-dirty-cell').removeClass('k-dirty-cell');\r\n }\r\n\r\n function parsePath(path) {\r\n let nextPathIndex = path.indexOf('#');\r\n if (nextPathIndex !== -1) {\r\n let nextPath = path.substring(nextPathIndex + 1); // +1 to exclude the index itself \r\n return nextPath;\r\n } else {\r\n return '/Home';\r\n }\r\n }\r\n\r\n // If we are navigating to a different page, we need to update the menu location\r\n // If we are staying in paperwork and going to the reports submenu then set the subMenuLocation\r\n function parseMenuLocation(path, isValid) {\r\n if (!isValid) {\r\n $scope.locationInfo.menuLocation = currentMenu;\r\n $scope.locationInfo.subMenuLocation = currentSubMenu;\r\n if ($scope.locationInfo.sideMenuData.pendingNav)\r\n $timeout.cancel($scope.locationInfo.sideMenuData.pendingNav);\r\n $scope.locationInfo.sideMenuData.subMenu = currentSideMenu;\r\n return;\r\n }\r\n if (path.includes('Home')) {\r\n $scope.locationInfo.menuLocation = 0;\r\n $scope.locationInfo.subMenuLocation = -1;\r\n } \r\n if (path.includes('Account')) {\r\n $scope.locationInfo.menuLocation = 1;\r\n $scope.locationInfo.subMenuLocation = -1;\r\n } \r\n if (path.includes('Orders')) {\r\n $scope.locationInfo.menuLocation = 2;\r\n $scope.locationInfo.subMenuLocation = -1;\r\n } \r\n if (path.includes('Paperwork')) {\r\n $scope.locationInfo.menuLocation = 3;\r\n if (path.includes('Reports')) {\r\n $scope.locationInfo.subMenuLocation = 31; // Paperwork Reports\r\n }\r\n }\r\n if (path.includes('FuelCards')) {\r\n $scope.locationInfo.menuLocation = 4;\r\n $scope.locationInfo.subMenuLocation = -1;\r\n }\r\n if (path.includes('Documents')) {\r\n $scope.locationInfo.menuLocation = 6;\r\n $scope.locationInfo.subMenuLocation = -1;\r\n }\r\n if (path.includes('Pages')) {\r\n $scope.locationInfo.menuLocation = 7;\r\n $scope.locationInfo.subMenuLocation = -1;\r\n }\r\n }\r\n\r\n function yes (formName, nextPath, submit) {\r\n let isValid = true;\r\n \r\n switch(formName) {\r\n case 'metersForm':\r\n if (!validatorSvc.executeValidations() || !$scope.validateMeters())\r\n {\r\n isValid = false;\r\n }\r\n $scope.saveMeters(\"\", submit, false, false, submit);\r\n break;\r\n case 'appInfo.paperwork.deliveries.appForm':\r\n if ($scope.currentView === 0 || $(\"#appForm\").hasClass(\"ng-pristine\"))\r\n { // if in record selector just submit\r\n $scope.submitPaperwork(true, true);\r\n } else {\r\n if (!validatorSvc.executeValidations() || !$scope.validateDeliveries())\r\n {\r\n isValid = false;\r\n }\r\n $scope.savePaperworkDelivery(\"\", submit, false, false, submit);\r\n }\r\n break;\r\n case 'tanksForm':\r\n if (!$scope.validateTanks()) {\r\n isValid = false;\r\n } else {\r\n if ($scope.tankCommentIsRequired) {\r\n isValid = $scope.tankCommentValidation.validatorError();\r\n }\r\n }\r\n $scope.savePaperworkTanks(\"\", submit, false, false, submit);\r\n break;\r\n case 'dealerFormsForm':\r\n $scope.saveDealerForms(\"\", submit, false, false, submit);\r\n break;\r\n default:\r\n break;\r\n }\r\n if (nextPath)\r\n {\r\n $timeout(function () {\r\n navigate(nextPath, isValid);\r\n }, 250);\r\n }\r\n }\r\n\r\n function no (formName, nextPath) {\r\n switch(formName) {\r\n case 'metersForm':\r\n localResetDirtyFlags($scope.metersForm);\r\n break;\r\n case 'appInfo.paperwork.deliveries.appForm':\r\n localResetDirtyFlags($scope.appInfo.paperwork.deliveries.appForm);\r\n break;\r\n case 'tanksForm':\r\n localResetDirtyFlags($scope.tanksForm);\r\n break;\r\n case 'dealerFormsForm':\r\n localResetDirtyFlags($scope.dealerFormsForm);\r\n break;\r\n default:\r\n return;\r\n }\r\n if (nextPath) {\r\n $timeout(function () {\r\n navigate(nextPath, true);\r\n }, 0);\r\n }\r\n }\r\n\r\n function findDirtyElements(element) {\r\n return element.find(\".ng-dirty:not(form)\").length + element.find(\".k-dirty-cell\").length + element.find(\".k-dirty\").length;\r\n }\r\n }\r\n };\r\n }]);","\r\nangular.module('pdi.extensions', [])\r\n .factory('dateTimeFormatPatterns', function() {\r\n 'use strict';\r\n\r\n function formatForCulture(type, formatType) {\r\n\r\n var formatStr = '';\r\n\r\n if (formatType === 1) //kendo\r\n {\r\n if (type === 0) { //date\r\n\r\n formatStr = \"mm/dd/yyyy\";\r\n\r\n } else if (type === 1) { //time\r\n\r\n formatStr = \"hh:mm t\";\r\n\r\n } else { //date and time\r\n\r\n formatStr = \"mm/dd/yyyy hh:mm t\";\r\n }\r\n } else if (formatType === 2) { //input mask\r\n if (type === 0) { //date\r\n\r\n formatStr = \"m/d/yyyy\";\r\n\r\n } else if (type === 1) { //time\r\n\r\n formatStr = \"hh:mm t\";\r\n\r\n } else { //date and time\r\n\r\n formatStr = \"datetime12us\";\r\n }\r\n } else {\r\n if (type === 0) { //date\r\n\r\n formatStr = \"MM/dd/yyyy\";\r\n\r\n } else if (type === 1) { //time\r\n\r\n formatStr = \"HH:mm a\";\r\n\r\n } else { //date and time\r\n\r\n formatStr = \"MM/dd/yyyy hh:mm a\";\r\n }\r\n\r\n }\r\n\r\n return formatStr;\r\n }\r\n\r\n return {\r\n kendoDateFormat: formatForCulture(0, 1),\r\n kendoTimeFormat: formatForCulture(1, 1),\r\n kendoDateTimeFormat: formatForCulture(2, 1),\r\n inputMaskDateFormat: formatForCulture(0, 2),\r\n inputMaskTimeFormat: formatForCulture(1, 2),\r\n inputMaskDateTimeFormat: formatForCulture(2, 2),\r\n dateFormat: formatForCulture(0, 0),\r\n timeFormat: formatForCulture(1, 0),\r\n dateTimeFormat: formatForCulture(2,0)\r\n };\r\n })\r\n\r\n .directive('kendoDatePicker', [\r\n '$timeout', 'dateTimeFormatPatterns', function($timeout, dateTimeFormatPatterns) {\r\n 'use strict';\r\n\r\n return {\r\n restrict: 'A',\r\n require: '?ngModel',\r\n link: function(scope, element, attrs, ctrl) {\r\n\r\n var ntbCtrl;\r\n\r\n $timeout(function() {\r\n ntbCtrl = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n if (ntbCtrl !== undefined) {\r\n ntbCtrl.format = dateTimeFormatPatterns.kendoDateFormat;\r\n $(element).inputmask(dateTimeFormatPatterns.inputMaskDateFormat, { clearMaskOnLostFocus: false });\r\n }\r\n\r\n },300);\r\n\r\n }\r\n };\r\n\r\n }\r\n ])\r\n\r\n .directive('kendoDateTimePicker', [\r\n '$timeout', 'dateTimeFormatPatterns', function($timeout, dateTimeFormatPatterns) {\r\n 'use strict';\r\n\r\n return {\r\n restrict: 'A',\r\n require: '?ngModel',\r\n link: function(scope, element, attrs, ctrl) {\r\n\r\n var ntbCtrl;\r\n\r\n $timeout(function() {\r\n ntbCtrl = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n if (ntbCtrl !== undefined) {\r\n ntbCtrl.format = dateTimeFormatPatterns.kendoDateTimeFormat;\r\n $(element).inputmask(dateTimeFormatPatterns.inputMaskDateTimeFormat, { clearMaskOnLostFocus: false });\r\n }\r\n },300);\r\n\r\n }\r\n };\r\n\r\n }\r\n ])\r\n\r\n .directive('kendoTimePicker', [\r\n '$timeout', 'dateTimeFormatPatterns', function($timeout, dateTimeFormatPatterns) {\r\n 'use strict';\r\n\r\n return {\r\n restrict: 'A',\r\n require: '?ngModel',\r\n link: function(scope, element, attrs, ctrl) {\r\n\r\n var ntbCtrl;\r\n\r\n $timeout(function() {\r\n ntbCtrl = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n if (ntbCtrl !== undefined) {\r\n ntbCtrl.format = dateTimeFormatPatterns.kendoTimeFormat;\r\n $(element).inputmask(dateTimeFormatPatterns.inputMaskTimeFormat, { clearMaskOnLostFocus: false });\r\n }\r\n },300);\r\n }\r\n };\r\n\r\n }\r\n ]);\r\n\r\n\r\n ","// pdi.ng namespace setup\r\nvar pdi = pdi || {};\r\npdi.ng = pdi.ng || {};\r\npdi.ng.validate = pdi.ng.validate || {};\r\n\r\n//***************************************************************************************\r\n// helper functions\r\n//***************************************************************************************\r\n\r\nangular.isUndefinedOrNullOrEmpty = function(val) {\r\n 'use strict';\r\n return (angular.isUndefined(val) || val === null || val === '' || val.length === 0);\r\n};\r\n\r\nString.format = function () {\r\n 'use strict';\r\n\r\n // The string containing the format items (e.g. \"{0}\")\r\n // will and always has to be the first argument.\r\n // analogous to the C# String.format function\r\n var theString = arguments[0];\r\n\r\n if (angular.isUndefined(theString)) return;\r\n\r\n // start with the second argument (i = 1)\r\n for (var i = 1; i < arguments.length; i++) {\r\n // \"gm\" = RegEx options for Global search (more than one instance)\r\n // and for Multiline search\r\n var regEx = new RegExp(\"\\\\{\" + (i - 1) + \"\\\\}\", \"gm\");\r\n theString = theString.replace(regEx, arguments[i]);\r\n }\r\n\r\n return theString;\r\n};\r\n\r\nfunction toBoolean(value) {\r\n 'use strict';\r\n if (typeof value === 'function' || angular.isUndefined(value)) {\r\n value = true;\r\n } else if (value && value.length !== 0) {\r\n var v = angular.$$lowercase(\"\" + value);\r\n value = !(v === 'f' || v === '0' || v === 'false' || v === 'no' || v === 'n' || v === '[]');\r\n } else {\r\n value = false;\r\n }\r\n return value;\r\n}\r\n\r\npdi.ng.validate.PdiValidation =\r\n function (validation, parms) {\r\n 'use strict';\r\n return function() {\r\n return {\r\n name: validation.name,\r\n validatorParms: parms || {},\r\n validationMessage: validation.validationMessage || 'Error: Validation message is not defined for ' + validation.name,\r\n validatorError: validation.validatorError,\r\n validationMessageWrn: validation.validationMessageWrn || 'Error: Validation message is not defined for ' + validation.name,\r\n validatorWarning: validation.validatorWarning,\r\n executionExplicit: validation.executionExplicit || true // if true then the validation is not executed on model value changed and must be explicitly executed through 'executeValidations' broadcast\r\n };\r\n };\r\n };\r\n\r\n//validation UI default functions\r\npdi.ng.validate.processElementErrorNotification = function(validationAttr, hasError, element, attrs) {\r\n 'use strict';\r\n\r\n if (attrs.ngModel === undefined) { return; }\r\n\r\n var propertyName = attrs.ngModel.split('.').join('-');\r\n\r\n var validationValidationMsg = $('#' + validationAttr + '-' + propertyName);\r\n\r\n function errFocusHdlr() {\r\n $(\"#error-\" + validationAttr + \"-\" + propertyName).attr('style', 'display: inline-block !important;');\r\n }\r\n\r\n function errBlurHdlr() {\r\n $(\"#error-\" + validationAttr + \"-\" + propertyName).attr('style', 'display: none !important;');\r\n }\r\n\r\n function errClickHdlr() {\r\n $(\"#error-\" + validationAttr + \"-\" + propertyName).attr('style', 'display: inline-block !important;');\r\n\r\n function hideError() {\r\n $(\"#error-\" + validationAttr + \"-\" + propertyName).attr('style', 'display: none !important;');\r\n }\r\n\r\n setTimeout(hideError, 3000);\r\n }\r\n\r\n validationValidationMsg.toggle(hasError);\r\n\r\n var kendoDropDwnElm;\r\n var currentElement = $(element);\r\n\r\n if (hasError) {\r\n element.addClass(\"validation-error\");\r\n validationValidationMsg.attr('style', 'display: inline-block !important;');\r\n\r\n if (currentElement.data(\"kendoComboBox\")) {\r\n //var kendoDropDwnElm = angular.element(element[0].previousSibling.firstChild); // input element of kendo combobox with class k-input\r\n kendoDropDwnElm = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n kendoDropDwnElm.input.bind(\"focus\", errFocusHdlr);\r\n kendoDropDwnElm.input.bind(\"blur\", errBlurHdlr);\r\n\r\n } else if (currentElement.data(\"kendoDropDownList\")) {\r\n kendoDropDwnElm = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n kendoDropDwnElm.span.bind(\"click\", errClickHdlr);\r\n\r\n } else {\r\n element.bind(\"focus\", errFocusHdlr);\r\n element.bind(\"blur\", errBlurHdlr);\r\n }\r\n\r\n } else {\r\n\r\n element.removeClass(\"validation-error\");\r\n validationValidationMsg.attr('style', 'display: none !important;');\r\n\r\n if (currentElement.data(\"kendoComboBox\")) {\r\n\r\n kendoDropDwnElm = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n kendoDropDwnElm.input.unbind(\"focus\", errFocusHdlr);\r\n kendoDropDwnElm.input.unbind(\"blur\", errBlurHdlr);\r\n\r\n } else if (currentElement.data(\"kendoDropDownList\")) {\r\n kendoDropDwnElm = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n kendoDropDwnElm.span.unbind(\"click\", errClickHdlr);\r\n\r\n } else {\r\n element.unbind(\"focus\", errFocusHdlr);\r\n element.unbind(\"blur\", errBlurHdlr);\r\n }\r\n }\r\n\r\n return;\r\n};\r\n\r\npdi.ng.validate.processElementWarningNotification = function(validationAttr, hasWarning, element, attrs) {\r\n 'use strict';\r\n\r\n if (attrs.ngModel === undefined) { return; }\r\n\r\n var propertyName = attrs.ngModel.split('.').join('-');\r\n\r\n var validationValidationMsg = $('#' + validationAttr + '-' + propertyName + '-wrn');\r\n\r\n function wrnFocusHdlr() {\r\n $(\"#warning-\" + validationAttr + \"-\" + propertyName).attr('style', 'display: inline-block !important;');\r\n }\r\n\r\n function wrnBlurHdlr() {\r\n $(\"#warning-\" + validationAttr + \"-\" + propertyName).attr('style', 'display: none !important;');\r\n }\r\n\r\n var currentElement = $(element);\r\n\r\n if (hasWarning) {\r\n element.addClass(\"validation-warning\");\r\n validationValidationMsg.attr('style', 'display: inline-block !important;');\r\n\r\n if ((currentElement.data(\"kendoComboBox\")) || (currentElement.data(\"kendoDropDownList\"))) {\r\n var kendoDropDwnElm = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n kendoDropDwnElm.input.bind(\"focus\", wrnFocusHdlr);\r\n kendoDropDwnElm.input.bind(\"blur\", wrnBlurHdlr);\r\n } else {\r\n element.bind(\"focus\", wrnFocusHdlr);\r\n element.bind(\"blur\", wrnBlurHdlr);\r\n }\r\n\r\n\r\n } else {\r\n\r\n element.removeClass(\"validation-warning\");\r\n validationValidationMsg.attr('style', 'display: none !important;');\r\n\r\n if ((currentElement.data(\"kendoComboBox\")) || (currentElement.data(\"kendoDropDownList\"))) {\r\n var kendoDropDwnElm1 = kendo.widgetInstance($(element[0]), kendo.ui);\r\n\r\n kendoDropDwnElm1.input.unbind(\"focus\", wrnFocusHdlr);\r\n kendoDropDwnElm1.input.unbind(\"blur\", wrnBlurHdlr);\r\n } else {\r\n element.unbind(\"focus\", wrnFocusHdlr);\r\n element.unbind(\"blur\", wrnBlurHdlr);\r\n }\r\n }\r\n\r\n return;\r\n};\r\n\r\npdi.ng.validate.processValidationNotification = function(element, attrs, compile, scope) {\r\n 'use strict';\r\n\r\n element.removeClass(\"summaryerror\");\r\n element.removeClass(\"summarywarning\");\r\n element.removeClass(\"gridvalidationsummary\");\r\n\r\n var output = \"\";\r\n function returnOutput(){\r\n return output;\r\n }\r\n\r\n if (scope.scopeValidationErrors.length > 0) {\r\n\r\n for (var i = 0; i <= scope.scopeValidationErrors.length - 1; i++) {\r\n\r\n if (attrs.name === scope.scopeValidationErrors[i].name) {\r\n element.addClass(\"gridvalidationsummary\");\r\n element.addClass(\"summaryerror\");\r\n\r\n var validationErr = scope.scopeValidationErrors[i];\r\n output += \"
    \" + validationErr.msg + \"
    \";\r\n\r\n element.qtip({\r\n content: returnOutput(),\r\n position: {\r\n viewport: $(window),\r\n my: 'left center',\r\n at: 'top right',\r\n collision: 'fit flip',\r\n adjust: { y: 7, screen: true }\r\n },\r\n show: { delay: 0 },\r\n hide: { fixed: true },\r\n style: { classes: 'ui-tooltip-pdiError' }\r\n });\r\n }\r\n }\r\n\r\n\r\n\r\n }\r\n else if (scope.scopeValidationWarnings.length > 0) {\r\n\r\n for (var x = 0; x <= scope.scopeValidationWarnings.length - 1; x++) {\r\n\r\n if (attrs.name === scope.scopeValidationWarnings[x].name) {\r\n\r\n element.addClass(\"gridvalidationsummary\");\r\n element.addClass(\"summarywarning\");\r\n\r\n var validationWrn = scope.scopeValidationWarnings[x];\r\n output += \"
    \" + validationWrn.msg + \"
    \";\r\n\r\n element.qtip({\r\n content: returnOutput(),\r\n position: {\r\n viewport: $(window),\r\n my: 'left center',\r\n at: 'top right',\r\n collision: 'fit flip',\r\n adjust: { y: 7, screen: true }\r\n },\r\n show: { delay: 0 },\r\n hide: { fixed: true },\r\n style: { classes: 'ui-tooltip-pdiWarning' }\r\n });\r\n }\r\n }\r\n }\r\n\r\n compile(element)(scope);\r\n\r\n return;\r\n};\r\n\r\npdi.ng.validate.processValidationsSummaryNotification = function(element, attrs, compile, scope) {\r\n 'use strict';\r\n\r\n element.removeClass(\"summaryerror\");\r\n element.removeClass(\"summarywarning\");\r\n element.removeClass(\"gridvalidationsummary\");\r\n\r\n if (scope.scopeValidationErrors.length > 0) {\r\n element.addClass(\"gridvalidationsummary\");\r\n element.addClass(\"summaryerror\");\r\n\r\n element.qtip({\r\n content: function() {\r\n var output = \"\";\r\n\r\n for (var i = 0; i <= scope.scopeValidationErrors.length - 1; i++) {\r\n\r\n var validationErr = scope.scopeValidationErrors[i];\r\n\r\n output += \"
    \" + validationErr.msg + \"
    \";\r\n\r\n }\r\n\r\n return output;\r\n },\r\n position: {\r\n viewport: $(window),\r\n my: 'left center',\r\n at: 'top right',\r\n collision: 'fit flip',\r\n adjust: { y: 7, screen: true }\r\n },\r\n show: { delay: 0 },\r\n hide: { fixed: true },\r\n style: { classes: 'ui-tooltip-pdiError' }\r\n });\r\n\r\n }\r\n else if (scope.scopeValidationWarnings.length > 0) {\r\n element.addClass(\"gridvalidationsummary\");\r\n element.addClass(\"summarywarning\");\r\n\r\n element.qtip({\r\n content: function() {\r\n var output = \"\";\r\n\r\n for (var i = 0; i <= scope.scopeValidationWarnings.length - 1; i++) {\r\n\r\n var validationWrn = scope.scopeValidationWarnings[i];\r\n\r\n output += \"
    \" + validationWrn.msg + \"
    \";\r\n\r\n }\r\n\r\n return output;\r\n },\r\n position: {\r\n viewport: $(window),\r\n my: 'left center',\r\n at: 'top right',\r\n collision: 'fit flip',\r\n adjust: { y: 7, screen: true }\r\n },\r\n show: { delay: 0 },\r\n hide: { fixed: true },\r\n style: { classes: 'ui-tooltip-pdiWarning' }\r\n });\r\n }\r\n\r\n compile(element)(scope);\r\n\r\n return;\r\n};\r\n\r\npdi.ng.validate.createElementValidationMessageError = function(validationAttr, validationMsg, element, attrs, scope, compile) {\r\n 'use strict';\r\n\r\n var propertyName = attrs.ngModel.split('.').join('-');\r\n var currentElement = $(element);\r\n\r\n var validationMessageElement = angular.element(\r\n '
    ' +\r\n '
      ' +\r\n '
    • ' + validationMsg + '
    • ' +\r\n '
    ');\r\n if (currentElement.data(\"kendoComboBox\")) {\r\n element.after(validationMessageElement);\r\n } else if (currentElement.data(\"kendoDropDownList\")) {\r\n $(element[0]).parent().after(validationMessageElement);\r\n } else if (currentElement.data(\"kendoDatePicker\")) {\r\n $(element[0]).closest(\".k-datepicker\").after(validationMessageElement);\r\n } else if (currentElement.data(\"kendoDateTimePicker\")) {\r\n $(element[0]).closest(\".k-datetimepicker\").after(validationMessageElement);\r\n } else {\r\n //check to see if element has a clear button to clear contents\r\n // if so add error after clear button instead of element\r\n var clearBtnElm = element.siblings(\".clear-input-button\");\r\n if (clearBtnElm.length > 0) {\r\n clearBtnElm.after(validationMessageElement);\r\n } else {\r\n element.after(validationMessageElement);\r\n }\r\n }\r\n compile(validationMessageElement)(scope);\r\n validationMessageElement.hide();\r\n\r\n return;\r\n};\r\n\r\npdi.ng.validate.createElementValidationMessageWarning = function (validationAttr, validationMsg, element, attrs, scope, compile) {\r\n 'use strict';\r\n\r\n var propertyName = attrs.ngModel.split('.').join('-');\r\n var currentElement = $(element);\r\n\r\n var validationMessageElement = angular.element(\r\n '
    ' +\r\n '
      ' +\r\n '
    • ' + validationMsg + '
    • ' +\r\n '
    ');\r\n\r\n if (currentElement.data(\"kendoComboBox\")) {\r\n element.after(validationMessageElement);\r\n } else if (currentElement.data(\"kendoDropDownList\")) {\r\n $(element[0]).parent().after(validationMessageElement);\r\n } else if (currentElement.data(\"kendoDatePicker\")) {\r\n $(element[0]).closest(\".k-datepicker\").after(validationMessageElement);\r\n } else if (currentElement.data(\"kendoDateTimePicker\")) {\r\n $(element[0]).closest(\".k-datetimepicker\").after(validationMessageElement);\r\n } else {\r\n //check to see if element has a clear button to clear contents\r\n // if so add error after clear button instead of element\r\n var clearBtnElm = element.siblings(\".clear-input-button\");\r\n if (clearBtnElm.length > 0) {\r\n clearBtnElm.after(validationMessageElement);\r\n } else {\r\n element.after(validationMessageElement);\r\n }\r\n }\r\n compile(validationMessageElement)(scope);\r\n validationMessageElement.hide();\r\n\r\n return;\r\n};\r\n\r\npdi.ng.validate.removeElementValidationMessage = function(element, attrs, scope, compile) {\r\n 'use strict';\r\n\r\n var currentElement = $(element);\r\n\r\n if (element.hasClass('summaryerror')) {\r\n element.removeClass(\"summaryerror\");\r\n element.removeClass(\"summarywarning\");\r\n element.removeClass(\"gridvalidationsummary\");\r\n }\r\n\r\n if (currentElement.data(\"kendoDropDownList\")) {\r\n element.parent().siblings().each(function() {\r\n var $this = $(this);\r\n\r\n if ($this.hasClass('validationBar')) {\r\n $this.remove();\r\n }\r\n\r\n compile()(scope);\r\n });\r\n } else {\r\n element.parent().children().each(function() {\r\n var $this = $(this);\r\n\r\n if ($this.hasClass('validationBar')) {\r\n $this.remove();\r\n }\r\n\r\n compile()(scope);\r\n });\r\n }\r\n\r\n return;\r\n};\r\n\r\n//pdi validation defaults\r\n\r\npdi.ng.validate.requiredMsgDefault = '';\r\npdi.ng.validate.minLengthMsgDefault = '';\r\npdi.ng.validate.maxLengthMsgDefault = '';\r\npdi.ng.validate.valueRuleRngMsgDefault = '';\r\npdi.ng.validate.valueRuleGtMsgDefault = '';\r\npdi.ng.validate.valueRuleLtMsgDefault = '';\r\npdi.ng.validate.ptrnEmailMsgDefault = '';\r\n\r\nvar pdiRequiredExecutionExplicitDefault = true;\r\nvar pdiMinLengthExecutionExplicitDefault = true;\r\nvar pdiMaxLengthExecutionExplicitDefault = true;\r\nvar pdiMaxLengthEnforceMaxConstraintDefault = false;\r\nvar pdiValueRuleRangeExecutionExplicitDefault = true;\r\nvar pdiValueRuleGreaterThanExecutionExplicitDefault = true;\r\nvar pdiValueRuleLessThanExecutionExplicitDefault = true;\r\nvar pdiEmailValidataionExecutionExplicitDefault = true;\r\n\r\n\r\nfunction evaluateIfConditions(ifExpr, scope) {\r\n 'use strict';\r\n return toBoolean(scope.$eval(ifExpr));\r\n}\r\n\r\nangular.module('pdi.validate', [])\r\n .service('validatorSvc', [\r\n '$rootScope', function($rootScope) {\r\n\r\n $rootScope.scopesToValidate = [];\r\n $rootScope.formModelWatchers = [];\r\n\r\n function executeValidationsForScope(scope) {\r\n 'use strict';\r\n\r\n for (var cs = scope.$$childHead; cs; cs=cs.$$nextSibling) {\r\n executeValidationsForScope(cs);\r\n }\r\n\r\n if (angular.isUndefinedOrNullOrEmpty(scope.scopeValidations)) {\r\n return true;\r\n }\r\n\r\n // broadcast event for elements to clear their errors/warnings and notification UI\r\n scope.$broadcast('clearElementValidationNotifications', {});\r\n scope.$broadcast('clearSummaryValidationNotifications', {});\r\n\r\n var validation;\r\n\r\n //clear arrays\r\n scope.scopeValidationErrors = [];\r\n scope.scopeValidationWarnings.length = [];\r\n\r\n var hadError = false;\r\n var validatorResult = {};\r\n\r\n for (var i = 0; i <= scope.scopeValidations.length - 1; i++) {\r\n validation = scope.scopeValidations[i];\r\n\r\n hadError = false;\r\n\r\n // check to see if element already has an error if so don't eval addition element validations\r\n if (validation.attrs.errors.length === 0) {\r\n //validate errors\r\n validatorResult = validation.validator().validateErrors();\r\n\r\n if (validatorResult !== undefined) {\r\n if (validatorResult.hasError) {\r\n scope.scopeValidationErrors.push(validatorResult);\r\n validation.attrs.errors.push(validatorResult);\r\n\r\n if (validation.attrs.ngModelCtrl.$setValidity !== undefined) {\r\n validation.attrs.ngModelCtrl.$setValidity(validatorResult.name, false);\r\n }\r\n\r\n hadError = true;\r\n }\r\n }\r\n\r\n if (!hadError) {\r\n validatorResult = validation.validator().validateWarnings();\r\n\r\n if (validatorResult !== undefined) {\r\n if (validatorResult.hasWarning) {\r\n scope.scopeValidationWarnings.push(validatorResult);\r\n validation.attrs.warnings.push(validatorResult);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n scope.$broadcast('processElementValidationNotifications', {});\r\n scope.$broadcast('processSummaryValidationNotifications', {});\r\n\r\n return (scope.scopeValidationErrors.length === 0);\r\n }\r\n\r\n return {\r\n executeValidations: function() {\r\n 'use strict';\r\n\r\n var isValid = true;\r\n\r\n for (var i = 0; i <= $rootScope.scopesToValidate.length - 1; i++) {\r\n var validatorResult = executeValidationsForScope($rootScope.scopesToValidate[i].scope);\r\n isValid = isValid && validatorResult;\r\n }\r\n\r\n return isValid;\r\n },\r\n executeValidationsForScope: executeValidationsForScope,\r\n addScopeToValidate: function(scope, view) {\r\n 'use strict';\r\n\r\n var addScope = true;\r\n\r\n //check to see if scope already added to validate\r\n for (var i = 0; i <= $rootScope.scopesToValidate.length - 1; i++) {\r\n if ($rootScope.scopesToValidate[i].scopeID === scope.$id) {\r\n addScope = false;\r\n break;\r\n }\r\n }\r\n\r\n if (addScope) {\r\n $rootScope.scopesToValidate.push({ scopeID: scope.$id, scope: scope, view: view });\r\n\r\n for (var cs = scope.$$childHead; cs; cs=cs.$$nextSibling) {\r\n $rootScope.scopesToValidate.push({ scopeID: cs.$id, scope: cs, view: view });\r\n }\r\n }\r\n },\r\n clearValidationScopes: function() {\r\n 'use strict';\r\n $rootScope.scopesToValidate = [];\r\n// $rootScope.formModelWatchers = [];\r\n },\r\n clearAllValidations: function() {\r\n $rootScope.$broadcast('clearElementValidationNotifications', {});\r\n }\r\n };\r\n }\r\n ])\r\n\r\n .directive('pdiValidations', ['validatorSvc', '$compile', '$timeout', function (validatorSvc, $compile, $timeout) {\r\n\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n link: function(scope, element, attrs, ctrl) {\r\n 'use strict';\r\n if ((!ctrl) || ( attrs.pdiValidations==='')) { return; }\r\n\r\n attrs.ngModelCtrl = ctrl;\r\n\r\n var model = attrs.ngModel;\r\n\r\n var pdivalidation = scope.$eval(attrs.pdiValidations);\r\n\r\n var validatorFn = function() {\r\n\r\n return {\r\n validateErrors: function() {\r\n\r\n if (pdivalidation.validatorError === undefined) { return; }\r\n\r\n var validatorParms = pdivalidation.validatorParms;\r\n\r\n var elementValue = scope.$eval(model); //element.val().trimRight();\r\n var expression = pdivalidation.validatorError(elementValue, validatorParms);\r\n\r\n if (angular.isObject(expression) && angular.isFunction(expression.then)) {\r\n // expression is a promise\r\n var deferred = $q.defer();\r\n expression.then(function() {\r\n deferred.resolve(\"\");\r\n }, function() {\r\n var error = { name: pdivalidation.name, model: model, msg: pdivalidation.validationMessage, hasError: true };\r\n deferred.reject(error);\r\n });\r\n return deferred.promise;\r\n } else if (!expression) {\r\n // expression false\r\n return { name: pdivalidation.name, model: model, msg: pdivalidation.validationMessage, hasError: true };\r\n }\r\n },\r\n validateWarnings: function() {\r\n\r\n if (pdivalidation.validatorWarning === undefined) { return; }\r\n\r\n var validatorParms = pdivalidation.validatorParms;\r\n\r\n var elementValue = scope.$eval(model); //element.val().trimRight();\r\n var expression = pdivalidation.validatorWarning(elementValue, validatorParms);\r\n\r\n\r\n if (!expression) {\r\n return { name: pdivalidation.name, model: model, msg: pdivalidation.validationMessageWrn, hasWarning: true };\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: pdivalidation.name, model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n\r\n /*angular.forEach(attrs.pdiValidations, function(index) {\r\n\r\n var validateErrors = (attrs.pdiValidations[index].validatorError) ? true : false;\r\n var validateWarnings = (attrs.pdiValidations[index].validatorWarning) ? true : false;\r\n\r\n var validatorFn = function() {\r\n\r\n return {\r\n validateErrors: function() {\r\n\r\n if (!validateErrors) return;\r\n\r\n var elementValue = element.val().trimRight();\r\n var expression = pdivalidation.validatorError(elementValue);\r\n\r\n if (!expression) {\r\n return { name: pdivalidation.name + key, model: model, msg: pdivalidation.validationMessage, hasError: true };\r\n }\r\n },\r\n validateWarnings: function() {\r\n\r\n if (!validateWarnings) return;\r\n\r\n var elementValue = element.val().trimRight();\r\n var expression = pdivalidation.validatorWarning(elementValue);\r\n\r\n if (angular.isObject(expression) && angular.isFunction(expression.then)) {\r\n // expression is a promise\r\n expression.then(function() {\r\n }, function() {\r\n attrs.warnings.push({ name: pdivalidation.name + key, model: model, msg: pdivalidation.validationMessageWrn });\r\n });\r\n return;\r\n } else if (!expression) {\r\n // expression false\r\n attrs.warnings.push({ name: pdivalidation.name + key, model: model, msg: pdivalidation.validationMessageWrn });\r\n return;\r\n }\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: pdivalidation.name + key, model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n\r\n //attrs.validations.push(({ name: pdivalidation.name + key, model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 }));\r\n\r\n });*/\r\n },\r\n controller: ['$scope', '$element', '$attrs', function($scope, $element, $attrs) {\r\n 'use strict';\r\n\r\n $scope.scopeValidations = $scope.scopeValidations || [];\r\n $scope.scopeValidationErrors = $scope.scopeValidationErrors || [];\r\n $scope.scopeValidationWarnings = $scope.scopeValidationWarnings || [];\r\n\r\n validatorSvc.addScopeToValidate($scope);\r\n\r\n $attrs.validations = [];\r\n $attrs.errors = [];\r\n $attrs.warnings = [];\r\n\r\n $attrs.ngModelCtrl = {};\r\n\r\n $attrs.hasWarnings = false;\r\n\r\n this.addValidation = function(validation) {\r\n $attrs.validations.push(validation);\r\n };\r\n\r\n $scope.$on('executeValidationsForScope', function () {\r\n validatorSvc.executeValidationsForScope($scope);\r\n });\r\n\r\n //used to forced process the error/waring and display the notification UI for the element'\r\n $scope.$on('processElementValidationNotifications', function () {\r\n if (!angular.isUndefined($attrs.showValidationNotification) && !$scope.$eval($attrs.showValidationNotification)) { return; }\r\n\r\n if ($attrs.errors.length > 0) {\r\n pdi.ng.validate.createElementValidationMessageError($attrs.errors[0].name, $attrs.errors[0].msg, $element, $attrs, $scope, $compile);\r\n pdi.ng.validate.processElementErrorNotification($attrs.errors[0].name, true, $element, $attrs);\r\n } else if ($attrs.warnings.length > 0) {\r\n pdi.ng.validate.createElementValidationMessageWarning($attrs.warnings[0].name, $attrs.warnings[0].msg, $element, $attrs, $scope, $compile);\r\n pdi.ng.validate.processElementWarningNotification($attrs.warnings[0].name, true, $element, $attrs);\r\n }\r\n });\r\n\r\n //used to forced clear element error/warning and clear the notification UI'\r\n $scope.$on('clearElementValidationNotifications', function () {\r\n\r\n pdi.ng.validate.removeElementValidationMessage($element, $attrs, $scope, $compile);\r\n\r\n if ($attrs.errors.length > 0) {\r\n pdi.ng.validate.processElementErrorNotification($attrs.errors[0].name, false, $element, $attrs);\r\n }\r\n\r\n if ($attrs.warnings.length > 0) {\r\n pdi.ng.validate.processElementWarningNotification($attrs.warnings[0].name, false, $element, $attrs);\r\n }\r\n\r\n //clear element arrays\r\n $attrs.errors.length = 0;\r\n $attrs.warnings.length = 0;\r\n });\r\n }]\r\n };\r\n }\r\n ])\r\n\r\n .directive('pdiValidation', ['$rootScope', 'validatorSvc', '$compile', '$timeout', function ($rootScope, validatorSvc, $compile, $timeout) {\r\n\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n terminal: true,\r\n template: '
    ',\r\n link: function (scope, element, attrs) {\r\n 'use strict';\r\n\r\n if (attrs.errorValidatorFn !== undefined || attrs.warningValidatorFn !== undefined) {\r\n\r\n var ctrlIndex = scope.scopeValidations.length + 1;\r\n\r\n attrs.name = 'pdiValidation' + ctrlIndex.toString();\r\n\r\n var validatorFn = function () {\r\n\r\n return {\r\n validateErrors: function () {\r\n\r\n if (attrs.errorValidatorFn === undefined) return;\r\n\r\n var validatorResult = scope.$eval(attrs.errorValidatorFn);\r\n\r\n if (validatorResult) { //has errors\r\n return { name: 'pdiValidation' + ctrlIndex.toString(), msg: attrs.validationErrorMsg, hasError: true };\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function () {\r\n\r\n if (attrs.warningValidatorFn === undefined) return;\r\n\r\n var validatorResult = attrs.warningValidatorFn();\r\n\r\n if (validatorResult) { //has warnings\r\n return { name: 'pdiValidation' + ctrlIndex.toString(), msg: attrs.validationWarningMsg, hasWarning: true };\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiValidation' + ctrlIndex.toString(), element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n\r\n }\r\n },\r\n controller: ['$scope', '$element', '$attrs', function($scope, $element, $attrs) {\r\n 'use strict';\r\n\r\n $scope.scopeValidations = $scope.scopeValidations || [];\r\n $scope.scopeValidationErrors = $scope.scopeValidationErrors || [];\r\n $scope.scopeValidationWarnings = $scope.scopeValidationWarnings || [];\r\n\r\n validatorSvc.addScopeToValidate($scope);\r\n\r\n $attrs.validations = [];\r\n $attrs.errors = [];\r\n $attrs.warnings = [];\r\n\r\n $attrs.ngModelCtrl = {};\r\n\r\n $attrs.hasWarnings = false;\r\n\r\n //used to forced process the error/waring and display the notification UI for the element'\r\n $scope.$on('processElementValidationNotifications', function () {\r\n pdi.ng.validate.processValidationNotification($element, $attrs, $compile, $scope);\r\n });\r\n\r\n //used to forced clear element error/warning and clear the notification UI'\r\n $scope.$on('clearElementValidationNotifications', function () {\r\n\r\n pdi.ng.validate.processValidationNotification($element, $attrs, $compile, $scope);\r\n pdi.ng.validate.removeElementValidationMessage($element, $attrs, $scope, $compile);\r\n\r\n //clear element arrays\r\n $attrs.errors.length = 0;\r\n $attrs.warnings.length = 0;\r\n });\r\n }]\r\n };\r\n }])\r\n\r\n .directive('pdiValidationsSummary', ['$rootScope', 'validatorSvc', '$compile', '$timeout', function ($rootScope, validatorSvc, $compile, $timeout) {\r\n\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n terminal: true,\r\n template: '
    ',\r\n link: function (scope, element, attrs) {\r\n 'use strict';\r\n\r\n if (attrs.data !== undefined && attrs.formModel !== undefined) {\r\n var newScope = $rootScope.$new();\r\n\r\n var appHtml = $('[ng-controller]').html();\r\n var ele = angular.element(appHtml);\r\n\r\n newScope[attrs.formModel] = scope.$eval(attrs.data);\r\n\r\n var view = $compile(ele)(newScope);\r\n\r\n validatorSvc.addScopeToValidate(newScope, view);\r\n\r\n //used to forced process the error/waring and display the notification UI for the element'\r\n newScope.$on('processSummaryValidationNotifications', function () {\r\n pdi.ng.validate.processValidationsSummaryNotification(element, attrs, $compile, newScope);\r\n });\r\n\r\n //used to forced clear element error/warning and clear the notification UI'\r\n newScope.$on('clearSummaryValidationNotifications', function () {\r\n pdi.ng.validate.processValidationsSummaryNotification(element, attrs, $compile, newScope);\r\n });\r\n\r\n var addFormModelWatcher = true;\r\n\r\n //check to see if form model already added to array\r\n for (var i = 0; i <= $rootScope.formModelWatchers.length - 1; i++) {\r\n if ($rootScope.formModelWatchers[i].formModel === attrs.formModel) {\r\n addFormModelWatcher = false;\r\n break;\r\n }\r\n }\r\n\r\n if (addFormModelWatcher) {\r\n\r\n var watchUnBinder =$rootScope.$watch(function () {\r\n return scope.$eval(attrs.formModel);\r\n }, function (newValue, oldValue) {\r\n if (oldValue === undefined) {\r\n return;\r\n }\r\n\r\n $timeout(function() {\r\n scope.$parent.$broadcast('clearElementValidationNotifications', {});\r\n validatorSvc.executeValidations();\r\n scope.$parent.$broadcast('processElementValidationNotifications', {});\r\n });\r\n });\r\n\r\n $rootScope.formModelWatchers.push({ formModel: attrs.formModel, unBinderFn: watchUnBinder });\r\n }\r\n }\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiRequired', ['validatorSvc', function (validatorSvc) {\r\n\r\n //*********************************************\r\n // usage\r\n //*********************************************\r\n // required-validation-msg\r\n // required-execution-explicit\r\n // required-if-expr\r\n // required-validation-msg-wrn\r\n // required-if-expr-wrn\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.requiredValidationMsg) || ((!attrs.requiredValidationMsg) && (!attrs.requiredValidationMsgWrn)) ? true : false;\r\n var validateWarnings = (attrs.requiredValidationMsgWrn) ? true : false;\r\n\r\n var requiredValidationMsg = attrs.requiredValidationMsg || pdi.ng.validate.requiredMsgDefault || 'required validation undefined';\r\n var requiredValidationMsgWrn = attrs.requiredValidationMsgWrn;\r\n var requiredExecutionExplicit = attrs.requiredExecutionExplicit || pdiRequiredExecutionExplicitDefault;\r\n\r\n var validatorFn = function () {\r\n\r\n return {\r\n validateErrors: function () {\r\n\r\n if (attrs.disabled) { return; } // if element is disabled then don't enforce validations on the element\r\n\r\n if (!validateErrors) return;\r\n\r\n if (evaluateIfConditions(attrs.requiredIfExpr, scope) &&\r\n (ctrl.$isEmpty(ctrl.$viewValue))) {\r\n\r\n return { name: 'pdiRequired', model:model, msg: requiredValidationMsg, hasError: true };\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function () {\r\n\r\n if (!validateWarnings) return;\r\n\r\n if (evaluateIfConditions(attrs.requiredIfExprWrn, scope) &&\r\n (ctrl.$isEmpty(ctrl.$viewValue))) {\r\n\r\n return { name: 'pdiRequired', model: model, msg: requiredValidationMsgWrn, hasWarning: true };\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiRequired', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiMinlength', ['validatorSvc', function (validatorSvc) {\r\n\r\n //usage\r\n //minlengthValidationMsg: '=',\r\n // minlengthExecutionExplicit: '=',\r\n // minlengthIfExpr: '@',\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.minlengthValidationMsg) || ((!attrs.minlengthValidationMsg) && (!attrs.minlengthValidationMsgWrn)) ? true : false;\r\n var validateWarnings = (attrs.minlengthValidationMsgWrn) ? true : false;\r\n\r\n var minlengthValidationMsg = attrs.minlengthValidationMsg || 'minLength validation undefined';\r\n var minlengthValidationMsgWrn = attrs.minlengthValidationMsgWrn;\r\n var minlengthExecutionExplicit = attrs.minlengthExecutionExplicit || pdiMinLengthExecutionExplicitDefault;\r\n\r\n minlengthValidationMsg = String.format(minlengthValidationMsg, attrs.pdiMinlength);\r\n minlengthValidationMsgWrn = String.format(minlengthValidationMsgWrn, attrs.pdiMinlength);\r\n\r\n var validatorFn = function() {\r\n return {\r\n validateErrors: function() {\r\n\r\n if (!validateErrors) return;\r\n\r\n if (evaluateIfConditions(attrs.minlengthIfExpr, scope) &&\r\n (ctrl.$isEmpty(ctrl.$viewValue) || ctrl.$viewValue.length < attrs.pdiMinlength)) {\r\n\r\n return { name: 'pdiMinlength', model: model, msg: minlengthValidationMsg, hasError: true };\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function() {\r\n\r\n if (!validateWarnings) return;\r\n\r\n if (evaluateIfConditions(attrs.minlengthIfExprWrn, scope) &&\r\n (ctrl.$isEmpty(ctrl.$viewValue) || ctrl.$viewValue.length < attrs.pdiMinlength)) {\r\n\r\n return { name: 'pdiMinlength', model: model, msg: minlengthValidationMsgWrn, hasWarning: true };\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiMinlength', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiMaxlength', ['validatorSvc', function (validatorSvc) {\r\n\r\n //usage\r\n //maxlengthValidationMsg: '=',\r\n // maxlengthExecutionExplicit: '=',\r\n // maxlengthIfExpr: '@',\r\n // enforceMaxConstraint: '='\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function(scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.maxlengthValidationMsg) || ((!attrs.maxlengthValidationMsg) && (!attrs.maxlengthValidationMsgWrn)) ? true : false;\r\n var validateWarnings = (attrs.maxlengthValidationMsgWrn) ? true : false;\r\n\r\n var enforceMaxConstraint = attrs.enforcemaxconstraint || pdiMaxLengthEnforceMaxConstraintDefault;\r\n\r\n var ifConditions = evaluateIfConditions(attrs.maxlengthIfExpr, scope);\r\n\r\n // if enforceMaxConstraint is true then the max length will be enforce through the UI by preventing\r\n // input of more that specified length and not through validation.\r\n if (enforceMaxConstraint && ifConditions) {\r\n element.bind('keypress', function(event) {\r\n // Once the limit has been met or exceeded, prevent all keypresses from working\r\n if (element.val().length >= attrs.pdiMaxlength) {\r\n // Except backspace\r\n if (event.keyCode !== 8) {\r\n event.preventDefault();\r\n }\r\n }\r\n });\r\n } else {\r\n\r\n var maxlengthValidationMsg = attrs.maxlengthValidationMsg || 'maxLength validation undefined';\r\n var maxlengthValidationMsgWrn = attrs.maxlengthValidationMsgWrn;\r\n var maxlengthExecutionExplicit = attrs.maxlengthExecutionExplicit || pdiMaxLengthExecutionExplicitDefault;\r\n\r\n maxlengthValidationMsg = String.format(maxlengthValidationMsg, attrs.pdiMaxlength);\r\n maxlengthValidationMsgWrn = String.format(maxlengthValidationMsgWrn, attrs.pdiMaxlength);\r\n\r\n var validatorFn = function() {\r\n return {\r\n validateErrors: function() {\r\n\r\n if (!validateErrors) return;\r\n\r\n if (ifConditions && (ctrl.$viewValue.length > attrs.pdiMaxlength)) {\r\n\r\n return { name: 'pdiMaxlength', model: model, msg: maxlengthValidationMsg, hasError: true };\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function() {\r\n\r\n if (!validateWarnings) return;\r\n\r\n if (ifConditions && (ctrl.$viewValue.length > attrs.pdiMaxlength)) {\r\n\r\n return { name: 'pdiMaxlength', model: model, msg: maxlengthValidationMsgWrn, hasWarning: true };\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiMaxlength', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n }\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiValueruleRange', ['validatorSvc', function (validatorSvc) {\r\n\r\n //*********************************************\r\n // usage\r\n //*********************************************\r\n // valuerule-rng-validation-msg\r\n // valuerule-rng-execution-explicit\r\n // valuerule-rng-if-expr\r\n // valuerule-rng-validation-msg-wrn\r\n // valuerule-rng-if-expr-wrn\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.valueruleRngValidationMsg) || ((!attrs.valueruleRngValidationMsg) && (!attrs.valueruleRngValidationMsgWrn)) ? true : false;\r\n var validateWarnings = (attrs.valueruleRngValidationMsgWrn) ? true : false;\r\n\r\n var rangeParms = attrs.pdiValueruleRange.split(',');\r\n\r\n if (rangeParms.length !== 2) return;\r\n\r\n var lowerLimit = rangeParms[0].toNumber();\r\n var upperLimit = rangeParms[1].toNumber();\r\n\r\n var valueRuleRngValidationMsg = attrs.valueruleRngValidationMsg || 'valueRuleRng validation undefined';\r\n var valueRuleRngValidationMsgWrn = attrs.valueruleRngValidationMsgWrn;\r\n var valueRuleRngExecutionExplicit = attrs.valueruleRngExecutionExplicit || pdiValueRuleRangeExecutionExplicitDefault;\r\n\r\n valueRuleRngValidationMsg = String.format(valueRuleRngValidationMsg, lowerLimit, upperLimit);\r\n valueRuleRngValidationMsgWrn = String.format(valueRuleRngValidationMsgWrn, lowerLimit, upperLimit);\r\n\r\n var validatorFn = function () {\r\n\r\n return {\r\n validateErrors: function () {\r\n\r\n if (!validateErrors) return;\r\n\r\n if (evaluateIfConditions(attrs.valueruleRngIfExpr, scope) &&\r\n (ctrl.$viewValue.toNumber() < lowerLimit || ctrl.$viewValue.toNumber() > upperLimit)) {\r\n\r\n return { name: 'pdiValueruleRange', model: model, msg: valueRuleRngValidationMsg, hasError: true };\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function () {\r\n\r\n if (!validateWarnings) return;\r\n\r\n if (evaluateIfConditions(attrs.valueruleRngIfExprWrn, scope) &&\r\n (parseInt(ctrl.$viewValue, 10) < lowerLimit || parseInt(ctrl.$viewValue, 10) > upperLimit)) {\r\n\r\n return { name: 'pdiValueruleRange', model: model, msg: valueRuleRngValidationMsgWrn, hasWarning: true };\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiValueruleRange', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiValueruleGreaterthan', ['validatorSvc', function (validatorSvc) {\r\n\r\n //*********************************************\r\n // usage\r\n //*********************************************\r\n // valuerule-gt-validation-msg\r\n // valuerule-gt-execution-explicit\r\n // valuerule-gt-if-expr\r\n // valuerule-gt-validation-msg-wrn\r\n // valuerule-gt-if-value-expr\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.valueruleGtValidationMsg) || ((!attrs.valueruleGtValidationMsg) && (!attrs.valueruleGtValidationMsgWrn)) ? true : false;\r\n var validateWarnings = (attrs.valueruleGtValidationMsgWrn) ? true : false;\r\n\r\n var valueruleGtValidationMsg = attrs.valueruleGtValidationMsg || 'valueRuleGT validation undefined';\r\n var valueruleGtValidationMsgWrn = attrs.valueruleGtValidationMsgWrn;\r\n var valueRuleGtExecutionExplicit = attrs.valueruleGtExecutionExplicit || pdiValueRuleGreaterThanExecutionExplicitDefault;\r\n\r\n valueruleGtValidationMsg = String.format(valueruleGtValidationMsg, attrs.pdiValueruleGreaterthan);\r\n valueruleGtValidationMsgWrn = String.format(valueruleGtValidationMsgWrn, attrs.pdiValueruleGreaterthan);\r\n\r\n var validatorFn = function () {\r\n\r\n return {\r\n validateErrors: function () {\r\n\r\n if (!validateErrors) return;\r\n\r\n if (evaluateIfConditions(attrs.valueruleGtIfExpr, scope) &&\r\n (parseFloat(ctrl.$viewValue) <= attrs.pdiValueruleGreaterthan)) {\r\n\r\n return { name: 'pdiValueruleGreaterthan', model: model, msg: valueruleGtValidationMsg, hasError: true };\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function () {\r\n\r\n if (!validateWarnings) return;\r\n\r\n if (evaluateIfConditions(attrs.valueruleGtIfExprWrn, scope) &&\r\n (parseFloat(ctrl.$viewValue) <= attrs.pdiValueruleGreaterthan)) {\r\n\r\n return { name: 'pdiValueruleGreaterthan', model: model, msg: valueruleGtValidationMsgWrn, hasWarning: true };\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiValueruleGreaterthan', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiValueruleLessthan', ['validatorSvc', function (validatorSvc) {\r\n\r\n //*********************************************\r\n // usage\r\n //*********************************************\r\n // valuerule-lt-validation-msg\r\n // valuerule-lt-execution-explicit\r\n // valuerule-lt-if-expr\r\n // valuerule-lt-validation-msg-wrn\r\n // valuerule-lt-if-expr-wrn\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.valueruleLtValidationMsg) || ((!attrs.valueruleLtValidationMsg) && (!attrs.valueruleLtValidationMsgWrn)) ? true : false;\r\n var validateWarnings = (attrs.valueruleLtValidationMsgWrn) ? true : false;\r\n\r\n var valueruleLtValidationMsg = attrs.valueruleLtValidationMsg || 'valueRuleLT validation undefined';\r\n var valueruleLtValidationMsgWrn = attrs.valueruleLtValidationMsgWrn;\r\n var valueRuleLtExecutionExplicit = attrs.valueruleLtExecutionExplicit || pdiValueRuleLessThanExecutionExplicitDefault;\r\n\r\n valueruleLtValidationMsg = String.format(valueruleLtValidationMsg, attrs.pdiValueruleLessthan);\r\n valueruleLtValidationMsgWrn = String.format(valueruleLtValidationMsgWrn, attrs.pdiValueruleLessthan);\r\n\r\n var validatorFn = function () {\r\n\r\n return {\r\n validateErrors: function () {\r\n\r\n if (!validateErrors) return;\r\n\r\n if (evaluateIfConditions(attrs.valueruleLtIfExpr, scope) &&\r\n (parseInt(ctrl.$viewValue, 10) >= attrs.pdiValueruleLessthan)) {\r\n\r\n return { name: 'pdiValueruleLessthan', model: model, msg: valueruleLtValidationMsg, hasError: true };\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function () {\r\n\r\n if (!validateWarnings) return;\r\n\r\n if (evaluateIfConditions(attrs.valueruleLtIfExprWrn, scope) &&\r\n (parseInt(ctrl.$viewValue, 10) >= attrs.pdiValueruleLessthan)) {\r\n\r\n return { name: 'pdiValueruleLessthan', model: model, msg: valueruleLtValidationMsgWrn, hasWarning: true };\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiValueruleLessthan', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiValueIsNumeric', ['validatorSvc', function (validatorSvc) {\r\n\r\n //*********************************************\r\n // usage\r\n //*********************************************\r\n // pdi-value-is-numeric\r\n // pdi-value-is-numeric-msg\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.pdiValueIsNumeric || (!attrs.pdiValueIsNumeric && !attrs.pdiValueIsNumeric)) ? true : false;\r\n var validateWarnings = true;\r\n var ptrnValidationMsg = attrs.pdiValueIsNumericMsg || 'pdiValueIsNumeric validation undefined';\r\n\r\n var validatorFn = function () {\r\n return {\r\n validateErrors: function () {\r\n if (!validateWarnings) return;\r\n\r\n if (!isNaN(ctrl.$viewValue)) {\r\n return;\r\n }\r\n\r\n return { name: 'pdiValueIsNumeric', model: model, msg: ptrnValidationMsg, hasError: true };\r\n },\r\n validateWarnings: function () {\r\n if (!validateWarnings || angular.isUndefinedOrNullOrEmpty(ctrl.$viewValue)) return;\r\n }\r\n };\r\n };\r\n scope.scopeValidations.push({ name: 'pdiValueIsNumeric', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiDateIsGreaterEqualTo', ['validatorSvc', function (validatorSvc) {\r\n\r\n //*********************************************\r\n // usage\r\n //*********************************************\r\n // pdi-date-is-greater-equal-to\r\n // pdi-date-is-greater-equal-to-from-date\r\n // pdi-date-is-greater-equal-to-msg\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.pdiDateIsGreaterEqualToMsg || (!attrs.pdiDateIsGreaterEqualToMsg && !attrs.pdiDateIsGreaterEqualToMsgWrn)) ? true : false;\r\n var validateWarnings = true;\r\n var ptrnValidationMsg = attrs.pdiDateIsGreaterEqualToMsg || 'pdiDateIsGreaterEqualTo validation undefined';\r\n\r\n var validatorFn = function () {\r\n var fromDate = attrs.pdiDateIsGreaterEqualToFromDate;\r\n var thruDate = ctrl.$viewValue;\r\n\r\n return {\r\n validateErrors: function () {\r\n if (!validateWarnings) return;\r\n if (Date.parse(thruDate) >= Date.parse(fromDate)) {\r\n return;\r\n }\r\n return { name: 'pdiDateIsGreaterEqualTo', model: model, msg: ptrnValidationMsg, hasError: true };\r\n },\r\n validateWarnings: function () {\r\n if (!validateWarnings || angular.isUndefinedOrNullOrEmpty(ctrl.$viewValue)) return;\r\n }\r\n };\r\n };\r\n scope.scopeValidations.push({ name: 'pdiDateIsGreaterEqualTo', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n }\r\n };\r\n }])\r\n\r\n .directive('pdiPatternEmail', ['validatorSvc', function (validatorSvc) {\r\n\r\n //*********************************************\r\n // usage\r\n //*********************************************\r\n // ptrn-email-validation-msg\r\n // ptrn-email-execution-explicit\r\n // ptrn-email-validation-msg-wrn\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls) {\r\n 'use strict';\r\n\r\n if (ctrls.length !== 2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n\r\n var model = attrs.ngModel;\r\n\r\n var validateErrors = (attrs.ptrnEmailValidationMsg) || ((!attrs.ptrnEmailValidationMsg) && (!attrs.ptrnEmailValidationMsgWrn)) ? true : false;\r\n var validateWarnings = (attrs.ptrnEmailValidationMsgWrn) ? true : false;\r\n\r\n var ptrnValidationMsg = attrs.ptrnEmailValidationMsg || 'ptrnEmail validation undefined';\r\n var ptrnValidationMsgWrn = attrs.ptrnEmailValidationMsgWrn;\r\n var ptrnExecutionExplicit = attrs.prtnEmailExecutionExplicit || pdiEmailValidataionExecutionExplicitDefault;\r\n\r\n var regExPattern = new RegExp(/^[A-Za-z0-9_\\+-]+(\\.[A-Za-z0-9_\\+-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*\\.([A-Za-z]+)$/);\r\n\r\n var validatorFn = function () {\r\n\r\n return {\r\n validateErrors: function () {\r\n\r\n if (!validateErrors || angular.isUndefinedOrNullOrEmpty(ctrl.$viewValue)) return;\r\n\r\n var emails = ctrl.$viewValue.split(';');\r\n\r\n // process errors on element\r\n for (var i = 0 ; i <= emails.length - 1; i++) {\r\n if (!regExPattern.test(emails[i].trim())){\r\n ptrnValidationMsg = String.format(ptrnValidationMsg, emails[i]);\r\n return { name: 'pdiPatternEmail', model: model, msg: ptrnValidationMsg, hasError: true };\r\n }\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function () {\r\n\r\n if (!validateWarnings || angular.isUndefinedOrNullOrEmpty(ctrl.$viewValue)) return;\r\n\r\n var emails = ctrl.$viewValue.split(';');\r\n\r\n // process errors on element\r\n for (var i = 0 ; i <= emails.length - 1; i++) {\r\n if (!regExPattern.test(emails[i])){\r\n ptrnValidationMsgWrn = String.format(ptrnValidationMsgWrn, emails[i]);\r\n\r\n return { name: 'pdiPatternEmail', model: model, msg: ptrnValidationMsgWrn, hasWarning: true };\r\n }\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiPatternEmail', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n }\r\n };\r\n }])\r\n .directive('pdiValueruleMatchElement', ['validatorSvc', function (validatorSvc) {\r\n\r\n //*********************************************\r\n // usage\r\n //*********************************************\r\n // valuerule-match-element-validation-msg\r\n // valuerule-match-element-execution-explicit\r\n // valuerule-match-element-if-expr\r\n // valuerule-match-element-validation-msg-wrn\r\n // valuerule-match-element-if-expr-wrn\r\n // valuerule-ng-model-match (this is the model value to compare against)\r\n\r\n return {\r\n restrict: 'A',\r\n require: ['pdiValidations', 'ngModel'],\r\n link: function (scope, element, attrs, ctrls, $parse) {\r\n 'use strict';\r\n\r\n if (ctrls.length !==2) return;\r\n\r\n var validationsctrl = ctrls[0]; // pdiValidations Controller\r\n var ctrl = ctrls[1]; // ngModel Controller\r\n\r\n var model = attrs.ngModel;\r\n var match = attrs.valueruleNgModelMatch;\r\n\r\n var validateErrors = (attrs.valueruleMatchElementValidationMsg) || ((!attrs.valueruleMatchElementValidationMsg) && (!attrs.valueruleMatchElementValidationMsgWrn)) ? true : false;\r\n var validateWarnings = (attrs.valueRuleMatchElementValidationMsgWrn) ? true : false;\r\n\r\n var matchElementValidationMsg = attrs.valueruleMatchElementValidationMsg || 'validation undefined';\r\n var matchElementValidationMsgWrn = attrs.valueruleMatchElementValidationMsgWrn;\r\n\r\n var validatorFn = function () {\r\n\r\n return {\r\n validateErrors: function () {\r\n if (!validateErrors) return;\r\n\r\n if (evaluateIfConditions(attrs.valueruleMatchElementIfExpr, scope)) {\r\n var matchValue = scope.$eval(match);\r\n var modelValue = scope.$eval(model);\r\n if (matchValue !== modelValue) {\r\n return { name: 'pdiValueruleMatchElement', model: model, msg: matchElementValidationMsg, hasError: true };\r\n }\r\n }\r\n\r\n return;\r\n },\r\n validateWarnings: function () {\r\n if (!validateWarnings) return;\r\n\r\n if (evaluateIfConditions(attrs.valueruleMatchElementIfExprWrn, scope)) {\r\n var matchValue = scope.$eval(match);\r\n var modelValue = scope.$eval(model);\r\n if (matchValue !== modelValue) {\r\n return { name: 'pdiValueruleMatchElement', model: model, msg: matchElementValidationMsgWrn, hasWarning: true };\r\n }\r\n }\r\n\r\n return;\r\n }\r\n };\r\n };\r\n\r\n scope.scopeValidations.push({ name: 'pdiValueruleMatchElement', model: model, element: element, attrs: attrs, validator: validatorFn, priority: 1 });\r\n\r\n }\r\n };\r\n }]);\r\n","/* ==============================================================================\r\n\r\n CORE.AJAX MODULE\r\n\r\n Defines the core.ajax module and it all it's module dependencies\r\n\r\n ============================================================================= */\r\nclass ApiServiceSettings {\r\n constructor(settings) {\r\n this.url = settings.url;\r\n this.data = settings.data;\r\n this.method = settings.method;\r\n this.params = settings.params;\r\n this.responseType = settings.responseType;\r\n this.scope = settings.scope; // if set then this is the scope that validations will execute for\r\n this.skipValidations = settings.skipValidations || false; // if true then POST or PUT validations eval is skipped\r\n }\r\n}\r\nclass ApiServiceOperationResult {\r\n constructor(data) {\r\n this.Success = data.Success;\r\n this.SuccessMsg = data.SucessMessage;\r\n this.ErrorTitle = data.ErrorTitle;\r\n this.Errors = data.ErrorMessages || [];\r\n this.Warnings = data.WarningMessages || [];\r\n this.HasErrors = (this.Errors.length > 0);\r\n this.HasWarnings = (this.Warnings.length > 0);\r\n this.IsRedirect = data.IsRedirect;\r\n this.RedirectUrl = data.RedirectUrl;\r\n this.Data = data.Data;\r\n }\r\n}\r\n\r\nangular.module('core.ajax', [])\r\n\r\n /* ==============================================================================\r\n\r\n CORE.AJAX\r\n\r\n Contains helpful methods that are common to most ajax/xhr commands.\r\n\r\n ============================================================================= */\r\n .factory('ajax', ['$http', function ($http)\r\n {\r\n 'use strict';\r\n\r\n return {\r\n\r\n /*\r\n GET\r\n\r\n Simplified abstraction on top of Angular's $http provider.\r\n Performs a \"GET\" Request for a given url and data\r\n */\r\n get: function (url, data)\r\n {\r\n if (data === undefined)\r\n {\r\n return $http({\r\n method: 'GET',\r\n url: url\r\n });\r\n } else\r\n {\r\n return $http({\r\n method: 'GET',\r\n url: url + '/' + data\r\n });\r\n }\r\n },\r\n\r\n /*\r\n POST\r\n\r\n Simplified abstraction on top of Angular's $http provider.\r\n Performs a \"POST\" Request for a given url and data\r\n */\r\n post: function (url, data)\r\n {\r\n return $http({\r\n method: 'POST',\r\n url: url,\r\n data: data,\r\n headers: {\r\n \"Content-Type\": \"application/json\"\r\n }\r\n });\r\n }\r\n };\r\n\r\n }])\r\n .service('apiService',\r\n ['$http', '$q', '$window', 'NotificationService',\r\n function ($http, $q, $window, NotificationService)\r\n {\r\n function webAPICall(settings, notifyOnSuccess, suppressErrors)\r\n {\r\n var opResults = {};\r\n var deferred = $q.defer();\r\n\r\n //// for POST and PUT execute validation on data\r\n //if ((settings.method === 'POST' || settings.method === 'PUT') && !settings.skipValidations) {\r\n // if (!validatorSvc.executeValidations()) {\r\n // return deferred.promise;\r\n // }\r\n //}\r\n\r\n $http({\r\n method: settings.method || 'GET',\r\n url: settings.url,\r\n data: settings.data,\r\n params: settings.params\r\n })\r\n .then(function (data, status, headers, config)\r\n {\r\n opResults = new ApiServiceOperationResult(data.data);\r\n\r\n if (opResults.IsRedirect)\r\n {\r\n $window.location.assign(opResults.RedirectUrl);\r\n\r\n }\r\n else {\r\n if (opResults.Success)\r\n {\r\n if (notifyOnSuccess)\r\n NotificationService.handleSuccess(settings, opResults, status, headers, config);\r\n deferred.resolve(opResults, status, headers, config);\r\n } else\r\n {\r\n if (!suppressErrors) {\r\n NotificationService.handleFailure(settings, opResults, status, headers, config);\r\n }\r\n }\r\n }\r\n\r\n })\r\n .catch(function (data, status, headers, config)\r\n {\r\n if (!suppressErrors) {\r\n NotificationService.handleError(settings, data.data, status, headers, config);\r\n }\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n return {\r\n executeAndNotifyOnSuccess: function (settings)\r\n {\r\n return webAPICall(settings, true, false);\r\n },\r\n executeAndNotifyOnSuccessAndSuppressErrors: function (settings)\r\n {\r\n return webAPICall(settings, true, true);\r\n },\r\n execute: function (settings)\r\n {\r\n return webAPICall(settings, false, false);\r\n },\r\n executeAndSuppressErrors: function (settings)\r\n {\r\n return webAPICall(settings, false, true);\r\n }\r\n };\r\n }\r\n ]);\r\n","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n SERVICES.Payments MODULE\r\n\r\n Defines the module namespace for the movie services\r\n\r\n ============================================================================= */\r\nfunction CustomerPaymentAccount(account){\r\n this.AccountNo = account.AccountNo;\r\n this.AccountNoVerify = account.AccountNoVerify;\r\n this.AccountNoMasked = account.AccountNoMasked;\r\n this.AccountStatus = account.AccountStatus;\r\n this.AccountStatusDesc = account.AccountStatusDesc;\r\n this.AccountType = account.AccountType;\r\n this.BankRoutingNo = account.BankRoutingNo;\r\n this.CreatedDateTime = account.CreatedDateTime;\r\n this.CreatedByCustContKey = account.CreatedByCustContKey;\r\n this.CustKey = account.CustKey;\r\n this.Description = account.Description;\r\n this.Key = account.Key;\r\n this.LastModifiedDateTime = account.LastModifiedDateTime;\r\n this.LastModifiedByCustContKey = account.LastModifiedByCustContKey;\r\n this.PrenoteDate = account.PrenoteDate;\r\n this.RejectedEmailSent = account.RejectedEmailSent;\r\n this.VerificationAmount1 = account.VerificationAmount1;\r\n this.VerificationAmount2 = account.VerificationAmount2;\r\n this.VerificationDate = account.VerificationDate;\r\n this.TimeStamp = account.TimeStamp;\r\n this.IsDefault = account.IsDefault;\r\n this.AccountLastActivity = account.AccountLastActivity;\r\n this.AccountNextPaymentKey = account.AccountNextPaymentKey;\r\n this.AccountNextPayment = account.AccountNextPayment;\r\n this.AccountNextPaymentAmmount = account.AccountNextPaymentAmmount;\r\n this.ScheduledPaymentCount = account.ScheduledPaymentCount;\r\n}\r\n\r\n\r\n\r\nangular.module('services.paymentAccounts', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n Payments SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving movies.\r\n\r\n ============================================================================= */\r\nangular.module('services.paymentAccounts',[]).factory('PaymentAccountService', function($q, ajax, apiService) {\r\n 'use strict';\r\n var WebPaymentAccount = {};\r\n return{\r\n WebPaymentAccount:WebPaymentAccount,\r\n getPaymentAccountList : function(customerKey){\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/WebPaymentAccounts/' + customerKey,\r\n params: {}\r\n });\r\n var deferred = $q.defer();\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getPaymentAccount : function(customerPaymentAccountKey, customerKey){\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/WebPaymentAccount/' + customerPaymentAccountKey + '/' + customerKey,\r\n params: {}\r\n });\r\n var deferred = $q.defer();\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n savePaymentAccount : function(webPaymentAccount){\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method:'POST',\r\n url:'../api/WebPaymentAccount',\r\n data: webPaymentAccount\r\n }\r\n );\r\n var deferred = $q.defer();\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function(data){\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n validateRoutingNumber : function(routingNumber){\r\n var deferred = $q.defer();\r\n ajax.get('../api/WebPaymentAccountValidateRoutingNumber', routingNumber)\r\n .then(function(data, status, config, headers){\r\n var routingNubmerisValid = true;\r\n deferred.resolve(routingNubmerisValid);\r\n })\r\n .catch(function(data, status, config, headers){\r\n var routingNubmerisValid = data;\r\n deferred.reject(routingNubmerisValid);\r\n });\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 2/17/2015.\r\n */\r\nangular.module('core.constants', []).factory('constantLists', function(localizationSvc){\r\n var secretQuestions = [];\r\n var phoneTypes = [];\r\n\r\n var getSecretQuestions = function (localStrings) {\r\n if (angular.isUndefinedOrNullOrEmpty(localStrings)) {\r\n localStrings = localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n\r\n if (secretQuestions.length === 0) {\r\n secretQuestions[0] = localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"SecretQuestion1\"));\r\n secretQuestions[1] = localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"SecretQuestion2\"));\r\n secretQuestions[2] = localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"SecretQuestion3\"));\r\n secretQuestions[3] = localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"SecretQuestion4\"));\r\n secretQuestions[4] = localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"SecretQuestion5\"));\r\n secretQuestions[5] = localStrings.stringFromCharacterEntity(localStrings.getLocalizedString(\"SecretQuestion6\"));\r\n }\r\n\r\n return secretQuestions;\r\n };\r\n\r\n var getPhoneTypes = function (localStrings) {\r\n if (angular.isUndefinedOrNullOrEmpty(localStrings)) {\r\n localStrings = localizationSvc.getCachedLocalizationsContainer(\"AccountProfileLocalization\");\r\n }\r\n\r\n if (phoneTypes.length === 0) {\r\n phoneTypes[0] = { key: 4, value: localStrings.getLocalizedString(\"Unknown\") };\r\n phoneTypes[1] = { key: 1, value: localStrings.getLocalizedString(\"Home\") };\r\n phoneTypes[2] = { key: 2, value: localStrings.getLocalizedString(\"Mobile\") };\r\n phoneTypes[3] = { key: 3, value: localStrings.getLocalizedString(\"Other\") };\r\n phoneTypes[4] = { key: 0, value: localStrings.getLocalizedString(\"Work\") };\r\n }\r\n\r\n return phoneTypes;\r\n };\r\n return {\r\n secretQuestions: getSecretQuestions,\r\n phoneTypes: getPhoneTypes\r\n };\r\n});\r\n","/* ==============================================================================\r\n\r\nCore Enums\r\n\r\n Contains the core enum related code\r\n\r\n ============================================================================= */\r\nangular.module('core.enums', []).service('Modules', function ()\r\n{\r\n\r\n var All = 'All';\r\n var BulkFuel = 'BulkFuel';\r\n var CardLock = 'CardLock';\r\n var Retail = 'Retail';\r\n var Wholesale = 'Wholesale';\r\n\r\n return {\r\n All: All,\r\n BulkFuel: BulkFuel,\r\n CardLock: CardLock,\r\n Retail: Retail,\r\n Wholesale: Wholesale\r\n };\r\n}).service('WebFunctions', function ()\r\n{\r\n var AccountActivity = 1;\r\n var PaperworkEntry = 2;\r\n var CardTransactions = 3;\r\n var ViewCards = 4;\r\n var EditCards = 5;\r\n var CardAlerts = 6;\r\n var AddNewCards = 7;\r\n var AddandEditWebPaymentAccounts = 8;\r\n var AddandEditWebPayments = 9;\r\n //var ViewCreditBalanceInformation = 10;\r\n var CPPriceNotices = 11;\r\n var ViewCardNumbers = 12;\r\n var ViewNotificationsSenttoOtherContacts = 13;\r\n var ManageContactsAndSecurity = 14;\r\n var ViewCreditInformation = 15;\r\n var ViewOrderHistoryandPriceNotices = 16;\r\n var AddAndEditBulkFuelOrders = 17;\r\n var ViewCustomPages = 18;\r\n return {\r\n AccountActivity: AccountActivity,\r\n PaperworkEntry: PaperworkEntry,\r\n CardTransactions: CardTransactions,\r\n ViewCards: ViewCards,\r\n EditCards: EditCards,\r\n CardAlerts: CardAlerts,\r\n AddNewCards: AddNewCards,\r\n AddandEditWebPaymentAccounts: AddandEditWebPaymentAccounts,\r\n AddandEditWebPayments: AddandEditWebPayments,\r\n //ViewCreditBalanceInformation : ViewCreditBalanceInformation,\r\n CPPriceNotices: CPPriceNotices,\r\n ViewCardNumbers: ViewCardNumbers,\r\n ViewNotificationsSenttoOtherContacts: ViewNotificationsSenttoOtherContacts,\r\n ManageContactsAndSecurity: ManageContactsAndSecurity,\r\n ViewCreditInformation: ViewCreditInformation,\r\n ViewOrderHistoryandPriceNotices: ViewOrderHistoryandPriceNotices,//BulkFuel\r\n AddAndEditBulkFuelOrders: AddAndEditBulkFuelOrders,//BulkFuel\r\n ViewCustomPages: ViewCustomPages\r\n\r\n };\r\n}).service('WebFunctionGroups', function (WebFunctions)\r\n{\r\n var x = WebFunctions;\r\n var All = [x.AccountActivity, x.PaperworkEntry, x.CardTransactions, x.ViewCards, x.EditCards, x.CardAlerts,\r\n x.AddNewCards, x.AddandEditWebPaymentAccounts, x.AddandEditWebPayments, x.ViewCreditInformation,\r\n x.CPPriceNotices, x.ViewCardNumbers, x.ViewNotificationsSenttoOtherContacts, x.ManageContactsAndSecurity,\r\n x.ViewOrderHistoryandPriceNotices, x.AddAndEditBulkFuelOrders];\r\n var Account = [x.AccountActivity, x.CardTransactions, x.AddandEditWebPaymentAccounts, x.AddandEditWebPayments];\r\n var Payments = [x.AddandEditWebPaymentAccounts, x.AddandEditWebPayments];\r\n var Orders = [/*x.AccountActivity,*/ x.ViewOrderHistoryandPriceNotices, x.AddAndEditBulkFuelOrders];//BulkFuel && Warehouse\r\n var Paperwork = [x.PaperworkEntry];\r\n var FuelCards = [x.CardTransactions, x.ViewCards, x.EditCards, x.CardAlerts, x.AddNewCards, x.CPPriceNotices];\r\n var Comments = All;\r\n var Documents = All;\r\n var AccountReports = [x.AccountActivity];\r\n var AccountPayments = [x.AddandEditWebPaymentAccounts, x.AddandEditWebPayments];\r\n var AccountAlerts = [x.AddandEditWebPayments];\r\n var FuelCardsCards = [x.ViewCards, x.EditCards, x.AddNewCards];\r\n var FuelCardsTrans = [x.CardTransactions];\r\n var FuelCardsPrices = [x.CPPriceNotices];\r\n var CustomPages = [x.ViewCustomPages];\r\n return {\r\n All: All,\r\n Account: Account,\r\n Orders: Orders,\r\n Paperwork: Paperwork,\r\n Payments: Payments,\r\n FuelCards: FuelCards,\r\n Comments: Comments,\r\n Documents: Documents,\r\n AccountReports: AccountReports,\r\n AccountPayments: AccountPayments,\r\n AccountAlerts: AccountAlerts,\r\n FuelCardsCards: FuelCardsCards,\r\n FuelCardsTrans: FuelCardsTrans,\r\n FuelCardsPrices: FuelCardsPrices,\r\n CustomPages: CustomPages\r\n };\r\n}).service('WebFunctionModules', function (WebFunctions)\r\n{\r\n return {\r\n checkWebFunctionModules: function (webFunction, isBulkFuel, isCardLock, isRetail, isWholesale, isWebEft, customer)\r\n {\r\n if (webFunction === WebFunctions.CardTransactions) return isCardLock;\r\n if (webFunction === WebFunctions.ViewCards) return isCardLock;\r\n if (webFunction === WebFunctions.EditCards) return isCardLock;\r\n if (webFunction === WebFunctions.CardAlerts) return isCardLock;\r\n if (webFunction === WebFunctions.AddNewCards) return isCardLock;\r\n if (webFunction === WebFunctions.AddandEditWebPaymentAccounts) return isWebEft;\r\n if (webFunction === WebFunctions.AddandEditWebPayments) return isWebEft;\r\n if (webFunction === WebFunctions.CPPriceNotices) return isCardLock && (customer.CPPrcNtcRuleKey !== null && customer.CPPrcNtcRuleKey > 0);\r\n if (webFunction === WebFunctions.ViewCardNumbers) return isCardLock;\r\n if (webFunction === WebFunctions.ViewOrderHistoryandPriceNotices) return (isBulkFuel || isWholesale);\r\n if (webFunction === WebFunctions.AddAndEditBulkFuelOrders) return (isBulkFuel || isWholesale);\r\n //for all other web functions assume that any module access is fine.\r\n return true;\r\n }\r\n };\r\n});","\r\n\r\n/* ==============================================================================\r\n\r\n CORE.ERROR MODULE\r\n\r\n Defines the error module and it all it's module dependencies\r\n\r\n ============================================================================= */\r\nangular.module('core.error', []);\r\n\r\n\r\n\r\n/* ==============================================================================\r\n\r\n CORE.ERROR SERVICE\r\n\r\n Contains helpful error handling and publishing methods\r\n\r\n ============================================================================= */\r\nangular.module('core.error').factory('NotificationService', function ($rootScope) {\r\n 'use strict';\r\n function handle(event, settings, opResults, status, headers, config) {\r\n var data = {\r\n settings: settings,\r\n opResults: opResults,\r\n status: status,\r\n headers: headers,\r\n config: config\r\n };\r\n $rootScope.$broadcast('event:' + event, data);\r\n }\r\n return {\r\n handleError: function (settings, opResults, status, headers, config) {\r\n handle('Error', settings, opResults, status, headers, config);\r\n },\r\n handleFailure: function (settings, opResults, status, headers, config) {\r\n handle('Failed', settings, opResults, status, headers, config);\r\n },\r\n handleSuccess: function (settings, opResults, status, headers, config) {\r\n handle('Success', settings, opResults, status, headers, config);\r\n }\r\n };\r\n});","angular.module('core.objects', [])\r\n .factory(\"Payment\",function(HttpUtil){\r\n 'use strict';\r\n var paymentInfo = {};\r\n return {\r\n paymentInfo : paymentInfo\r\n };\r\n })\r\n .factory(\"HttpUtil\",function($http, $q){\r\n 'use strict';\r\n return {};\r\n });","/* ==============================================================================\r\n\r\n CORE.SECURITY MODULE\r\n\r\n Contains all security related code\r\n\r\n ============================================================================= */\r\nangular.module('core.security', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n AUTH INTERCEPTOR\r\n\r\n Adds the Auth Token to the Http headers collection\r\n if the token is present.\r\n\r\n ============================================================================= */\r\nangular.module('core.security').factory('AuthInterceptor', function ($q, $rootScope, $location, $interval)\r\n{\r\n function logout()\r\n {\r\n $rootScope.sessionExpired = true;\r\n }\r\n\r\n return {\r\n\r\n request: function (config)\r\n {\r\n $interval.cancel($rootScope.sessionTimeout);\r\n config.headers = config.headers || {};\r\n\r\n // If the auth token is present\r\n if (amplify.store('pnuser-token') !== undefined)\r\n {\r\n // Add it to the http headers collection to be read by our\r\n // server-side authentication code\r\n var token = amplify.store('pnuser-token');\r\n config.headers.Authentication = token;\r\n //Update expiration time for the user token\r\n amplify.store('pnuser-token', token, {expires: $rootScope.timeout});\r\n if ($rootScope.timeout > 0)\r\n {\r\n $rootScope.sessionTimeout = $interval(function ()\r\n {\r\n logout();\r\n }, $rootScope.timeout);\r\n }\r\n } else\r\n {\r\n if ($location.$$path !== \"/\" &&\r\n $location.$$path.search(/(SignUp|ResetPassword|SetPassword|ContactUs|SiteDisabled|unsubscribe)/i) === -1)\r\n logout();\r\n }\r\n\r\n return config || $q.when(config);\r\n }\r\n\r\n };\r\n\r\n});\r\n\r\n/* ==============================================================================\r\n\r\n AUTHENTICATION SERVICE\r\n\r\n Contains the core authentication related code\r\n\r\n ============================================================================= */\r\nangular.module('core.security').factory('Authentication', function ($q, $rootScope, apiService, $location, $analytics)\r\n{\r\n\r\n return {\r\n isAuthenticated: function ()\r\n {\r\n var deferred = $q.defer(),\r\n token = amplify.store('pnuser-token');\r\n\r\n if (token === undefined)\r\n {\r\n $rootScope.isAuthenticated = false;\r\n deferred.reject('authentication:auth-token not valid');\r\n }\r\n else\r\n {\r\n $rootScope.isAuthenticated = true;\r\n deferred.resolve('authentication:auth-token is valid');\r\n }\r\n return deferred.promise;\r\n },\r\n login: function (userId, password, impersonationGuid)\r\n {\r\n var deferred = $q.defer();\r\n var data = {\r\n \"WebUserId\": userId || '',\r\n \"WebUserPassword\": password || '',\r\n 'ImpersonationGuid': impersonationGuid || ''\r\n };\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/Login',\r\n data: data\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n $rootScope.loginInfo.userId = data.Data.ImpersonatedUserId;\r\n $rootScope.loginInfo.userKey = data.Data.ImpersonatedKey;\r\n $rootScope.loginInfo.userType = data.Data.ImpersonatedType;\r\n $rootScope.loginInfo.impersonatorUserId = data.Data.ImpersonatorUserId;\r\n $rootScope.loginInfo.impersonatorUserKey = data.Data.ImpersonatorKey;\r\n $rootScope.loginInfo.impersonatorUserType = data.Data.ImpersonatorType;\r\n\r\n // Create Google Analytics Login event with Web User Key\r\n $analytics.eventTrack('Successful Login', { category: 'User Access', label: data.Data.Key });\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n // Create Google Analytics Login event with Web User Key\r\n $analytics.eventTrack('Failed Login', { category: 'User Access', label: data.Errors[0] || 'Valid login credentials required' });\r\n deferred.reject(data.ErrorMessages);\r\n }\r\n );\r\n \r\n return deferred.promise;\r\n },\r\n userToken: function ()\r\n {\r\n if (amplify.store('pnuser-token') !== undefined)\r\n {\r\n return amplify.store('pnuser-token');\r\n } else\r\n {\r\n $location.path('/');\r\n }\r\n }\r\n };\r\n});\r\n\r\n/* ==============================================================================\r\n\r\n USER SERVICE\r\n\r\n Contains the core USER related code\r\n\r\n ============================================================================= */\r\nangular.module('core.security')\r\n .factory('WebUserSvc', function ($q, $rootScope, Authentication, apiService)\r\n {\r\n var webUser;\r\n\r\n function removeEmptySiteMenuEntries(data)\r\n {\r\n if (!data.Data.WebUser || !data.Data.WebUser.CurrentAuthorization || !data.Data.WebUser.CurrentAuthorization.SiteLayout)\r\n {\r\n return;\r\n }\r\n\r\n data.Data.WebUser.CurrentAuthorization.SiteLayout.SubMenu.remove(function (menu)\r\n {\r\n return !data.Data.WebUser.CurrentAuthorization.SiteLayout.SideMenu.any({ParentKey:menu.Key});\r\n });\r\n }\r\n\r\n function retrieveWebUserFromAPI(user)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetWebUser/' + user,\r\n params: {}\r\n });\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n removeEmptySiteMenuEntries(data);\r\n webUser = data.Data.WebUser;\r\n deferred.resolve(webUser);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n\r\n function retrieveWebUserFromAPIWithToken(token, profile) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetWebUserByToken/',\r\n data: {\r\n ProfileKey: profile,\r\n Token: token\r\n }\r\n });\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n removeEmptySiteMenuEntries(data);\r\n webUser = data.Data.WebUser;\r\n deferred.resolve(webUser);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n\r\n function retrieveSelectedProfileFromAPI(user, profile)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetWebUserAndProfile/' + user + '/' + profile,\r\n params: {}\r\n });\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n removeEmptySiteMenuEntries(data);\r\n webUser = data.Data.WebUser;\r\n deferred.resolve(webUser);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n\r\n function getWebUser()\r\n {\r\n return webUser;\r\n }\r\n\r\n return {\r\n getLoggedInWebUserToken: function ()\r\n {\r\n var token = amplify.store('pnuser-token');\r\n\r\n if (token === undefined)\r\n {\r\n $rootScope.isAuthenticated = false;\r\n return;\r\n }\r\n $rootScope.isAuthenticated = true;\r\n \r\n return token;\r\n },\r\n getWebUserProfile: function () {\r\n return amplify.store('pnWebProfile');\r\n },\r\n getCurrentAuthorization: function () {\r\n return amplify.store('pnAuthIndex');\r\n },\r\n retrieveWebUser: function (user)\r\n {\r\n var deferred = $q.defer();\r\n retrieveWebUserFromAPI(user).then(function (data) {\r\n deferred.resolve(data);\r\n });\r\n return deferred.promise;\r\n },\r\n retrieveWebUserData: function (token, profile) {\r\n var deferred = $q.defer();\r\n retrieveWebUserFromAPIWithToken(token, profile).then(function (data) {\r\n deferred.resolve(data);\r\n });\r\n return deferred.promise;\r\n },\r\n retrieveWebUserFromAPI: retrieveWebUserFromAPI,\r\n retrieveWebUserFromAPIWithToken: retrieveWebUserFromAPIWithToken,\r\n retrieveSelectedProfile: function (user, profile)\r\n {\r\n var deferred = $q.defer();\r\n retrieveSelectedProfileFromAPI(user, profile).then(function (data) {\r\n deferred.resolve(data);\r\n });\r\n return deferred.promise;\r\n },\r\n getWebUserForSignup: function (webUser)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetWebUserForSignup/' + webUser.GUID,\r\n params: {}\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.Errors);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n signupWebUser: function (webUser)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SignupWebUser/',\r\n data: webUser\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.Errors);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getWebUserForPasswordReset: function (webUser)\r\n {\r\n var deferred = $q.defer(webUser);\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetWebUserForPasswordReset/' + webUser.GUID,\r\n params: {}\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.Errors);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n verifyWebUserSecretQuestionAnswer: function (webUser)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/VerifyWebUserSecretQuestionAnswer/' + webUser.GUID + '/' + webUser.AnswerClear,\r\n params: {}\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.Errors);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n resetWebUserPassword: function (webUser)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/ResetWebUserPassword/',\r\n data: webUser\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data)\r\n {\r\n webUser = data.Data;\r\n deferred.resolve(webUser);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.Errors);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n processForgotMyPassword: function (email)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/ProcessWebUserResetPassword/',\r\n params: {\r\n webUserId: email\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.ErrorMessages);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n saveWebUser: function (webUser, quiet)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SaveWebUser/',\r\n data: webUser\r\n }\r\n );\r\n if (quiet)\r\n {\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n webUser = data.Data.WebUser;\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.Errors);\r\n }\r\n );\r\n } else\r\n {\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data)\r\n {\r\n webUser = data.Data.WebUser;\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.reject(data.Errors);\r\n }\r\n );\r\n }\r\n return deferred.promise;\r\n },\r\n validatePasswordComplexity: function (webUserKey, password, isLogin)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/ValidatePasswordComplexity/',\r\n data: {\r\n WebUserKey: webUserKey,\r\n Password: password,\r\n IsLogin: isLogin,\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n },\r\n function (data)\r\n {\r\n deferred.resolve(data.Errors);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getNextPasswordResetDate: function (webUser)\r\n {\r\n var one_day = 1000 * 60 * 60 * 24;\r\n // Convert both dates to milliseconds\r\n var date1_ms = new Date(Date.parse(webUser.PWCreatedDate));\r\n var date2_ms = new Date().getTime();\r\n var difference_ms = date1_ms - date2_ms;\r\n return Math.round(difference_ms / one_day);\r\n },\r\n getWebUser: getWebUser,\r\n resolveWebUser: function () {\r\n var deferred = $q.defer();\r\n var _user = this.getWebUser();\r\n var _token = this.getLoggedInWebUserToken();\r\n var _profile = this.getWebUserProfile();\r\n\r\n // We have the user already\r\n if (!angular.isUndefinedOrNullOrEmpty(_user)) deferred.resolve();\r\n\r\n // Get the user if we can\r\n else if (!angular.isUndefinedOrNullOrEmpty(_token) && !angular.isUndefinedOrNullOrEmpty(_profile))\r\n this.retrieveWebUserData(_token, _profile).then(function () { deferred.resolve(); });\r\n\r\n // User is not able to be retrieved\r\n else deferred.resolve();\r\n\r\n return deferred.promise;\r\n }\r\n };\r\n }\r\n);","/**\r\n * Created by jvitoria on 4/1/2015.\r\n */\r\n/* ==============================================================================\r\n\r\n CORE.FILTERS MODULE\r\n\r\n Defines the module namespace for the core.filters\r\n\r\n ============================================================================= */\r\nangular.module('core.filters', []);\r\n\r\n\r\nangular.module('core.filters')\r\n .filter('htmlToPlaintext', function() {\r\n return function(text) {\r\n return String(text).replace(/<[^>]+>/gm, '');\r\n };\r\n })\r\n .filter('tel', function () {\r\n return function (tel) {\r\n if (!tel) { return ''; }\r\n\r\n var value = tel.toString().trim().replace(/^\\+/, '');\r\n\r\n if (value.match(/[^0-9]/)) {\r\n return tel;\r\n }\r\n\r\n var country, city, number;\r\n\r\n switch (value.length) {\r\n case 10: // +1PPP####### -> C (PPP) ###-####\r\n country = 1;\r\n city = value.slice(0, 3);\r\n number = value.slice(3);\r\n break;\r\n\r\n case 11: // +CPPP####### -> CCC (PP) ###-####\r\n country = value[0];\r\n city = value.slice(1, 4);\r\n number = value.slice(4);\r\n break;\r\n\r\n case 12: // +CCCPP####### -> CCC (PP) ###-####\r\n country = value.slice(0, 3);\r\n city = value.slice(3, 5);\r\n number = value.slice(5);\r\n break;\r\n\r\n default:\r\n return tel;\r\n }\r\n\r\n if (country === 1) {\r\n country = \"\";\r\n }\r\n\r\n number = number.slice(0, 3) + '-' + number.slice(3);\r\n\r\n return (country + \" (\" + city + \") \" + number).trim();\r\n };\r\n });","angular.module('services.browser', [])\r\n .factory('BrowserService', function ($window)\r\n {\r\n return {\r\n getBrowserType: function ()\r\n {\r\n var userAgent = $window.navigator.userAgent;\r\n var browsers = {chrome: /chrome/i, safari: /safari/i, firefox: /firefox/i, ie: /mozilla/i};\r\n for (var key in browsers) {\r\n if (browsers[key].test(userAgent)) {\r\n return key;\r\n }\r\n }\r\n return 'ie';\r\n }\r\n };\r\n });","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\nangular.module('services.bulkFuelPriceNotices', ['core.ajax']);\r\n\r\nangular.module('services.bulkFuelPriceNotices',[]).service('bulkFuelPriceNoticesService', function($q, apiService) {\r\n 'use strict';\r\n return {\r\n loadBulkFuelPrices: function(custKey, custLocKey, startDate, endDate) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetBulkFuelPriceNotices/',\r\n data: {\r\n CustKey:custKey,\r\n CustLocKey:custLocKey,\r\n StartDate:startDate,\r\n EndDate:endDate\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n SERVICES.Payments MODULE\r\n\r\n Defines the module namespace for the movie services\r\n\r\n ============================================================================= */\r\nangular.module('services.contactUs', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n Payments SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving movies.\r\n\r\n ============================================================================= */\r\nangular.module('services.contactUs',[]).service('ContactUs', function($q, apiService, $filter) {\r\n 'use strict';\r\n return {\r\n loadContactUsContext: function() {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetContactUsContext/',\r\n data: {}\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n saveMessage: function(message) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/PostContactUsMessage/',\r\n data: message\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\nangular.module('services.customers', ['core.ajax']);\r\n\r\nangular.module('services.customers',[]).service('customerService', function($q, apiService) {\r\n 'use strict';\r\n function execute(apiSvcSettings, deferred){\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n }\r\n\r\n function executeAndNotify(apiSvcSettings, deferred){\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n }\r\n return {\r\n saveCustomerAccountSettings: function (custKey, contactKey, alertAmount, sendAlerts)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SaveCustomerARWebAccountSettings/',\r\n data: {\r\n CustomerKey: custKey,\r\n PrimaryContactKey: contactKey,\r\n AlertAmount: alertAmount,\r\n SendBalanceAlerts: sendAlerts\r\n }\r\n }\r\n );\r\n executeAndNotify(apiSvcSettings, deferred);\r\n return deferred.promise;\r\n },\r\n getCustomerLocations: function (custKey, locType) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetCustomerLocations/',\r\n data: {\r\n CustKey:custKey,\r\n LocationType:locType\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n saveCustomerLocations: function (recStatus, location, custContKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SaveCustomerLocations/',\r\n data: {\r\n CustContKey: custContKey,\r\n RecStatus:recStatus,\r\n Location:location\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n services.documents MODULE\r\n ============================================================================= */\r\nangular.module('services.documents', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n DocumentService\r\n ============================================================================= */\r\nangular.module('services.documents', []).factory('documentService', function ($q, ajax, apiService)\r\n{\r\n\r\n 'use strict';\r\n return {\r\n getNotifications: function (custkey, custContKey, type, beginDate, endDate)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetNotificationsList/',\r\n data: {\r\n CustKey: custkey,\r\n CustContKey: custContKey === \"null\" ? null : custContKey,\r\n Type: type === \"null\" ? null : type,\r\n BeginDate: beginDate,\r\n EndDate: endDate\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getStatements: function (custkey, beginDate, endDate)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetStatementsList/',\r\n data: {\r\n CustKey: custkey,\r\n BeginDate: beginDate,\r\n EndDate: endDate\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n listDocuments: function (referenceNumber, description, startDate, endDate, customerKey, documentType, contactKey)\r\n {\r\n var deferred = $q.defer();\r\n var listAttachmentsCmdParms = {\r\n ReferenceNumber: referenceNumber,\r\n Description: description,\r\n StartDate: startDate,\r\n EndDate: endDate,\r\n CustomerKey: customerKey,\r\n DocumentType: documentType,\r\n ContactKey: contactKey\r\n };\r\n\r\n var apiSvcSettings = new ApiServiceSettings({\r\n method: 'POST',\r\n url: '../api/ListAttachments',\r\n data: listAttachmentsCmdParms\r\n });\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n var documetnList = data.Data;\r\n deferred.resolve(documetnList);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n Get1099AdviceList: function (cust, yb)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/Get1099AdviceList/',\r\n data: {\r\n CustKey: cust,\r\n YearsBack: yb\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","angular.module('services.edoc', ['core.ajax'])\n .service('EdocService', function ($q, apiService) {\n 'use strict';\n \n /**\n * the blob object is only valid for the window it is on,\n * once the window closes the url if captured is no longer valid\n * @param {any} edoc\n * @returns {blob}\n **/\n function createBlob(edoc) {\n var bytes = edoc.EdocStream;\n var type = edoc.MimeType;\n\n var raw = atob(bytes);\n var uint8Array = new Uint8Array(raw.length);\n for (var i = 0; i < raw.length; i++) {\n uint8Array[i] = raw.charCodeAt(i);\n }\n var blob = new Blob([uint8Array], { type: type });\n\n return blob;\n }\n\n /**\n * Takes the specified parameters and generates a edoc blob url\n * @param {number} edocKey\n * @returns {Promise}\n **/\n var renderEdoc = function (edocKey) {\n var deferred = $q.defer();\n var apiSvcSettings = new ApiServiceSettings(\n {\n method: 'POST',\n url: '../api/EdocDetailsSecure',\n data: {\n EdocKey: edocKey\n }\n }\n );\n apiService.execute(apiSvcSettings).then(\n function (data) {\n deferred.resolve(data.Data);\n }\n );\n return deferred.promise;\n };\n\n /**\n * Takes the specified parameters and generates a edoc blob url\n * @param {string} parameters\n * @returns {Promise}\n */\n var renderEdocByRefNo = function (parameters) {\n var deferred = $q.defer();\n var apiSvcSettings = new ApiServiceSettings(\n {\n method: 'POST',\n url: '../api/EdocDetailsSecure/GetByRefNo',\n data: {\n Parameters: parameters\n }\n }\n );\n apiService.execute(apiSvcSettings).then(\n function (data) {\n deferred.resolve(data.Data);\n }\n );\n return deferred.promise;\n };\n\n /**\n * Take the edoc stream and turn it into a blob url and then display it in our pdf viewer\n * If mime type is text/html then that means the document doesnt exist and we need to redirect \n * to the DocumentNotAvailable endpoint\n * @param {any} edoc\n * @returns {string}\n **/\n var createUrl = function (edoc){\n if (edoc) {\n var url;\n \n if (edoc.MimeType === 'text/html'){\n url = '../api/DocumentNotAvailable';\n return url;\n }\n \n var blob = createBlob(edoc);\n var file = URL.createObjectURL(blob);\n url = \"static/pdfjs/web/viewer.html?file=\" + encodeURIComponent(file);\n\n return url;\n }\n };\n\n return {\n renderEdoc: renderEdoc,\n renderEdocByRefNo: renderEdocByRefNo,\n createUrl: createUrl\n };\n });","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n SERVICES.Payments MODULE\r\n\r\n Defines the module namespace for the movie services\r\n\r\n ============================================================================= */\r\nangular.module('services.encrypt', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n Payments SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving movies.\r\n\r\n ============================================================================= */\r\nangular.module('services.encrypt',[]).service('encryptData', function($q, apiService) {\r\n 'use strict';\r\n var encrypt = function(value) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/EncryptString/',\r\n data: {\r\n Value: value\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n };\r\n\r\n return {\r\n encrypt: encrypt\r\n };\r\n});","/* ==============================================================================\r\n\r\n SERVICES.FuelCards MODULE\r\n\r\n Defines the module namespace for the Fuel Cards services\r\n\r\n ============================================================================= */\r\nangular.module('services.FuelCards', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n FuelCards SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving data to the database.\r\n\r\n ============================================================================= */\r\nangular.module('services.FuelCards', [])\r\n .factory('FuelCardsService', function ($q, apiService)\r\n {\r\n 'use strict';\r\n function setDatesToNull(obj)\r\n {\r\n for (var prop in obj)\r\n {\r\n var value = obj[prop];\r\n if (typeof value === 'object')\r\n {\r\n setDatesToNull(value);\r\n }\r\n else\r\n {\r\n if (['1900-01-01T00:00:00', '0001-01-01T00:00:00', '2079-06-06T00:00:00'].indexOf(obj[prop]) > -1)\r\n obj[prop] = null;\r\n }\r\n }\r\n }\r\n\r\n return {\r\n getCards: function (customerContactKey, customerKey, cardFormat, cardNumDesc, isActive, isExpired, isPending, isLocked, isCancelled, department, template)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetCards/',\r\n data: {\r\n CustomerContactKey: customerContactKey,\r\n CustomerKey: customerKey,\r\n CardFormatKey: cardFormat,\r\n CardNumDesc: cardNumDesc,\r\n IsActive: isActive,\r\n IsExpired: isExpired,\r\n IsPending: isPending,\r\n IsLocked: isLocked,\r\n IsCancelled: isCancelled,\r\n Department: department,\r\n Template: template\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n setDatesToNull(data.Data);\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getCardDetails: function (cardKey, canViewCardNumbers)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetCardDetails/',\r\n data: {\r\n CardKey: cardKey,\r\n CanViewCardNumbers:canViewCardNumbers\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n setDatesToNull(data.Data);\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getCardsContext: function (customerKey, compKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetCardsContext/',\r\n data: {\r\n CustomerKey: customerKey,\r\n CompanyKey: compKey\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getTaxAuthorities: function (custKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetTaxAuthorities/',\r\n data: {\r\n CustomerKey: custKey\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n addCard: function (recStatus, card, cardCF, custContKey)\r\n {\r\n setDatesToNull(card);\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SaveCards/',\r\n data: {\r\n Card: card,\r\n CardCF: cardCF,\r\n recStatus: recStatus,\r\n CustContKey: custContKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n saveCards: function (recStatus, card, cardCF, custContKey)\r\n {\r\n setDatesToNull(card);\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SaveCards/',\r\n data: {\r\n Card: card,\r\n CardCF: cardCF,\r\n recStatus: recStatus,\r\n CustContKey: custContKey\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getLookupPrices: function (custContKey, daysBack)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetCardPriceNotices/',\r\n data: {\r\n CustContKey: custContKey,\r\n DaysBack: daysBack\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getPriceNoticesSettings: function (custContKey, cpPriceNoticeRuleKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPriceNoticesSettings/',\r\n data: {\r\n CustContKey: custContKey,\r\n CPPriceRuleKey: cpPriceNoticeRuleKey\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getSearchSites: function (custContKey, city, state, postal, limit)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetSearchSites/',\r\n data: {\r\n CustContKey: custContKey,\r\n City: city,\r\n State: state,\r\n Zip: postal,\r\n Limit: limit\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n savePriceNoticeSettings: function (custContKey, sites, groups, methods)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SavePriceNoticesSettings/',\r\n data: {\r\n CustContKey: custContKey,\r\n PriceNoticesSettingsSites: sites,\r\n PriceNoticesSettingsGroups: groups,\r\n PriceNoticesSettingsMethods: methods\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n blankLocation: {\r\n Key: 0,\r\n ID: '',\r\n Description: '',\r\n Address1: '',\r\n Address2: '',\r\n City: '',\r\n County: '',\r\n StateKey: 0,\r\n PostalCode: '',\r\n Active: -1,\r\n Name: '',\r\n Phone: '',\r\n PhoneFormatted: '',\r\n Email: ''\r\n },\r\n\r\n getCardsDepartments: function (custKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetCardsDepartments/',\r\n data: {\r\n CustKey: custKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n saveCardsDepartments: function (recStatus, custKey, depts, fields, vals, custContKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SaveCardsDepartments/',\r\n data: {\r\n RecStatus: recStatus,\r\n CustKey: custKey,\r\n CustContKey: custContKey,\r\n Departments: depts,\r\n Fields: fields,\r\n Values: vals\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n });\r\n","/* ==============================================================================\nservices.globalizations.js MODULE\n============================================================================= */\nangular.module('services.globalizations', ['core.ajax']);\n\n/* ==============================================================================\nglobalizationSvc\n============================================================================= */\nangular.module('services.globalizations',[]).factory('globalizationSvc', function() {\n\n 'use strict';\n \n // Set the locale to the browser language, if it is null then set it to en-US\n var locale = (window.navigator.language === 'en-US' || window.navigator.language === 'fr-CA') ? window.navigator.language : 'en-US';\n\n return {\n getLocale: function () {\n return locale;\n },\n\n formatCurrency : function(num) {\n // Set the currency id based on the locale, default to USD\n var curID = (locale === 'fr-CA') ? 'CAD' : 'USD';\n\n return num.toLocaleString(locale, {style: 'currency', currency: curID});\n },\n\n formatNumeric: function (num, format) {\n return kendo.toString(num, format, locale);\n },\n\n // See https://docs.telerik.com/kendo-ui/globalization/intl/dateformatting for formats\n formatDateTime: function (dateString, format) {\n if (!dateString || dateString === \"\")\n {\n return \"\";\n }\n \n\n var date = new Date(dateString);\n return kendo.toString(date, format, locale);\n },\n\n convertStringToNumber: function (num) {\n if (typeof (num) === 'number')\n return num;\n\n if (locale === 'en-US') {\n num = num.replace(/[,$]/g, \"\");\n }\n else if (locale === 'fr-CA') {\n num = num.replace(/[$\\s]/g, \"\").replace(\",\", \".\");\n }\n\n return num;\n }\n };\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n services.home MODULE\r\n ============================================================================= */\r\nangular.module('services.home', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n homeService\r\n ============================================================================= */\r\nangular.module('services.home',[]).factory('homeService', function($q, ajax, apiService) {\r\n\r\n 'use strict';\r\n return{\r\n loadHomePageInformation : function(custContKey){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/Home/',\r\n data: {\r\n CustomerContactKey: custContKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","angular.module('services.localizations', [])\r\n .factory('localizationSvcFactory', function ($rootScope) {\r\n var _cachedLocalizations = [];\r\n\r\n var service = {\r\n setLocalizations: function (localizations) {\r\n _cachedLocalizations[localizations] = $rootScope.$eval(localizations);\r\n },\r\n setCachedLocalizations: function () {\r\n var localizationFilesContainer = $(\"#localizationFiles\");\r\n\r\n if (!angular.isUndefinedOrNullOrEmpty(localizationFilesContainer)) {\r\n angular.forEach(localizationFilesContainer.children(), function (item) {\r\n _cachedLocalizations[item.id] = $rootScope.$eval(item.innerText);\r\n });\r\n }\r\n },\r\n getCachedLocalizationsContainer: function (page) {\r\n return {\r\n getLocalizedString: function (string, replacementParms) {\r\n var doesNotExist = angular.isUndefinedOrNullOrEmpty;\r\n\r\n var replaceString = function (result, replacementParms) {\r\n for (var i = 0; i < replacementParms.length; i++) {\r\n result = result.replace(\"{\" + i.toString() + \"}\", replacementParms[i]);\r\n }\r\n return result;\r\n };\r\n\r\n var decodeToUTF8 = function (text) {\r\n return text.replace(/&#(\\d+);/g, function (match, number) {\r\n return String.fromCharCode(number);\r\n });\r\n };\r\n\r\n var getCachedLocalizationsFor = function (page) {\r\n\r\n // load all the localizations defined in the index page\r\n if (doesNotExist(_cachedLocalizations)) {\r\n service.setCachedLocalizations();\r\n }\r\n\r\n var result = _cachedLocalizations[page];\r\n\r\n // if page not found in cache try to recreate it \r\n return result ? result : service.setLocalizations(page);\r\n };\r\n\r\n var fmtResult = function (r, rp) {\r\n return (rp && rp.constructor === Array) ? replaceString(r, rp) : r;\r\n };\r\n\r\n var getStringFrom = function (page) {\r\n return fmtResult(getCachedLocalizationsFor(page)[string], replacementParms);\r\n };\r\n\r\n var result = getStringFrom(page);\r\n\r\n // if we can't find the string check the shared AppLocalization\r\n result = result ? result : getStringFrom(['AppLocalization']);\r\n\r\n // if we found a string return its decoded version to UTF 8 otherwise return the id\r\n return result ? decodeToUTF8(result) : string;\r\n\r\n },\r\n stringFromCharacterEntity: function (str) {\r\n // If we need translated string for an input field (e.g. secret questions editable combo-box) \r\n // we can not use ng-bind-html or k-value-template that fixing encoding issues.\r\n // We need to fix encoding issues via this function. \r\n // If someone finds a better solution for fixing the encoding issue, where it will be possible to get directly corrected text, \r\n // do not hesitate and change this.\r\n return $('').html(str).text();\r\n }\r\n };\r\n }\r\n };\r\n\r\n return service;\r\n })\r\n .factory('localizationSvc', function (localizationSvcFactory)\r\n {\r\n return localizationSvcFactory;\r\n })\r\n .directive('pnLocalizationsSvc', function (templates, localizationSvc)\r\n {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n link: function (scope, element, attrs)\r\n {\r\n localizationSvc.setLocalizations(element.text().trim());\r\n },\r\n templateUrl: function(element, attrs) {\r\n return templates.getTemplate(attrs.moduleName);\r\n }\r\n };\r\n })\r\n .directive('pnLocalizations', function (templates, localizationSvcFactory)\r\n {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n controllerAs: 'pnLocalizationCtrl',\r\n link: function (scope, element, attrs)\r\n {\r\n scope.pnLocalizationCtrl.localizations.setLocalizations(element.text().trim());\r\n },\r\n templateUrl: function(element, attrs) {\r\n return templates.getTemplate(attrs.moduleName);\r\n },\r\n controller: function () {\r\n var self = this;\r\n self.$onInit = function () {\r\n self.localizations = localizationSvcFactory;\r\n };\r\n }\r\n };\r\n })\r\n .directive('pnTemplate', function (templates)\r\n {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: function(element, attrs) {\r\n return templates.getTemplate(attrs.templateName);\r\n }\r\n };\r\n })\r\n;","/* ==============================================================================\n services.logging MODULE\n ============================================================================= */\nangular.module('services.logging', ['core.ajax']);\n\n/* ==============================================================================\n LoggingService\n ============================================================================= */\nangular.module('services.logging', []).factory('LoggingService', function ($q, apiService) {\n 'use strict';\n\n return {\n logErrors: function(error) {\n var deferred = $q.defer();\n var apiSvcSettings = new ApiServiceSettings(\n {\n method: 'POST',\n url: '../api/Logging/',\n data: {\n ExceptionMessage: error.ExceptionMessage,\n Stacktrace: error.Stacktrace\n }\n }\n );\n apiService.execute(apiSvcSettings).then(\n function(data) {\n deferred.resolve(data);\n }\n );\n return deferred.promise;\n }\n };\n});","/**\r\n * Created by jvitoria on 6/18/2015.\r\n */\r\n/* ==============================================================================\r\n services.orders MODULE\r\n ============================================================================= */\r\nangular.module('services.orders', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n ordersService\r\n ============================================================================= */\r\nangular.module('services.orders', [])\r\n .factory('ordersService', function ($q, ajax, apiService)\r\n {\r\n 'use strict';\r\n return {\r\n getOpenOrders: function getOpenOrders(custKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/GetOpenOrders/',\r\n data: {\r\n CustKey: custKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getOrderCustomerLocations: function getOrderCustomerLocations(custKey, requestedDeliveryDate) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/GetOrderCustomerLocations/',\r\n data: {\r\n CustKey: custKey,\r\n RequestedDeliveryDate: requestedDeliveryDate\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getOrdersContext: function getOrdersContext(custKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/GetOrdersContext/',\r\n data: {\r\n CustKey: custKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getOrderLocationInfo: function getOrderLocationInfo(custLocKey, requestedDeliveryDate)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/GetOrderLocationInfo/',\r\n data: {\r\n CustLocKey: custLocKey,\r\n RequestedDeliveryDate: requestedDeliveryDate\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n getOrderDetails: function getOrderDetails(ordKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/GetOrderDetails/',\r\n data: {\r\n OrdKey: ordKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n saveOrderDetails: function saveOrderDetails(orderDetails)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/SaveOrderDetails/',\r\n data: {\r\n OrderDetails: orderDetails\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n\r\n blankOrderHeaderObj: function blankOrderHeaderObj()\r\n {\r\n return {\r\n Command: null,\r\n Comment: null,\r\n CustContKey: null,\r\n CustContName: null,\r\n CustContPhone: null,\r\n CustLocAddress: null,\r\n CustLocCity: null,\r\n CustLocDesc: null,\r\n CustLocKey: null,\r\n CustLocState: null,\r\n CustLocZip: null,\r\n Errors: [],\r\n LangID: 'EN',\r\n OrdCreatedByContKey: null,\r\n OrdDelivDirections: null,\r\n OrdDelivNotes: null,\r\n OrderDetails: [],\r\n OrdKey: null,\r\n OrdNumber: null,\r\n OrdStatus: null,\r\n OrdStatusKey: null,\r\n OrdType: 0,\r\n PONumber: null,\r\n ReqDelivDateTime: null,\r\n Timestamp: null\r\n };\r\n },\r\n\r\n blankOrderDetailsObj: function blankOrderDetailsObj()\r\n {\r\n return {\r\n CustFuelTankKey: null,\r\n ID: null,\r\n MaxVolume: null,\r\n OrderQty: 0,\r\n OrdFuelKey: null,\r\n OrdKey: null,\r\n Product: null,\r\n ProductKey: null,\r\n TankNumber: null,\r\n TimeStamp: null\r\n };\r\n }\r\n\r\n };\r\n });\r\n\r\n","angular.module('services.pages', ['core.ajax']);\nangular.module('services.pages', [])\n .factory('PagesService', function ($q, apiService) {\n 'use strict';\n var localCache = {};\n var Cache = {\n add: function (name, object, expiration) {\n var exp = expiration || 0;\n var now = new Date().getTime();\n localCache[name] = {\n data: object,\n inserted: now,\n expiration: (exp === 0) ? 0 : (now + exp * 1000)\n };\n },\n get: function (name) {\n var now = new Date().getTime();\n if (\n (Object.keys(localCache).indexOf(name) !== -1 && localCache[name].expiration === 0) || (Object.keys(localCache).indexOf(name) !== -1 && localCache[name].expiration > now)\n ) {\n return localCache[name].data;\n }\n else {\n //remove expired object from cache\n if (Object.keys(localCache).indexOf(name) !== -1) {\n delete localCache[name];\n }\n return null;\n }\n },\n exists: function (name) {\n var now = new Date().getTime();\n // if object exists and expiration is 0 (never expires) return true\n // if object exists and expiration is above NOW, return true\n // if object exists and expiration is bellow NOW return false and force services to retrieve new data\n return (\n (Object.keys(localCache).indexOf(name) !== -1 && localCache[name].expiration === 0) || (Object.keys(localCache).indexOf(name) !== -1 && localCache[name].expiration > now)\n ) ? true : false;\n }\n };\n return {\n getWebProfileSiteLayout: function (profileKey) {\n var deferred = $q.defer();\n var apiSvcSettings = new ApiServiceSettings(\n {\n method: 'GET',\n url: '../api/GetWebProfileSiteLayout/' + profileKey + '/',\n skipValidations: true\n }\n );\n if (Cache.exists(\"getWebProfileSiteLayout\")) {\n deferred.resolve(Cache.get(\"getWebProfileSiteLayout\"));\n }\n else {\n apiService.execute(apiSvcSettings).then(\n function (data) {\n Cache.add(\"getWebProfileSiteLayout\", data.Data);\n deferred.resolve(data.Data);\n },\n function (data) {\n deferred.reject(data.ErrorMessages);\n }\n );\n }\n return deferred.promise;\n },\n getAccessToken: function (profileKey, nodeKey) {\n var deferred = $q.defer();\n var apiSvcSettings = new ApiServiceSettings(\n {\n method: 'GET',\n url: '../api/GetAccessToken/' + profileKey + '/' + nodeKey + '/',\n skipValidations: true\n }\n );\n apiService.execute(apiSvcSettings).then(\n function (data) {\n deferred.resolve(data.Data);\n },\n function (data) {\n deferred.reject(data.ErrorMessages);\n }\n );\n return deferred.promise;\n }\n };\n });\n","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n SERVICES.Payments MODULE\r\n\r\n Defines the module namespace for the movie services\r\n\r\n ============================================================================= */\r\nangular.module('services.paperwork', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n Payments SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving movies.\r\n\r\n ============================================================================= */\r\nangular.module('services.paperwork',[]).factory('PaperworkService', function($q, apiService, $rootScope) {\r\n 'use strict';\r\n return{\r\n getPaperworkContext : function(customerContactKey, ignoreStatus){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPaperworkContext/',\r\n data: {\r\n CustomerContactKey:customerContactKey,\r\n IgnoreStatus: ignoreStatus\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getNextPaperworkDate : function(siteKey, ignoreStatus){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetNextPaperworkDate/',\r\n data: {\r\n SiteKey: siteKey,\r\n IgnoreStatus: ignoreStatus\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data.NextPaperworkDate);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getPaperworkBatchesByDate : function(siteKey, startDate, endDate, unposted){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPaperworkBatchesByDate/',\r\n data: {\r\n SiteKey:siteKey,\r\n StartDate:startDate,\r\n EndDate:endDate,\r\n Unposted:unposted\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data.PaperworkBatches);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n OpenPaperworkBatch : function(siteKey, paperworkDate, customerContactKey, emailAddress, readOnly){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPaperworkBatchForEdit/',\r\n data: {\r\n BatchKey : 0,//Batch key is 0 to ensure the paperwork opens by site and date.(New Paperwork)\r\n SiteKey : typeof(siteKey) === \"object\" ?\r\n typeof(siteKey.SiteKey) === \"number\" ? siteKey.SiteKey : 0 :\r\n typeof(siteKey) === \"number\" ? siteKey : 0,\r\n PaperworkDate : paperworkDate,\r\n ContactKey: customerContactKey,\r\n EmailAddress : emailAddress,\r\n ReadOnly : readOnly\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n OpenPaperworkBatchByKey : function(batchKey, customerContactKey, emailAddress, readonly){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPaperworkBatchForEditByKey/',\r\n data: {\r\n BatchKey : batchKey,\r\n ContactKey: customerContactKey,\r\n EmailAddress : emailAddress,\r\n ReadOnly : readonly\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n SubmitPaperwork : function(submitPaperworkCmdParms){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SubmitPaperworkBatch/',\r\n data: submitPaperworkCmdParms\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n $rootScope.$broadcast('event:PaperworkSubmitted', {});\r\n deferred.resolve(data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n GetPaperworkBatchErrorWarning: function (submitPaperworkCmdParms) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPaperworkBatchErrorWarning/',\r\n data: submitPaperworkCmdParms\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n ValidatePaperworkSiteDateForContact : function(siteKey, paperworkDate, customerContactKey, forEntry){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/ValidatePaperworkSiteDateForContact/',\r\n data: {\r\n SiteKey : siteKey,\r\n PaperworkDate : paperworkDate,\r\n ContactKey: customerContactKey,\r\n ForEntry: forEntry\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n RefreshPaperworkLock: function (paperworkBatchKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/RefreshPaperworkLock/',\r\n data: {\r\n PaperworkBatchKey: paperworkBatchKey,\r\n RefreshLock: true\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n RemovePaperworkLock: function (paperworkBatchKey, customerId) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/RemovePaperworkLock/',\r\n data: {\r\n LockType: 1,\r\n LockKey: paperworkBatchKey,\r\n CustomerId: customerId\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n SERVICES.Payments MODULE\r\n\r\n Defines the module namespace for the movie services\r\n\r\n ============================================================================= */\r\nangular.module('services.paperworkDealerForms', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n Payments SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving movies.\r\n\r\n ============================================================================= */\r\nangular.module('services.paperworkDealerForms',[]).service('PaperworkDealerFormsService', function($q, apiService, $filter) {\r\n 'use strict';\r\n var netReadings = 0;\r\n var beginningAndEndingReadings = 1;\r\n var calculatedBasedOnUnitsAndPerUnitAmount = 2;\r\n\r\n return {\r\n loadDealerForms: function (paperworkBatchKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPaperworkDealerForms/',\r\n data: {\r\n PaperworkBatchKey:paperworkBatchKey\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n saveDealerForms:function(header, forms){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SavePaperworkDealerForms/',\r\n data: {\r\n DealerFormsHeader:header,\r\n DealerForms:forms\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n SERVICES.Payments MODULE\r\n\r\n Defines the module namespace for the movie services\r\n\r\n ============================================================================= */\r\nangular.module('services.paperworkTanks', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n Payments SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving movies.\r\n\r\n ============================================================================= */\r\nangular.module('services.paperworkDeliveries',[]).service('PaperworkDeliveriesService', function($q, apiService, $filter) {\r\n 'use strict';\r\n\r\n return {\r\n getDeliveriesWithContext: function (paperworkBatchKey ,forViewOnly) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetPaperworkDeliveriesWithContext/',\r\n params: { paperworkBatchKey: paperworkBatchKey, forViewOnly: forViewOnly }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getDelivery: function (deliveryKey, paperworkBatchKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetPaperworkDelivery/',\r\n params: { deliveryKey: deliveryKey, paperworkBatchKey: paperworkBatchKey }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getSiteFuelAuthorizedOrigins: function (paperworkBatchKey, vendorKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetSiteFuelAuthorizedOrigins/',\r\n params: { paperworkBatchKey: paperworkBatchKey, vendorKey: vendorKey }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n savePaperworkDelivery: function(deliveryHeader, delivery) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SavePaperworkDelivery/',\r\n data: {\r\n DeliveryHeader: deliveryHeader,\r\n FuelDelivery: delivery\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n deletePaperworkDelivery: function(delivery, paperworkBatchKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/DeletePaperworkDelivery/',\r\n params: { paperworkBatchKey: paperworkBatchKey },\r\n data: delivery\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\nangular.module('services.paperworkMeters', ['core.ajax'])\r\n\r\n.service('PaperworkMetersService', function($q, apiService, globalizationSvc) {\r\n 'use strict';\r\n\r\n var beginningAndEndingReadings = 1;\r\n var calculatedBasedOnUnitsAndPerUnitAmount = 2;\r\n\r\n function calculateNet(begin, end)\r\n {\r\n begin = globalizationSvc.convertStringToNumber(begin);\r\n end = globalizationSvc.convertStringToNumber(end);\r\n var diff = end - begin;\r\n\r\n if(parseFloat(end) < parseFloat(begin))\r\n {\r\n var max = begin.toString();\r\n var nMax = \"\";\r\n for(var i = 0;i< max.length; i++)\r\n {\r\n if(max[i] === \".\")\r\n break;\r\n nMax += \"9\";\r\n }\r\n var dMax = parseFloat(nMax) + 1;//Will wound to the next whole \"10\" id 99 to 100.\r\n diff = dMax - begin + end;\r\n }\r\n return parseFloat(diff);\r\n }\r\n\r\n return {\r\n loadMetersForEntry: function (paperworkBatchKey, profitcenterKey, paperworkDate) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPaperworkMeters/',\r\n data: {\r\n ProfitCenterKey:profitcenterKey,\r\n PaperworkDate:paperworkDate,\r\n PaperworkBatchKey:paperworkBatchKey\r\n\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n netAmountCalc: function (meter) {\r\n if (meter.FuelPositionDollarReading !== calculatedBasedOnUnitsAndPerUnitAmount) return;\r\n var netUnits = globalizationSvc.convertStringToNumber(meter.NetUnits);\r\n var rtlPrice = globalizationSvc.convertStringToNumber(meter.RtlPrice);\r\n if (netUnits > 0 && rtlPrice > 0) {\r\n meter.NetAmount = rtlPrice * netUnits;\r\n }\r\n },\r\n calcPerUnit: function (meter, priceToleranceAmount, checkRetailPrice, checkAveragePrice, showRtlPrice) {\r\n //Check average price * compare to previous value\r\n var netUnits = globalizationSvc.convertStringToNumber(meter.NetUnits);\r\n var netAmounts = globalizationSvc.convertStringToNumber(meter.NetAmount);\r\n var rtlPrice = globalizationSvc.convertStringToNumber(meter.RtlPrice);\r\n if (netUnits > 0 && netAmounts > 0) {\r\n meter.CalcPrice = netAmounts / netUnits;\r\n } else {\r\n // If retail price is available then fall back to that like FIME \r\n // Otherwise set the average to zero so we dont give them a bad calculation\r\n if (rtlPrice > 0 && showRtlPrice) {\r\n meter.CalcPrice = rtlPrice;\r\n } else {\r\n meter.CalcPrice = 0;\r\n }\r\n }\r\n },\r\n calculateNetAmountFromEnd: function (meter, index) {\r\n if (meter.FuelPositionDollarReading !== beginningAndEndingReadings) { return; }\r\n\r\n meter.NetAmount = calculateNet(meter.BeginAmount, meter.EndAmount);\r\n },\r\n calculateNetUnitsFromEnd: function (meter, index) {\r\n if (meter.FuelPositionUnitReading !== beginningAndEndingReadings) { return; }\r\n\r\n meter.NetUnits = calculateNet(meter.BeginUnits, meter.EndUnits);\r\n },\r\n calculatePageAmountTotals: function (meters) {\r\n var totalDollar = 0.0;\r\n meters.forEach((meter) => {\r\n var theVal = globalizationSvc.convertStringToNumber(meter.NetAmount);\r\n var pumpTestVal = globalizationSvc.convertStringToNumber(meter.TestAmount);\r\n totalDollar = totalDollar + parseFloat(theVal) - parseFloat(pumpTestVal);\r\n });\r\n return totalDollar;\r\n },\r\n calculatePageUnitTotals: function (meters) {\r\n var totalUnits = 0.0;\r\n meters.forEach((meter) => {\r\n var theVal = globalizationSvc.convertStringToNumber(meter.NetUnits);\r\n var pumpTestVal = globalizationSvc.convertStringToNumber(meter.TestUnits);\r\n totalUnits = totalUnits + parseFloat(theVal) - parseFloat(pumpTestVal);\r\n });\r\n return totalUnits;\r\n },\r\n updateMeters: function (meters) {\r\n meters.forEach((meter) => {\r\n meter.BeginUnits = typeof(meter.BeginUnits) === 'string' ? globalizationSvc.convertStringToNumber(meter.BeginUnits) : meter.BeginUnits;\r\n meter.BeginAmount = typeof(meter.BeginAmount) === 'string'? globalizationSvc.convertStringToNumber(meter.BeginAmount) : meter.BeginAmount;\r\n meter.TestUnits = typeof(meter.TestUnits) === 'string' ? globalizationSvc.convertStringToNumber(meter.TestUnits) : meter.TestUnits;\r\n meter.TestAmount = typeof(meter.TestAmount) === 'string' ? globalizationSvc.convertStringToNumber(meter.TestAmount) : meter.TestAmount;\r\n });\r\n },\r\n savePaperworkMeters: function(meterHeaders, meters)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SavePaperworkMeters/',\r\n data: {\r\n PaperworkMeterHeader: meterHeaders,\r\n PaperworkMeters: meters\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\n * Created by mmagic on 06/02/2022.\n */\n/* ==============================================================================\n\n SERVICES.PaperworkReports MODULE\n\n Defines the module namespace for the paperwork reports services\n\n ============================================================================= */\nangular.module('services.paperworkReports', ['core.ajax'])\n\n/* ==============================================================================\n\n Paperwork Reports SERVICE\n\n Contains services that retrieving paperwork reports.\n\n ============================================================================= */\n.service('PaperworkReportsService', function($q, apiService) {\n 'use strict';\n\n return {\n getPaperworkReports: function (customerContactKey) {\n var deferred = $q.defer();\n var apiSvcSettings = new ApiServiceSettings(\n {\n method: 'POST',\n url: '../api/GetPaperworkReports/',\n data: {\n CustomerContactKey: customerContactKey\n },\n skipValidations: true\n }\n );\n apiService.execute(apiSvcSettings).then(\n function (data) {\n deferred.resolve(data.Data);\n }\n );\n return deferred.promise;\n },\n\n getPaperworkReportSites: function (reportName, customerContactKey) {\n var deferred = $q.defer();\n var apiSvcSettings = new ApiServiceSettings(\n {\n method: 'POST',\n url: '../api/GetPaperworkReportSites/',\n data: {\n ReportName: reportName,\n CustomerContactKey: customerContactKey\n },\n skipValidations: true\n }\n );\n apiService.execute(apiSvcSettings).then(\n function (data) {\n deferred.resolve(data.Data);\n }\n );\n return deferred.promise;\n }\n };\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n SERVICES.Payments MODULE\r\n\r\n Defines the module namespace for the movie services\r\n\r\n ============================================================================= */\r\nangular.module('services.paperworkTanks', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n Payments SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving movies.\r\n\r\n ============================================================================= */\r\nangular.module('services.paperworkTanks',[]).service('PaperworkTanksService', function($q, apiService, $filter) {\r\n 'use strict';\r\n var netReadings = 0;\r\n var beginningAndEndingReadings = 1;\r\n var calculatedBasedOnUnitsAndPerUnitAmount = 2;\r\n\r\n function unFormatNumber(number)\r\n {\r\n if(number.toString().indexOf(',') > -1) {\r\n number = number.replace( /,/g , \"\");\r\n }\r\n if(number.toString().indexOf('$') > -1) {\r\n number = number.replace( /\\$/g , \"\");\r\n }\r\n if(number.length === 0)// || isNaN(number))\r\n return \"0\";\r\n return number;\r\n }\r\n function convertTemp(temp, siteUOM, tankUOM){\r\n if(siteUOM === tankUOM) return temp;//no conversion necessary.\r\n if(tankUOM === 0) return (temp * 1.8) + 32; //Convert c to fl\r\n return (temp - 32) * 0.5555555556;//Convert f to c\r\n }\r\n function convertLinearUnits(units, siteUOM, tankUOM) {\r\n // If site doesnt measure by volume and the tank and site measurements are different then we need to convert the depth\r\n if (siteUOM !== 2 && siteUOM !== tankUOM) {\r\n switch (tankUOM) {\r\n case 0: // Convert to inches\r\n return units * 0.3937;\r\n case 1: // Convert to centimeters\r\n return units * 2.54;\r\n default:\r\n break;\r\n }\r\n }\r\n return units;\r\n }\r\n function convertVolumeToSiteUnits(units, siteUOM, tankUOM) {\r\n // If site doesnt measure by volume and the tank and site measurements are different then we need to convert the depth\r\n if (siteUOM !== 2 && siteUOM !== tankUOM) {\r\n switch (tankUOM) {\r\n case 0: // Convert to inches\r\n return units * 3.785412; \r\n case 1: // Convert to centimeters\r\n return units * 0.264172;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n return units;\r\n }\r\n function getVolume(tankCharts, tank, depth){\r\n var tankUOM = tank.UnitOfMeasure;\r\n var siteUOM = tank.MeasurementType;\r\n var tankChartKey = tank.TankTypeKey;\r\n var tankChart = tankCharts[tankChartKey + \"\"];\r\n\r\n var tankTypeUnits = convertLinearUnits(depth, siteUOM, tankUOM);\r\n var nStr = tankTypeUnits + '';\r\n var x = nStr.split('.');\r\n var wholeNumber = parseInt(x[0], 10) - 1;//subtract 1 from actual number to get index.\r\n var decimalNumber = parseFloat(x.length > 1 ? '0.' + x[1] : '0.0');//Partial units.\r\n var baseAmount = 0;\r\n var partialAmount = 0.00;\r\n if(wholeNumber > 0 && wholeNumber < tankChart.length) {\r\n baseAmount = tankChart[wholeNumber].Volume;\r\n }\r\n if(decimalNumber > 0 && (wholeNumber + 1) < tankChart.length){\r\n var nextAmount = tankChart[wholeNumber + 1].Volume;\r\n var avg = nextAmount - baseAmount;\r\n partialAmount = avg * decimalNumber;\r\n }\r\n if(wholeNumber >= tankChart.length)\r\n baseAmount = tankChart[tankChart.length-1].Volume;\r\n var units = baseAmount + partialAmount;\r\n return convertVolumeToSiteUnits(units, siteUOM, tankUOM);\r\n }\r\n return {\r\n loadTanks: function (paperworkBatchKey, siteKey, paperworkDate) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetPaperworkTanks/',\r\n data: {\r\n PaperworkBatchKey:paperworkBatchKey,\r\n SiteKey:siteKey,\r\n PaperworkDate:paperworkDate\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n calculateTankDepth: function(tank, isMetric){\r\n var base = isMetric?100:12;\r\n var units = (tank.LargeUnits * base) +\r\n tank.SmallUnits +\r\n tank.PartialUnits;\r\n return units;\r\n },\r\n calculateWaterDepth: function(tank){\r\n var units = tank.WaterSmallUnits +\r\n tank.WaterPartialUnits;\r\n return units;\r\n },\r\n getVolumeFromTankChart: function(tank, tankCharts){\r\n return getVolume(tankCharts, tank, tank.Depth);\r\n },\r\n getMaxVolumeFromTankChart: function (tank, tankCharts) {\r\n var tankUOM = tank.UnitOfMeasure;\r\n var siteUOM = tank.MeasurementType;\r\n var tankChartKey = tank.TankTypeKey;\r\n var tankChart = tankCharts[tankChartKey + \"\"];\r\n var maxVolume = tankChart[tankChart.length - 1].Volume;\r\n return convertVolumeToSiteUnits(maxVolume, siteUOM, tankUOM);\r\n },\r\n getWaterVolumeFromTankChart: function(tank, tankCharts){\r\n return getVolume(tankCharts, tank, tank.WaterDepth);\r\n },\r\n adjustVolumeForTemperature: function(useTempCorrections, tank, tempCharts){\r\n if(!useTempCorrections || tank.TmpChartKey <= 0)\r\n return tank.Quantity;\r\n //var tankUOM = tank.UnitOfMeasure;\r\n //var siteUOM = tank.MeasurementType;\r\n var temperature = tank.Temperature;//$scope.convertTemp(tank.Temperature,siteUOM,tankUOM);\r\n var tmpChartKey = tank.TmpChartKey;\r\n var tempChart = tempCharts[tmpChartKey + \"\"];\r\n var conversionFactor = 1;\r\n for(var x=0; x= temperature){//look for the temperature or the next greatest temperature.\r\n conversionFactor = tempChart[x].ConvFactor;\r\n break;\r\n }\r\n conversionFactor = tempChart[x].ConvFactor;//This will set it to the max conversion factor if none is found.\r\n }\r\n var qty = tank.Quantity;\r\n var wQty = tank.WaterQuantity;\r\n if(tank.TmpChartUseNetQty)\r\n return ((qty - wQty) / conversionFactor) + wQty;\r\n return qty / conversionFactor;\r\n\r\n },\r\n savePaperworkTanks: function(tankHeaders, tanks) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SavePaperworkTanks/',\r\n data: {\r\n PaperworkTankHeader: tankHeaders,\r\n PaperworkTanks: tanks\r\n }\r\n }\r\n );\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n SERVICES.Payments MODULE\r\n\r\n Defines the module namespace for the movie services\r\n\r\n ============================================================================= */\r\nangular.module('services.payments', ['core.ajax']);\r\n\r\n/* ==============================================================================\r\n\r\n Payments SERVICE\r\n\r\n Contains the factories and services that pertain to retrieving\r\n and saving movies.\r\n\r\n ============================================================================= */\r\nangular.module('services.payments',[]).factory('PaymentService', function($q, apiService, $rootScope) {\r\n\r\n 'use strict';\r\n return{\r\n getPayment : function(customerKey, webPaymentKey){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = {\r\n method:'POST',\r\n url:'../api/RetrieveWebPayment/',\r\n data: {\r\n CustomerKey:customerKey,\r\n WebPaymentKey:webPaymentKey\r\n }\r\n };\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n // Let's return our promise back to the caller\r\n return deferred.promise;\r\n },\r\n getBudgetPaymentContext: function (customerKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = {\r\n method: 'POST',\r\n url: '../api/BudgetWebPaymentContext/',\r\n data: {\r\n CustomerKey: customerKey\r\n }\r\n };\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n savePayment : function(payment){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = {\r\n method:'POST',\r\n url:'../api/WebPayment/',\r\n data: {\r\n CustomerScheduledPayment : payment.CustomerScheduledPayment,\r\n Invoices : payment.Invoices,\r\n Credits : payment.Credits\r\n }\r\n };\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getScheduledPaymentHistoryContext: function(customerKey){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = {\r\n method:'POST',\r\n url:'../api/WebPaymentHistoryContext/',\r\n data: {\r\n CustomerKey:customerKey\r\n }\r\n };\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getScheduledPayments: function(customerKey, accountKey, startDate, endDate, scheduled, processed, cancelled){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = {\r\n method:'POST',\r\n url:'../api/WebPaymentHistory/',\r\n data: {\r\n CustomerKey: customerKey,\r\n AccountKey: accountKey,\r\n StartDate: startDate,\r\n EndDate: endDate,\r\n Scheduled: scheduled,\r\n Canceled: cancelled,\r\n Processed: processed\r\n }\r\n };\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n lockPayments: function (custContKey, emailAddress, custKey, skipBroadcast) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/LockCustomerPayments/',\r\n data: {\r\n CustContKey: custContKey,\r\n EmailAddress: emailAddress,\r\n CustomerKey: custKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n if(data.Data.CmdSuccess)\r\n {\r\n if (!skipBroadcast) { $rootScope.$broadcast('event:PaymentLocked', { CustContKey: custContKey, EmailAddress: emailAddress, CustomerKey: custKey }); }\r\n deferred.resolve(data.Data);\r\n }else{\r\n deferred.reject(data.Data);\r\n }\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n unLockPayments: function(custContKey, emailAddress, custKey){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method:'POST',\r\n url:'../api/UnLockCustomerPayments/',\r\n data: {\r\n CustContKey: custContKey,\r\n EmailAddress: emailAddress,\r\n CustomerKey: custKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n $rootScope.$broadcast('event:PaymentUnlocked', {});\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n lockInvoices: function (custContKey, emailAddress, custKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method:'POST',\r\n url:'../api/LockCustomerInvoices/',\r\n data: {\r\n CustContKey: custContKey,\r\n EmailAddress: emailAddress,\r\n CustomerKey: custKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n if(data.Data.CmdSuccess)\r\n {\r\n $rootScope.$broadcast('event:InvoiceLocked', { CustContKey: custContKey, EmailAddress: emailAddress, CustomerKey: custKey });\r\n deferred.resolve(data.Data);\r\n }else{\r\n deferred.reject(data.Data);\r\n }\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n unlockInvoices: function(custContKey, emailAddress, custKey){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method:'POST',\r\n url:'../api/UnLockCustomerInvoices/',\r\n data: {\r\n CustContKey: custContKey,\r\n EmailAddress: emailAddress,\r\n CustomerKey: custKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n $rootScope.$broadcast('event:InvoiceUnlocked', {});\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n lockPaymentsAndInvoices: function (custContKey, emailAddress, custKey) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/LockBothPaymentsAndInvoices/',\r\n data: {\r\n CustContKey: custContKey,\r\n EmailAddress: emailAddress,\r\n CustomerKey: custKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n if (data.Data.CmdSuccess) {\r\n deferred.resolve(data.Data);\r\n } else {\r\n deferred.reject(data.Data);\r\n }\r\n }\r\n );\r\n return deferred.promise;\r\n },\r\n getTermsAndConditions: function(termsKey){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method:'POST',\r\n url:'../api/GetLegalTerms/',\r\n data: {\r\n LegalTermKey: termsKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n deferred.resolve(data.Data);\r\n }\r\n ); return deferred.promise;\r\n },\r\n acceptTermsAndConditions: function(termsKey, custKey, contactKey){\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method:'POST',\r\n url:'../api/AcceptLegalTerms/',\r\n data: {\r\n LegalTermKey: termsKey,\r\n CustomerKey: custKey,\r\n CustomerContactKey: contactKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function(data){\r\n deferred.resolve(data.Data);\r\n }\r\n ); return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n Profile SERVICE\r\n\r\n Contains the core profile related code\r\n\r\n ============================================================================= */\r\nangular.module('services.WebProfile', ['core.ajax']);\r\n\r\nangular.module('services.WebProfile', []).factory('WebProfileService', function ($q, $rootScope, ajax, apiService)\r\n{\r\n 'use strict';\r\n function retrieveWebProfileFromAPI(profile)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/WebProfile/',\r\n data: {\r\n WebProfileKey: profile\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n\r\n function retrieveWebProfileMessageFromAPI(webProfileKey, messageType)\r\n {\r\n var deferred = $q.defer();\r\n\r\n if (webProfileKey.toNumber() < 1)\r\n {\r\n deferred.resolve({\r\n Key: 0,\r\n Text: '',\r\n Timestamp: null,\r\n Type: null,\r\n WebProfileKey: 0\r\n });\r\n }\r\n else\r\n {\r\n var ca = ($rootScope.$$childHead.appInfo && $rootScope.$$childHead.appInfo.webUser && $rootScope.$$childHead.appInfo.webUser.CurrentAuthorization) ?\r\n $rootScope.$$childHead.appInfo.webUser.CurrentAuthorization : null;\r\n var custKey = ca ? ca.CustKey : null;\r\n var contactKey = ca ? ca.CustContKey : null;\r\n\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'post',\r\n url: '../api/WebProfileMessage/',\r\n data: {\r\n WebProfileKey: webProfileKey,\r\n MessageType: messageType,\r\n CustomerKey: custKey,\r\n ContactKey: contactKey\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data.WebProfileMessage);\r\n }\r\n );\r\n }\r\n\r\n return deferred.promise;\r\n }\r\n\r\n function iniializeFromApi()\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = {};\r\n\r\n apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/Init/',\r\n params: {}\r\n });\r\n\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n\r\n return deferred.promise;\r\n }\r\n\r\n function getWebAudits(beginDate, endDate, menuCode, includeAdds, includeChanges, includeDeletes, includeEvents, custKey, nameEmail)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetWebAuditEntries/',\r\n data: {\r\n BeginDate : beginDate,\r\n EndDate: endDate,\r\n MenuCode: menuCode,\r\n IncludeAdds: includeAdds,\r\n IncludeChanges: includeChanges,\r\n IncludeDeletes: includeDeletes,\r\n IncludeEvents: includeEvents,\r\n CustKey: custKey,\r\n NameEmail: nameEmail,\r\n MaxRows: 500\r\n }\r\n });\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n\r\n return deferred.promise;\r\n }\r\n\r\n function getARCustWebSheet()\r\n {\r\n return [].slice.call(document.styleSheets).find({title: \"ARCustWebCSS\"});\r\n }\r\n\r\n function setProfileColor(pcolor)\r\n {\r\n if (!$rootScope.profileClasses) {\r\n $rootScope.profileClasses = [];\r\n }\r\n else {\r\n resetStyle('backgroundColor', \"rgb(254, 254, 254)\", $rootScope.profileClasses);\r\n resetStyle('color', \"rgb(254, 254, 254)\", $rootScope.profileClasses);\r\n }\r\n cssOverrideStyle('backgroundColor', \"rgb(254, 254, 254)\", '#' + pcolor, $rootScope.profileClasses);\r\n cssOverrideStyle('color', \"rgb(254, 254, 254)\", '#' + pcolor, $rootScope.profileClasses);\r\n }\r\n\r\n function setLandingColor(pcolor)\r\n {\r\n if (!$rootScope.landingClasses) {\r\n $rootScope.landingClasses = [];\r\n }\r\n else {\r\n if ($rootScope.profileClasses) {\r\n resetStyle('backgroundColor', \"rgb(254, 254, 254)\", $rootScope.profileClasses);\r\n resetStyle('color', \"rgb(254, 254, 254)\", $rootScope.profileClasses);\r\n }\r\n resetStyle('backgroundColor', \"rgb(253, 253, 253)\", $rootScope.landingClasses);\r\n resetStyle('color', \"rgb(253, 253, 253)\", $rootScope.landingClasses);\r\n }\r\n\r\n cssOverrideStyle('backgroundColor', \"rgb(253, 253, 253)\", '#' + pcolor, $rootScope.landingClasses);\r\n cssOverrideStyle('color', \"rgb(253, 253, 253)\", '#' + pcolor, $rootScope.landingClasses);\r\n }\r\n\r\n function cssOverrideStyle(attribute, match, value, classNames)\r\n {\r\n var pdiSheet = getARCustWebSheet();\r\n if (!angular.isUndefinedOrNullOrEmpty(pdiSheet)) {\r\n var rules = pdiSheet.cssRules || pdiSheet.rules;\r\n for (var i = 0; i < rules.length; ++i) {\r\n if (!angular.isUndefinedOrNullOrEmpty(rules[i].style) && rules[i].style[attribute] === match) {\r\n rules[i].style[attribute] = value;\r\n classNames.push([rules[i].selectorText, rules[i].style[attribute]]);\r\n }\r\n }\r\n }\r\n else\r\n $scope.notifier.show('Stylesheet could not be loaded.', 'error');\r\n\r\n }\r\n\r\n function resetStyle(attribute, match, classNames)\r\n {\r\n var pdiSheet = getARCustWebSheet();\r\n if (!angular.isUndefinedOrNullOrEmpty(pdiSheet)) {\r\n var rules = pdiSheet.cssRules || pdiSheet.rules;\r\n for (var x = 0; x < classNames.length; x++) {\r\n for (var i = 0; i < rules.length; ++i) {\r\n if (!angular.isUndefinedOrNullOrEmpty(rules[i].style) && rules[i].selectorText === classNames[x][0] && rules[i].style[attribute] === classNames[x][1]) {\r\n rules[i].style[attribute] = match;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n function cssOverrideAllStyle(attribute, value)\r\n {\r\n var pdiSheet = getARCustWebSheet();\r\n if (!angular.isUndefinedOrNullOrEmpty(pdiSheet)) {\r\n var rules = pdiSheet.cssRules || pdiSheet.rules;\r\n\r\n for (var i = 0; i < rules.length; ++i) {\r\n if (attribute in rules[i].style)\r\n rules[i].style[attribute] = value;\r\n }\r\n }\r\n }\r\n\r\n function cssAddStyle(selector, attribute, value)\r\n {\r\n var pdiSheet = getARCustWebSheet();\r\n if (!angular.isUndefinedOrNullOrEmpty(pdiSheet)) {\r\n var rules = pdiSheet.cssRules || pdiSheet.rules;\r\n var index = rules.length;\r\n\r\n if (\"insertRule\" in pdiSheet) {\r\n pdiSheet.insertRule(selector + \"{ \" + attribute + \": \" + value + \" }\", index);\r\n }\r\n else {\r\n pdiSheet.addRule(selector, attribute + \": \" + value, index);\r\n }\r\n }\r\n }\r\n\r\n return {\r\n setProfileColor: setProfileColor,\r\n setLandingColor: setLandingColor,\r\n setWebProfile: function (profile)\r\n {\r\n var deferred = $q.defer();\r\n if (amplify.store(\"pnprofile\")) {\r\n setLandingColor(amplify.store(\"pnprofile\").ArWebProfile.PrimaryColor);\r\n deferred.resolve(amplify.store(\"pnprofile\"));\r\n } else {\r\n retrieveWebProfileFromAPI(profile).then(function (data)\r\n {\r\n var webProfileWithContext = angular.fromJson(JSON.parse(data)).WebProfileWithContext;\r\n setLandingColor(webProfileWithContext.ArWebProfile.PrimaryColor);\r\n amplify.store(\"pnprofile\", webProfileWithContext);\r\n deferred.resolve(webProfileWithContext);\r\n });\r\n }\r\n return deferred.promise;\r\n },\r\n initialize: function ()\r\n {\r\n var deferred = $q.defer();\r\n var sCfg;\r\n var timeout = parseInt(20, 10) * 60 * 1000;\r\n\r\n iniializeFromApi().then(function (data)\r\n {\r\n sCfg = data.Configuration;\r\n setLandingColor(sCfg.LandingPrimaryColor);\r\n timeout = parseInt(sCfg.Timeout, 10) * 60 * 1000;\r\n $rootScope.timeout = timeout;\r\n deferred.resolve(data);\r\n });\r\n \r\n return deferred.promise;\r\n },\r\n initializeSiteDisabled: function ()\r\n {\r\n var deferred = $q.defer();\r\n\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'GET',\r\n url: '../api/GetSiteDisabledSystemSettings/',\r\n params: {}\r\n });\r\n\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n setLandingColor(data.Data.Configuration.LandingPrimaryColor);\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n\r\n return deferred.promise;\r\n },\r\n getWebProfileMessage: function (webProfileKey, messageType)\r\n {\r\n var deferred = $q.defer();\r\n {\r\n retrieveWebProfileMessageFromAPI(webProfileKey, messageType).then(function (data)\r\n {\r\n deferred.resolve(data.Text);\r\n });\r\n }\r\n return deferred.promise;\r\n },\r\n getWebAudits: getWebAudits\r\n };\r\n});\r\n","angular.module('services.reporting', ['core.ajax'])\n.service('reportingService', function ($q, apiService) {\n 'use strict';\n\n function renderReportApi (parameters) {\n var deferred = $q.defer();\n var apiSvcSettings = new ApiServiceSettings(\n {\n method: 'POST',\n url: '../api/RenderSSRS',\n data: {\n Parameters: parameters\n }\n }\n );\n apiService.execute(apiSvcSettings).then(\n function (data) {\n deferred.resolve(data.Data);\n }\n );\n return deferred.promise;\n }\n\n /**\n * the blob object is only valid for the window it is on,\n * once the window closes the url if captured is no longer valid\n * @param {any} report\n **/\n function createBlob(report) {\n var bytes = report.ReportBytes;\n var type = report.MimeType;\n\n var raw = atob(bytes);\n var uint8Array = new Uint8Array(raw.length);\n for (var i = 0; i < raw.length; i++) {\n uint8Array[i] = raw.charCodeAt(i);\n }\n var blob = new Blob([uint8Array], { type: type });\n\n return blob;\n }\n\n function download(blobUrl, filename) {\n var a = document.createElement(\"a\");\n if (a.click) {\n // Use a.click() if available. Otherwise, Chrome might show\n // \"Unsafe JavaScript attempt to initiate a navigation change\n // for frame with URL\" and not open the PDF at all.\n // Supported by (not mentioned = untested):\n // - Firefox 6 - 19 (4- does not support a.click, 5 ignores a.click)\n // - Chrome 19 - 26 (18- does not support a.click)\n // - Opera 9 - 12.15\n // - Internet Explorer 6 - 10\n // - Safari 6 (5.1- does not support a.click)\n a.href = blobUrl;\n a.target = \"_parent\";\n // Use a.download if available. This increases the likelihood that\n // the file is downloaded instead of opened by another PDF plugin.\n if (\"download\" in a) {\n a.download = filename;\n }\n // must be in the document for IE and recent Firefox versions.\n // (otherwise .click() is ignored)\n (document.body || document.documentElement).appendChild(a);\n a.click();\n a.parentNode.removeChild(a);\n } else {\n if (window.top === window &&\n blobUrl.split(\"#\")[0] === window.location.href.split(\"#\")[0]) {\n // If _parent == self, then opening an identical URL with different\n // location hash will only cause a navigation, not a download.\n var padCharacter = blobUrl.indexOf(\"?\") === -1 ? \"?\" : \"&\";\n blobUrl = blobUrl.replace(/#|$/, padCharacter + \"$&\");\n }\n window.open(blobUrl, \"_parent\");\n }\n }\n\n /**\n * Takes the specified parameters and renders a report in the pdfjs viewer\n * @param {string} parms\n **/\n var renderReport = function (parms) {\n var dataParams = parms + \"&export=False\";\n\n renderReportApi(dataParams).then(function (report) {\n if (report) {\n var url = \"static/pdfjs/web/viewer.html?file=\";\n\n var blob = createBlob(report);\n var file = URL.createObjectURL(blob);\n url = url + encodeURIComponent(file);\n\n $(\"#Main\").attr(\"src\", url);\n }\n });\n };\n\n /**\n * Takes the specified parameters and report format and\n * generates a report that is downloaded\n * @param {string} parms\n * @param {string} format\n **/\n var exportReport = function (parms, format) {\n var dataParams = parms + \"&export=True&exportFormat=\" + format;\n\n renderReportApi(dataParams).then(function (report) {\n if (report) {\n var blob = createBlob(report);\n var isIE = false || !!document.documentMode;\n if (isIE) { // support for ie11\n window.navigator.msSaveBlob(blob, report.Filename);\n } else {\n var file = URL.createObjectURL(blob);\n var filename = report.Filename;\n download(file, filename);\n\n // Releases the resource after the file is downloaded\n URL.revokeObjectURL(file);\n }\n }\n });\n };\n\n return {\n renderReport: renderReport,\n exportReport: exportReport\n };\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\n/* ==============================================================================\r\n\r\n Profile SERVICE\r\n\r\n Contains the core profile related code\r\n\r\n ============================================================================= */\r\nangular.module('services.reports', ['core.ajax']);\r\n\r\nangular.module('services.reports', []).factory('ReportServiceService', function ($q, $rootScope, ajax, apiService)\r\n{\r\n 'use strict';\r\n return {\r\n encrypt: function(data) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/EncryptString/',\r\n data: data\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\nangular.module('services.userAccounts', ['core.ajax']);\r\n\r\nangular.module('services.userAccounts', []).service('userAccountService', function ($q, apiService)\r\n{\r\n 'use strict';\r\n function execute(apiSvcSettings, deferred)\r\n {\r\n apiService.execute(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n }\r\n\r\n function executeAndNotify(apiSvcSettings, deferred)\r\n {\r\n apiService.executeAndNotifyOnSuccess(apiSvcSettings).then(\r\n function (data)\r\n {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n }\r\n\r\n return {\r\n loadContactContext: function (customerContactKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetContactContext/',\r\n data: {\r\n CustomerContactKey: customerContactKey\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n execute(apiSvcSettings, deferred);\r\n return deferred.promise;\r\n },\r\n listContacts: function (customer)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/ListCustomerContacts/',\r\n data: {\r\n CustomerKey: customer\r\n },\r\n skipValidations: true\r\n }\r\n );\r\n execute(apiSvcSettings, deferred);\r\n return deferred.promise;\r\n },\r\n getBlankContact: function ()\r\n {\r\n var contact = {\r\n Active: -1,\r\n AltEmailAddress: \"\",\r\n AltExt: \"\",\r\n AltExt2: \"\",\r\n AltPhone: \"\",\r\n AltPhone2: \"\",\r\n AltPhone2Formatted: \"\",\r\n AltPhone2Type: -1,\r\n AltPhoneFormatted: \"\",\r\n AltPhoneType: -1,\r\n AltSpdDial: \"\",\r\n AltSpdDial2: \"\",\r\n CnSalKey: null,\r\n CPPrcNtcAllProducts: 0,\r\n CPPrcNtcChgByDateTime: null,\r\n CPPrcNtcChgByUser: null,\r\n CPPrcNtcSignupDateTime: null,\r\n CPPrcNtcSignupUser: null,\r\n CreatedBy: \"\",\r\n CustKey: 0,\r\n EmailAddress: \"\",\r\n EmailAddressOrig: \"\",\r\n Ext: \"\",\r\n FAX: \"\",\r\n FAXExt: \"\",\r\n FAXFormatted: \"\",\r\n FAXSpdDial: \"\",\r\n FaxPrefix: \"\",\r\n FirstName: \"\",\r\n Greeting: \"\",\r\n Key: -1,\r\n LastChgBy: \"\",\r\n LastName: \"\",\r\n Notes: \"\",\r\n Phone: \"\",\r\n PhoneFormatted: \"\",\r\n PhoneType: -1,\r\n ReceiveMarketingLetters: false,\r\n SpdDial: \"\",\r\n TextAddressPhone: -1,\r\n TextAddressTextMsgDomKey: -1,\r\n Title: \"\",\r\n WebActive: false,\r\n AllWebFunctions: false,\r\n WebMustChgPwd: -1,\r\n WebPWAccessSingleSite: 0,\r\n WebPWAccessSiteKey: null,\r\n WebPwd: \"\",\r\n WebQuestionAnswer: \"\",\r\n WebQuestionType: -1,\r\n Timestamp: \"\",\r\n EditorName: null,\r\n EditorEmailAddress: null,\r\n ApplyToAll: false,\r\n CustomerContactWebFunctions: [],\r\n CustomerContactWebAlerts: [],\r\n ConfirmEmail: \"\"\r\n };\r\n return contact;\r\n },\r\n saveContact: function (customerContact)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/SaveContact/',\r\n data: {\r\n CustomerContact: customerContact\r\n }\r\n }\r\n );\r\n executeAndNotify(apiSvcSettings, deferred);\r\n return deferred.promise;\r\n },\r\n unsubscribeContact: function (contKey)\r\n {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/UnsubscribeContact/',\r\n data: {\r\n ContactKey: contKey\r\n }\r\n }\r\n );\r\n execute(apiSvcSettings, deferred);\r\n return deferred.promise;\r\n }\r\n };\r\n});","/**\r\n * Created by rhampton on 7/11/2014.\r\n */\r\nangular.module('services.warehousePriceNotices', ['core.ajax']);\r\n\r\nangular.module('services.warehousePriceNotices',[]).service('warehousePriceNoticesService', function($q, apiService) {\r\n 'use strict';\r\n return {\r\n loadWarehousePrices: function(custKey, startDate, endDate) {\r\n var deferred = $q.defer();\r\n var apiSvcSettings = new ApiServiceSettings(\r\n {\r\n method: 'POST',\r\n url: '../api/GetWarehousePriceNotices/',\r\n data: {\r\n CustKey:custKey,\r\n StartDate:startDate,\r\n EndDate:endDate\r\n }\r\n }\r\n );\r\n apiService.execute(apiSvcSettings).then(\r\n function (data) {\r\n deferred.resolve(data.Data);\r\n }\r\n );\r\n return deferred.promise;\r\n }\r\n };\r\n});","angular.module('core.providers', [])\r\n .provider('template', [function() {\r\n\r\n this.$get = function() {\r\n return {};\r\n };\r\n\r\n this.getTemplate = function(templateName) {\r\n var absurl = window.location.protocol + \"//\" + window.location.hostname + window.location.pathname;\r\n var indexOfAppRel = absurl.toLowerCase().indexOf(\"app_release\");\r\n var templateUrl = absurl.substring(0,indexOfAppRel) + \"templates/\" + templateName;\r\n return templateUrl;\r\n };\r\n\r\n }])\r\n .constant('templates', function(templateProvider) { return templateProvider; });"]}