GithubHelp home page GithubHelp logo

fintx-accounting's Introduction

FinTx Accounting Project

Maven Central GitHub release Apache 2 Join the chat at https://gitter.im/fintx/fintx-accounting Coverage Status Dependency Status

FinTx[1]

What's is FinTx?

FinTx is an open source group focus on financial technologies.

What's is fintx-accounting

fintx-accounting is general accounting project for all fintx projects. It supports:

  • Double entry accounting/booking;
  • Single entry accounting/booking;
  • Account operation/control;
  • 24*7 working;
  • multi time zone region;

Using

This is something that you get for free just by adding the following dependency inside your project:

<dependency>
    <groupId>org.fintx</groupId>
    <artifactId>fintx-accounting</artifactId>
    <version>${latest.version></version>
</dependency>

Example

        String codeOfAccounts = "11223344";
        String organizationNo = "010101";
        String productNo = "010101";
        String customerNo = "120222";
        String accountNo2 = "1122334455667777";
        String accountNo3 = "1122334455667788";
        
        // build and persist accountNo
        AccountNoSection.Builder accountNoSectionBuilder = AccountNoSection.builder();
        accountNoSectionBuilder.codeOfAccounts(codeOfAccounts);
        accountNoSectionBuilder.organizationNo(organizationNo);
        accountNoSectionBuilder.productNo(productNo);
        accountNoSectionBuilder.customerNo(customerNo);
        // ...
        AccountNoSection acocuntNoSection = accountNoSectionBuilder.build();
        String accountNo1 = accountNoService.createAccountNo(acocuntNoSection);
        //
        accountNo1 = accountNoService.getAccountNo(acocuntNoSection);

        // Open account
        Operation.Builder operationBuilder = Operation.builder();
        operationBuilder.openCustomer(codeOfAccounts, accountNo1, organizationNo, productNo, customerNo);
        // ...
        Operation operation = operationBuilder.build();
        detailLedgerService.post(operation);
        

        // build voucher
        Voucher.Builder voucherBuilder = Voucher.builder();
        // ...
        Voucher voucher = voucherBuilder.build();

        // post transaction for associated voucher
        
        Transaction.Builder transactionBuilder = Transaction.builder();
        transactionBuilder.associate(voucher);
        transactionBuilder.credit(codeOfAccounts, accountNo1, new BigDecimal("100.00"));
        transactionBuilder.debit(codeOfAccounts, accountNo2, new BigDecimal("50.00"));
        transactionBuilder.debit(codeOfAccounts, accountNo3, new BigDecimal("50.00"));
        Transaction transaction = transactionBuilder.build();
        detailLedgerService.post(transaction);

        // audit transaction
        TransactionFlag[] transflags = { TransactionFlag.RECORD };
        TransactionSymbol[] transSymbols = { TransactionSymbol.CREDIT };
        List<TransactionEntry> transactionEntries =
                detailLedgerService.auditTransaction(codeOfAccounts, accountNo1, LocalDate.now(), transflags, transSymbols, voucher.getBusinessId());

        // operate account
        operationBuilder = Operation.builder();
        operationBuilder.freeze(codeOfAccounts, accountNo1, new BigDecimal("50.00"));
        operationBuilder.lock(codeOfAccounts, accountNo1, voucher.getBusinessId());
        // ...
        operation = operationBuilder.build();
        detailLedgerService.post(operation);

        // audit operation
        OperationSymbol[] operSymbols= {OperationSymbol.OPEN,OperationSymbol.CLOSE};
        List<OperationEntry> operationEntries = detailLedgerService.auditOperation(codeOfAccounts, accountNo3, LocalDate.now(),operSymbols, voucher.getBusinessId());

      

[1] FinTx https://www.fintx.org/
[2] Maven https://maven.apache.org/

fintx-accounting's People

Contributors

bluecreator avatar

Watchers

James Cloos avatar Rudy Sorto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.