{"version":3,"sources":["app.js","contactUs/contactUs.js","dateSelector/dateSelector.js","documents/documents.js","home/home.js","header/header.js","login/login.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/pricing/odPricing.js","orders/ordering/orders.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","providers/core.providers.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"],"names":["angular","module","config","$routeProvider","$httpProvider","$locationProvider","templateProvider","hashPrefix","when","templateUrl","getTemplate","controller","resolve","localStrings","localizationSvc","getCachedLocalizationsContainer","otherwise","interceptors","push","factory","$rootScope","$q","$injector","request","headers","loginInfo","userIsImpersonated","userId","userKey","userType","impersonatorUserId","impersonatorUserKey","impersonatorUserType","showLoader","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","amplify","store","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","custKey","renderEdocByRefNo","JSON","stringify","EdocDetailsKey","Type","RefNo","CustKey","edoc","createUrl","openEdoc","edocKey","renderEdoc","openEdocEmail","senderAddress","encrypt","encodeURIComponent","openAttachment","attachmentGuid","getWebProfileMessage","messageKey","$on","event","next","current","unLockPayments","CustContKey","EmailAddress","unockInvoices","batch","submitPaperworkCmdParms","SiteKey","PaperworkDate","urlFormatDate","SubmitPaperwork","PreviouslySubmitted","previous","rejection","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","setTimeout","$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","directive","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","showAccounts","showUserOpt","setMenuLocation","setSubMenuLocation","checkUserMenuSecurity","securityGroup","setNewCurrentAuthorization","index","retrieveSelectedProfile","Id","$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","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","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","controllerAs","filter","input","PagesService","ctrl","Context","Pages","Tokens","ViewCustomPages","getWebProfileSiteLayout","customPagesMenuNode","MenuNodes","$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","getPaperworkReports","PaperworkReports","paperworkReports","site","selectedSiteObj","setupNav","retailWarningMessage","averageWarningMessage","setupAppNavigation","apps","app","MenuCode","deliveries","meters","tanks","DealerFormVersionKey","forms","AppKey","openNewPaperworkBatch","OpenPaperworkBatch","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","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","appendTo","gridColNumber","cellIndex","rowIndex","meterGridColIsEditable","model","DollarsEndingState","DollarsNetState","UnitsEndingState","UnitsNetState","FuelPositionUnitReading","FuelPositionDollarReading","onGridKeydown","keyCode","keys","TAB","focusNextEditableCell","initializeMetersGrid","metersGridDS","schema","id","fields","DispenserNo","FuelPositionNo","ProductDescription","RtlPrice","EndAmount","NetAmount","EndUnits","NetUnits","CalcPrice","metersGridOptions","data-field","editor","headerTemplate","hidden","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","submitPaperwork","fuelMetersAppInfo","HasData","IsRequired","HasBeenSubmitted","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","openBeginMeter","beginAmount","beginUnits","useBeginUnits","useBeginAmount","openPumpTest","TestAmount","TestUnits","saveModalValues","BeginAmountOverride","BeginUnitsOverride","PaperworkTanksService","tanksLoaded","postedReadingsExist","NewOSComments","postedTanks","loadTanks","tankIndex","min","partialUnitsEditor","kendoComboBox","partialUnits","dataTextField","dataValueField","selectionElement","selectedRow","selectedRowData","calculateTankValues","calculateWaterVolumeValues","_filterSource","getPartialDescFromValue","Value","PartialUnits","initializeTanksGrid","tanksGridDS","TankNo","ProductId","NoReading","LargeUnits","SmallUnits","Quantity","WaterSmallUnits","WaterPartialUnits","WaterQuantity","Temperature","NetQuantity","Electronic","Depth","tanksGridOptions","setupTankRows","tanksGrid","setupTankGridColumns","target","closest","set","checked","useLargeUnits","quantityOnly","trackWaterLevels","useTempCorrections","calculateVolumeForTemperature","modelRow","getByUid","depth","calculateTankDepth","metric","quantity","getVolumeFromTankChart","tankCharts","netQuantity","adjustVolumeForTemperature","tempCharts","calculateWaterDepth","getWaterVolumeFromTankChart","validateTankOverShort","referenceTank","hasWarning","UseOSWarnings","HasWarning","Min","Max","InventoryTankNo","tolerance","EndQty","OSWarningPct","OSWarningUnits","max","totalValue","calculateTankEndQuantity","tankCommentIsRequired","tank","inventoryTankNo","tankRowValidation","errorFuelQty","warningFuelQty","maxTankVolume","getMaxVolumeFromTankChart","validateTanks","refreshDataSource","PaperworkTanks","PostedPaperworkTanks","PartialUnitsList","Metric","QuantityOnly","UseLargeUnits","UseTempCorrections","TrackWaterLevels","TankCharts","TempCharts","OSComments","RequireOSComments","tanksEditable","tankCommentRequiredError","tankCommentValidation","tankCommentErrorOnBlur","tankCommentErrorOnFocus","savePaperworkTanks","showPostedReadings","popupTitle","gridOptions","el","kendoGrid","refresh","tanksForm","tankHeader","HeaderKey","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","last","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","validationMessage","validationMessageWrn","validatorError","liftDateTime","validatorWarning","warningMsg","maxDateTime","minDateTime","validateLiftDate","pdi","ng","validate","PdiValidation","deliveryDateValidation","deliveryDateTime","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","Caption","DealerFormVersion","focusSet","Rows","DisplayOnly","IsCalculated","onDealerFormChange","DataIDValue","parseFloat","convertStringToNumber","CalcFields","calcField","Calcuations","calc","ResultTypeKey","TypeKey","CalcTypeKey","Operation","getReportFromSubMenu","getPaperworkReportSites","PaperworkReportSites","SubjectArea","intervalPromise","paperworkBatchKey","refreshLock","RefreshPaperworkLock","startLockInterval","stopLockInterval","cancel","pwLockListener","pwSubmitListener","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","webPaymentLocked","paymentControlOptions","CurrentTerms","lockPayments","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","theValue","theGrossValue","theDiscount","TermsDiscountDate","TermsDiscount","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","invoicesLocked","delay","unlockInvoices","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","lockData","Payments","lockPaymentsAndInvoices","CustomerKey","resetValues","paymentLockListener","invoiceLockListener","paymentUnlockListener","invoiceUnlockListener","$route","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","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","ID","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","sortBy","unique","add","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","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","kendoDropDownList","optionLabel","Code","addCardsGridOptions","nullable","validation","number","matches","addCardsGrid","vehicleID","licenseNo","defaultValue","update","destroy","createAt","messages","commands","canceledit","mobile","table","getAttribute","addRow","preventDefault","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","bulkFuelPriceNoticesService","bulkPricesGrid","bulkPricesGridOptions","bulkPricesGridInit","bulkPricesGridDS","bulkFuelPrices","loadBulkFuelPrices","EffDateTimeFormatted","EffDateTime","warehousePriceNoticesService","warehousePricesGrid","warehousePricesGridOptions","warehousePricesGridInit","warehousePricesGridDS","warehousePrices","loadWarehousePrices","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","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","body","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","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","hasError","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","settings","responseType","ApiServiceOperationResult","SuccessMsg","SucessMessage","ErrorTitle","WarningMessages","IsRedirect","RedirectUrl","account","AccountNoMasked","PrenoteDate","RejectedEmailSent","VerificationDate","IsDefault","AccountNextPaymentKey","ScheduledPaymentCount","service","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","post","Content-Type","NotificationService","webAPICall","notifyOnSuccess","suppressErrors","assign","handleSuccess","handleFailure","catch","handleError","executeAndNotifyOnSuccessAndSuppressErrors","executeAndSuppressErrors","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","provider","$get","templateName","absurl","protocol","hostname","pathname","indexOfAppRel","toLowerCase","substring","tel","country","userAgent","navigator","browsers","chrome","safari","firefox","ie","custLocKey","StartDate","EndDate","alertAmount","sendAlerts","executeAndNotify","PrimaryContactKey","AlertAmount","locType","LocationType","Location","custkey","beginDate","BeginDate","customerKey","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","constructor","Array","replaceString","fromCharCode","str","localizationSvcFactory","moduleName","self","$onInit","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","batchKey","readonly","forEntry","ForEntry","RefreshLock","DealerFormsHeader","forViewOnly","vendorKey","deliveryHeader","DeliveryHeader","calculateNet","begin","diff","nMax","profitcenterKey","ProfitCenterKey","netUnits","rtlPrice","checkRetailPrice","checkAveragePrice","showRtlPrice","netAmounts","totalDollar","meterHeaders","PaperworkMeterHeader","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","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","MessageType","ca","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"],"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,iCAEAC,OAAA,CAAA,iBAAA,gBAAA,oBAAA,mBAAA,SAAAC,eAAAC,cAAAC,k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AC,aAAA,KAIAzzC,YAAA,SAAA0zC,iBAEA,IAAAplD,SAAA93C,GAAAguC,QAWA,OAvHA,SAAA+J,eAAAD,UAEAD,WAAAgB,0BAAAd,gBAAAxyC,KACA,SAAAnE,MAEA02C,SAAAv4C,QAAA6B,KAAAg3C,QAiHAkzC,CATA,IAAAtzC,mBACA,CACAjvB,OAAA,OACAhmB,IAAA,sBACA3B,KAAA,CACA4G,gBAAAk1F,mBAIAplD,UACAA,SAAA5J,SAEAvnB,mBAAA,SAAA9O,SAEA,IAAAigC,SAAA93C,GAAAguC,QAWA,OADAmK,QATA,IAAAH,mBACA,CACAjvB,OAAA,OACAhmB,IAAA,6BACA3B,KAAA,CACA8qF,WAAAr0E,WAIAigC,UACAA,SAAA5J,aCrJAvvC,QAAAC,OAAA,iCAAA,CAAA,cAEAD,QAAAC,OAAA,iCAAA,IAAA6gF,QAAA,+BAAA,CAAA,KAAA,aAAA,SAAAz/E,GAAA63C,yBAEA,MAAA,CACAuyB,oBAAA,SAAAzgE,QAAAoH,UAAAG,gBACA,IAAA4mC,SAAA93C,GAAAguC,QACA+J,eAAA,IAAAC,mBACA,CACAjvB,OAAA,OACAhmB,IAAA,mCACA3B,KAAA,CACA8I,QAAAP,QACAuhF,UAAAn6E,UACAo6E,QAAAj6E,kBASA,OALA2mC,WAAAM,QAAAJ,gBAAAxyC,KACA,SAAAnE,MACA02C,SAAAv4C,QAAA6B,KAAAg3C,QAGAN,SAAA5J","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 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 };\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.unockInvoices($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey);\r\n }\r\n\r\n if (next.indexOf('EnterPaperwork') < 0 &&//If we are not navigating to metere\r\n next.indexOf('EnterPaperworkTanks') < 0 &&//OR tanks\r\n next.indexOf('EnterPaperworkDeliveries') < 0 &&//OR deliveries\r\n next.indexOf('EnterPaperworkDealerForms') < 0 &&//or forms\r\n next.indexOf('InventorySummary') < 0 &&//or inventory summary\r\n (current && current.indexOf('/Paperwork/') >= 0))//and we are comming from a paperwork url\r\n {\r\n if (!$scope.appInfo.paperwork) return;//if we dont have a paperwork set then return.\r\n if (!$scope.appInfo.paperwork.batch) return;//if we dont have a paperwork set then return.\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: false,//If this is hit, then close only.\r\n PreviouslySubmitted: false\r\n };\r\n PaperworkService.SubmitPaperwork(submitPaperworkCmdParms);\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 4/25/2014.\r\n */\r\nangular.module('pnHeader', ['core.enums'])\r\n .controller(\"headerMenuCtrl\", function ($scope, $rootScope, WebUserSvc, $filter, $timeout)\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 $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 $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 });","/**\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 });","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 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 });\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 });\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 }\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 },\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 }\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 }\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 {\r\n $scope.focusNextEditableCell();\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 - 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, true, 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, true, 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.saveMeters(\"\", true, false);\r\n };\r\n\r\n $scope.submitPaperwork = function (submit)\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 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 PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data)\r\n {\r\n if (submit)\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.saveMeters = function (path, submit, close, isPrevious)\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\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);\r\n return;\r\n }\r\n if (close) {\r\n $scope.submitPaperwork(false);\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.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 $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\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 min: 0,\r\n spinners: false\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 min: 0,\r\n spinners: false\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 $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\"}\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 = e.container.find(\"input\");\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 dataItem.set(\"NoReading\", this.checked);\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\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 modelRow.set('NoReading', false);\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 modelRow.set('NoReading', false);\r\n modelRow.set('NetQuantity', netQuantity);\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 modelRow.set('NoReading', false);\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 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 var 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.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.submitPaperwork = function (submit)\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 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 PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data)\r\n {\r\n if (submit)\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.savePaperworkTanks = function (path, submit, close, isPrevious)\r\n {\r\n isPrevious = isPrevious ? isPrevious : false;\r\n\r\n if ($('#tanksGrid .k-dirty-cell').length > 0) {\r\n\r\n if (!$scope.validateTanks()) {\r\n return;\r\n } else {\r\n if ($scope.tankCommentIsRequired) {\r\n var commentIsValid = 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 });\r\n }\r\n\r\n if (submit) {\r\n $scope.submitPaperwork(true);\r\n return;\r\n }\r\n if (close) {\r\n $scope.submitPaperwork(false);\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 } else\r\n {\r\n $('')\r\n .appendTo(container);\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 = 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 (!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 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.submitPaperwork = function (submit)\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 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 PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data)\r\n {\r\n if (submit)\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.savePaperworkDelivery = function (path, submit, close, isPrevious)\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 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);\r\n return;\r\n }\r\n if (close)\r\n {\r\n $scope.submitPaperwork(false);\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 var isValid = true;\r\n\r\n return isValid;\r\n },\r\n validatorWarning: function (liftDateTime, parms)\r\n {\r\n if (angular.isUndefinedOrNullOrEmpty(liftDateTime))\r\n {\r\n return true;\r\n }\r\n\r\n var hasWarning = false;\r\n var warningMsg = '';\r\n\r\n if ($scope.appInfo.paperwork.deliveries.fuelDelivery.DelivDateTime > liftDateTime)\r\n {\r\n warningMsg = localStrings.getLocalizedString(\"DeliveryDateNot\");\r\n hasWarning = true;\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 ((liftDateTime > $scope.formatDateTime(maxDateTime)) || (liftDateTime < $scope.formatDateTime(minDateTime)))\r\n {\r\n if (warningMsg !== '')\r\n {\r\n warningMsg = warningMsg + '\\r\\n';\r\n }\r\n warningMsg = warningMsg + localStrings.getLocalizedString(\"LiftDateNotWithin\");\r\n hasWarning = true;\r\n }\r\n\r\n this.validationMessageWrn = warningMsg;\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 isValid = true;\r\n\r\n return isValid;\r\n },\r\n validatorWarning: function (deliveryDateTime, parms)\r\n {\r\n var hasWarning = false;\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 ((deliveryDateTime > $scope.formatDateTime(maxDateTime)) || (deliveryDateTime < $scope.formatDateTime(minDateTime)))\r\n {\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, $filter, PaperworkDealerFormsService, $location, WebFunctions, $timeout, templates, globalizationSvc, setupNav)\r\n {\r\n 'use strict';\r\n $scope.dealerFormsLoaded = 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.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.saveDealerForms('', true, false);\r\n };\r\n\r\n $scope.submitPaperwork = function (submit)\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 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 PaperworkService.SubmitPaperwork(submitPaperworkCmdParms).then(function (data)\r\n {\r\n if (submit)\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.saveDealerForms = function (path, submit, close, isPrevious)\r\n {\r\n isPrevious = isPrevious ? isPrevious : false;\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);\r\n return;\r\n } else if (close) {\r\n $scope.submitPaperwork(false);\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 $scope.appInfo.paperwork.dealerForms.AllFields[index].DataIDValue = 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\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 //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 $scope.startLockInterval();\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 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 pwLockListener();\r\n pwSubmitListener();\r\n paperworkBatchKey = 0;\r\n });\r\n\r\n })\r\n .factory(\"setupNav\", [function($location)\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 //http://localhost/arcustweb/Templates/MakeAPayment\"\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, $http, $q, $routeParams, $filter, PaymentService, validatorSvc, WebFunctions, templates, localStrings, localizationSvc, globalizationSvc, $rootScope)\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 $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 $scope.initializePart2();\r\n },\r\n function (err)\r\n {\r\n $scope.appInfo.webPaymentLocked = true;\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\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 if (new Date($scope.appInfo.webPayment.WebPaymentWithContext.CustomerScheduledPayment.PaymentDate) <= new Date(charge.TermsDiscountDate))\r\n {\r\n theGrossValue = theGrossValue + parseFloat(globalizationSvc.convertStringToNumber(charge.Balance));\r\n theDiscount = theDiscount + charge.TermsDiscount;\r\n theValue = theValue + (Math.round((parseFloat(globalizationSvc.convertStringToNumber(charge.Balance)) - charge.TermsDiscount) * 10000) / 10000);\r\n } else\r\n {\r\n theGrossValue = theGrossValue + parseFloat(globalizationSvc.convertStringToNumber(charge.Balance)); \r\n theDiscount = theDiscount + 0;\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 $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 $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 $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 $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.unockInvoices($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 .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.unockInvoices($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey);\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.unockInvoices($scope.appInfo.webUser.CurrentAuthorization.CustContKey,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustomerContact.EmailAddress,\r\n $scope.appInfo.webUser.CurrentAuthorization.CustKey);\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, PaymentService, $rootScope, $interval)\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 /*\r\n Use $interval to periodically refresh the locks.\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 payment/invoices are unlocked.\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 lockData;\r\n var invoicesLocked;\r\n var intervalTime = 120000;//Every 2 mins\r\n\r\n function refreshLock() {\r\n if (!angular.isUndefinedOrNullOrEmpty(lockData)) {\r\n if (!invoicesLocked) {\r\n console.log(\"Payments lock refreshed\");\r\n PaymentService.lockPayments(lockData.CustContKey, lockData.EmailAddress, lockData.CustomerKey, true);\r\n } else {\r\n console.log(\"Payments and Invoices lock refreshed\");\r\n PaymentService.lockPaymentsAndInvoices(lockData.CustContKey, lockData.EmailAddress, lockData.CustomerKey);\r\n }\r\n }\r\n }\r\n\r\n function resetValues() {\r\n invoicesLocked = false;\r\n lockData = null;\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 //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 $scope.startLockInterval();\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 });\r\n\r\n //Stop the interval when unlocked\r\n var paymentUnlockListener = $rootScope.$on('event:PaymentUnlocked', function () {\r\n $scope.stopLockInterval();\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 $scope.stopLockInterval();\r\n paymentUnlockListener();\r\n invoiceUnlockListener();\r\n paymentLockListener();\r\n invoiceLockListener();\r\n resetValues();\r\n });\r\n\r\n })\r\n .controller(\"PaymentAccountsCtrl\", function ($scope, $http, $q, $rootScope, $route, 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(\"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 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 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;","\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\nfunction ApiServiceSettings(settings)\r\n{\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\nfunction ApiServiceOperationResult(data)\r\n{\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\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.executeAndSuppressErrors(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.executeAndNotifyOnSuccessAndSuppressErrors(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.executeAndSuppressErrors(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);","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; });","/**\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, $filter, $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.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 };\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(siteUOM === tankUOM) return units;//no conversion necessary.\r\n if(tankUOM === 0) return units * 0.3937; //Convert cm to in\r\n return units * 2.54;//Convert in to cm\r\n }\r\n function convertVolumeToSiteUnits(units, siteUOM, tankUOM){\r\n if(siteUOM === tankUOM) return units;//no conversion necessary.\r\n if(siteUOM === 0) return units * 0.264172; //Convert liters to gal\r\n return units * 3.785412;//Convert gal to liters\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, ajax, 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 unockInvoices: 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});"]}