Skip to content

PaymentDetailsComponent

reference
3 min readUpdated

Kind: Class

Source: Pams/Web/Pams.Web/Client/app/components/payments/payment-details/payment-details.component.ts (line 55)

Part of: Pams

PaymentDetailsComponent manages the payment-details view in the PAMS web client. It loads payment records, currencies, authorization state, and opened tabs, then prepares table data and edit controls for the user interface.

Implements: OnInit, ComponentCanDeactivate

Methods

MethodSignatureReturns
GetAuthorizationAccessGetAuthorizationAccess(url: string)void
checkAllowedToEditcheckAllowedToEdit()void
ngOnInitngOnInit()void
getRecordgetRecord()void
getOpenedTabsgetOpenedTabs()void
resetreset()void
openLibraryopenLibrary()void
getCurrenciesgetCurrencies()void
fillTableViewfillTableView()void
disablingAllocatedAmountdisablingAllocatedAmount()void
fillColumnsfillColumns()void
cellUpdated_HandlercellUpdated_Handler(e: InvoicesForPayment)void
ifInOwnCurrencyifInOwnCurrency(dataField: undefined)boolean
displayFormattedCurrencydisplayFormattedCurrency(value: undefined, dataField: undefined, rowData: undefined)void
formatCellsformatCells(e: undefined)void
getClientsgetClients()void
getPrinciplesgetPrinciples()void
getReceivingMethodgetReceivingMethod()void
selectTextselectText(e: undefined)void
applyFilterapplyFilter()void
onKeyDownonKeyDown(e: KeyboardEvent)void
getPaymentByPaymentIDgetPaymentByPaymentID()void
changeTabschangeTabs(targetTab: undefined)void
savePaymentsavePayment(SaveAndLeave: undefined)void
ValidatePaymentValidatePayment()boolean
SelectAccountSelectAccount(ID: undefined)void
DeSelectAccountDeSelectAccount(ID: undefined)void
GetInvoicesbyAccountIDGetInvoicesbyAccountID(withoutNewAllocated: boolean)void
AutomaticAmountDivisionAutomaticAmountDivision()void
displaydisplay(data: undefined)void
DataChangedDataChanged()void
gridItem_KeyPress_NumbergridItem_KeyPress_Number(event: undefined)void
chanegRecievingMethodchanegRecievingMethod(e: undefined)void
getCurrencyRategetCurrencyRate(currency: CurrencyRate)void
currencyChangedcurrencyChanged(e: undefined)void
enteringAmountenteringAmount(e: undefined)void
ngOnDestroyngOnDestroy()void
openPopupopenPopup(n: string, t: string, i: string, btnTxt: string)void
OnOpenedPopupOnOpenedPopup()void
savePopupsavePopup()void
checkcheck()void
closePopupclosePopup()void
saveAndClosesaveAndClose()void
closeclose()void
leavePageleavePage()void
ClosewithDonotSaveClosewithDonotSave()void
canDeactivatecanDeactivate()void
changeRateAssistantListchangeRateAssistantList(e: undefined, index: number)void
selectNumberselectNumber(e: undefined, input: undefined)void
disSelectNumberdisSelectNumber(e: undefined, input: undefined)void

Properties

PropertyType
alertsAlertsComponent
sharedPopupSharedPopupComponent
DataValidatorDxValidationGroupComponent
FileLibraryFilesComponent
attachedDropdownSharedAttachedDocsComponent
environmentany
RelatedToTypeany
displayedInvoicesInvoicesForPayment[]
allocateddInvoicesInvoicesForPayment[]
checkChangesInvoicesInvoicesForPayment[]
allowedtoEditboolean
allowedtoNewboolean
IsNewPaymentboolean
paymentIDnumber
_passIdAsInputnumber
firstInitializedboolean
EnableEditingModeboolean
disabledNewAllocationboolean
popupany
receivingPaymentMethodReceivingMethod[]
recevingMethodsEnumany
ModuleEnumIdany
LogModuleIdany
selectedDocsFileData[]
paymentPaymentDetails
oldPaymentPaymentDetails
CompletelyAllocatedInvoicesstring[]
dataSourceany
idColumnsNameany
selectedIDsany[]
clientListClient[]
principalListSupplier[]
NoChange_CanLeaveboolean
Change_Saved_CanLeaveboolean
Change_NoSave_WantLeaveboolean
isLeavingboolean
allowleaveboolean
Changedboolean
DateDisplayFormatany
salesInvoiceTypeboolean
tabsSwitchstring
LodingPanalMessageany
loadingVisibleany
subscriptionSubscription
currencyRateCurrencyRate
defaultCurrencyany
isProcessActiveBooleanboolean
advColumnsAdvColumn[]
advColumnInvoiceNoAdvColumn
advColumnInvoiceDateAdvColumn

Where it refuses work

  • PaymentDetailsComponent stops the work with an early return when this.allowedtoEdit.
  • PaymentDetailsComponent stops the work with an early return when this.allowedtoNew.
  • PaymentDetailsComponent stops the work with an early return when dataField == "TotalAmount" || dataField == "PaidAmount" || dataField == "DeductionAmount"….
  • PaymentDetailsComponent stops the work with an early return when !this.ValidatePayment().
  • PaymentDetailsComponent stops the work with an early return when this.NoChange_CanLeave.
  • PaymentDetailsComponent stops the work with an early return when this.Change_Saved_CanLeave.

Diagram

mermaid
graph LR
    A[PaymentDetailsComponent] --> B[ngOnInit]
    B --> C[GetAuthorizationAccess]
    B --> D[getRecord]
    B --> E[getOpenedTabs]
    B --> F[getCurrencies]
    D --> G[fillTableView]
    C --> H[checkAllowedToEdit]
    G --> I[disablingAllocatedAmount]
    A --> J[openLibrary]
    A --> K[reset]

Usage

ts
import { TestBed } from '@angular/core/testing';
import { PaymentDetailsComponent } from './payment-details.component';

const fixture = TestBed.createComponent(PaymentDetailsComponent);
const component = fixture.componentInstance;

// Runs component initialization and loads payment-related data.
fixture.detectChanges();

// Open the related library view when needed.
component.openLibrary();

// Reset the payment-details state.
component.reset();

AI Coding Instructions

  • Keep initialization work in ngOnInit() and preserve the existing loading order for authorization, records, tabs, and currencies.
  • Call checkAllowedToEdit() after authorization data is available before enabling payment-detail edits.
  • Update fillTableView() when changing the record shape or table columns so displayed payment data remains aligned with the source record.
  • Review disablingAllocatedAmount() when changing allocation rules or edit-state behavior.
  • Keep reset() and openLibrary() aligned with the navigation and state-management patterns used by surrounding payment components.

Used by

2 references from 2 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

Imported by (2)

  • AppRoutingModulePams/Web/Pams.Web/Client/app/app-routing.module.ts:1
  • TranslateHandlerPams/Web/Pams.Web/Client/app/app.module.ts:1

Was this page helpful?

Download as PDF