Search in sources :

Example 6 with FinancialAccount

use of org.estatio.module.financial.dom.FinancialAccount in project estatio by estatio.

the class Guarantee method changeGuaranteeType.

public void changeGuaranteeType(GuaranteeType guaranteeType) {
    FinancialAccountType financialAccountType = guaranteeType.getFinancialAccountType();
    if (financialAccountType != null) {
        FinancialAccount financialAccount = financialAccountRepository.newFinancialAccount(financialAccountType, this.getReference(), this.getName(), this.getSecondaryParty());
        this.setFinancialAccount(financialAccount);
    }
    this.setGuaranteeType(guaranteeType);
}
Also used : FinancialAccountType(org.estatio.module.financial.dom.FinancialAccountType) FinancialAccount(org.estatio.module.financial.dom.FinancialAccount)

Example 7 with FinancialAccount

use of org.estatio.module.financial.dom.FinancialAccount in project estatio by estatio.

the class InvoiceAttributesVM method getSellerBankAccountBankName.

@Programmatic
public String getSellerBankAccountBankName() {
    FinancialAccount financialAccount = invoice.getSellerBankAccount();
    if (!(financialAccount instanceof BankAccount)) {
        return null;
    }
    final BankAccount bankAccount = (BankAccount) financialAccount;
    Party bank = bankAccount.getBank();
    if (bank == null) {
        return null;
    }
    return bank.getName();
}
Also used : Party(org.estatio.module.party.dom.Party) FinancialAccount(org.estatio.module.financial.dom.FinancialAccount) BankAccount(org.estatio.module.financial.dom.BankAccount) Programmatic(org.apache.isis.applib.annotation.Programmatic)

Example 8 with FinancialAccount

use of org.estatio.module.financial.dom.FinancialAccount in project estatio by estatio.

the class InvoiceAttributesVM method getSellerBankAccountIban.

@Programmatic
public String getSellerBankAccountIban() {
    FinancialAccount financialAccount = invoice.getSellerBankAccount();
    if (!(financialAccount instanceof BankAccount)) {
        return null;
    }
    final BankAccount bankAccount = (BankAccount) financialAccount;
    return bankAccount.getIban();
}
Also used : FinancialAccount(org.estatio.module.financial.dom.FinancialAccount) BankAccount(org.estatio.module.financial.dom.BankAccount) Programmatic(org.apache.isis.applib.annotation.Programmatic)

Aggregations

FinancialAccount (org.estatio.module.financial.dom.FinancialAccount)8 Programmatic (org.apache.isis.applib.annotation.Programmatic)5 BankAccount (org.estatio.module.financial.dom.BankAccount)4 FinancialAccountType (org.estatio.module.financial.dom.FinancialAccountType)4 Party (org.estatio.module.party.dom.Party)4 AgreementRoleType (org.estatio.module.agreement.dom.role.AgreementRoleType)2 AgreementType (org.estatio.module.agreement.dom.type.AgreementType)2 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 Inject (javax.inject.Inject)1 Action (org.apache.isis.applib.annotation.Action)1 DomainService (org.apache.isis.applib.annotation.DomainService)1 NatureOfService (org.apache.isis.applib.annotation.NatureOfService)1 BankAccountsAndMandatesDto (org.estatio.canonical.bankmandate.v1.BankAccountsAndMandatesDto)1 BankMandateDto (org.estatio.canonical.bankmandate.v1.BankMandateDto)1 BankAccountDto (org.estatio.canonical.financial.v1.BankAccountDto)1 AgreementRole (org.estatio.module.agreement.dom.AgreementRole)1 AgreementRoleRepository (org.estatio.module.agreement.dom.AgreementRoleRepository)1 AgreementRoleTypeRepository (org.estatio.module.agreement.dom.role.AgreementRoleTypeRepository)1 AgreementTypeRepository (org.estatio.module.agreement.dom.type.AgreementTypeRepository)1