Skip to main content

Posts

Showing posts from 2012

Openbravo Code Management

Speed up numeric data entry in Openbravo

Openbravo 3.0 brings in a whole new refreshing change to the way ERP Applications have been designed. 

Did you know that in Openbravo 3 you can enter a formula in a numeric field?

Let's say that you are closing your period and you know that you know that $12,235.48 expense needs to be distributed 60% for department A and 4% for department B.

Should you pull out your calculator?

Not with Openbravo 3. While entering your journal entry, you can type directly "=12235.48*0.60" and you will get the figure you need!

In Openbravo 3, any numeric fields supports calculations. Start you entry with the "=" character and then enter any calculation formula that supports +, -, *, / as operands. You can also use brackets!

It is much faster than pulling out that old calculator!

Source : https://plus.google.com/u/1/106720987434895771474/posts/HfB7xTWaTuz

Sub reports in Openbravo

Report is one of the key USP for any ERP application. The more enhanced and flexible the reports are, more happy is the customer. In Openbravo, jasper reports provides us the flexibility to handle all this. iReport is one  tool that can be used to create jasper reports. I have provided a simple example of how to add sub-report for an Openbravo Report using iReport. Main Report: Assume we have created a main report with the following query and layout. Adding Sub Report: The Sub Report can be created by adding the sub report icon as follows. The sub-report can be added by drag and dropping the highlighted portion in the above screen shot. It will open the sub report wizard. The sub report can be created in any one of the following three ways. Each way has different number of configuration steps. 1. A new sub report can be created using the wizard by using the "Create a new Report" Option. This will ask for all the options needed to create a new report including the report query…

Dissecting the enigma of Love - 1 : Wavelength

Long since I wrote a post and probably best for the rest of you guys. I heard that. But I am not going to quit. This post is all about the magic/curse (depending on the shore you are) LOVE and the concepts of wavelengths that's more often associated with love. I will blend 'them' and 'we' in the post because we are actually part of the clan.

First let me tell a small story. Two people start loving each other. Simple as that. When that magical feel starts, for the next couple of months, you can more often see the following things happen:
1. Both wear same colour dress often.
2. They often talk the same sentence unknowingly.
3. They know what the other person wants even when they are miles apart.
4. He / She calls just when the other person takes the phone to call.
5. They gift things which the other one thought of buying few days back.
6. When he turns to see her, she will also automatically turn to see him.

All these just not only happens in movies. It happen…

The Genius of Michael Clarke and the beauty of Test Cricket

With lot of emphasis on this years IPL, I am sure most of us forgot what was happening in the cricket world before the same. There were couple of real bad foreign tours for India (England and Australia) and same was the fate for England in Pakistan. But what's worse was India not even reaching the finals of the Asia Cup 2012. Bangladesh and Pakistan played the finals in which Pakistan won the match and Bangladesh won the hearts.

In the middle of all this hype, Australia quietly played a spectacular series against West Indies. No one expected Windies to even give a fight, but they way they played was a treat to watch. They drew the one dayers 2-2 and the T20's 1-1. Then came the 3 match test series. If I am not wrong, Australia won it 2-0. But it was really lot more closer than the results showed. But one phase of play was really an intriguing session. It was near to the close of the third with around 7 overs left. West Indies were 9 down and their wicket keeper Baugh was on cre…

Dissecting Openbravo 3.0 UI Architecture

Having been worked on Openbravo 3.0 UI for more than a year now (right from RC1) , Openbravo has leaped ahead of most contemporary ERP's in terms of UX design and usability. And a part of the credit has to go to the community too as they were actively involved in finalizing the UX and also involved enthusiastically in tested out the RC versions and providing their feedback.

In this post, I have tried to draw limelight on the basic UI components that are being used in Openbravo and their corresponding smartclient components. This is just to provide a very high level idea on how the entire architecture is coupled together. I have tried to use a single screen shot of Openbravo interface and tried to map the base components here.

The hierarchy can be visualized in simple terms as follows:

Exhaustive information on these components are provided in the Openbravo Wiki here.

Most of these components are defined and managed from individual files (or code) thereby making it really easy to …

How to remove non-alphabets from a String

This post is all about how to remove all characters that are not alphabets from a String. For the reverse of the same, refer here. For eg, if you want to only "ABC" from "A1@348474B*&C" then the following snippet of code would be fine in Java.

String test = "A1@348474B*&C";
test = test.replaceAll("[a-zA-Z]",""); //This will replace all non alpha characters
System.out.println("The extracted String is "+test);

The output of the above code will be,

The extracted String is ABC

Hope this was helpful to you in someway. Happy Working...

How to extract numbers from a String

This is a simple post on how to extract numbers from a String. I had tried too many methods for the same, and though performance wise this solution cannot be the same, it certainly is the most simple solution that I ever come across. I got this solution  from CodeRanch or StackOverflow (not sure), but thought better to blog so that I can refer it easily later. ..:)

String test = "ABC10DEF20";
test = test.replaceAll("\\D",""); //This will replace all non numeric characters with 
System.out.println("The Number is "+test);

The output of the above snippet of code will be

The Number is 1020


Planning to write more such very small posts that can be used a quick reference.

Happy Working....

How to set vim as your default editor in Ubuntu

Programming and specially coding has taken a quantum leap over the years. But what's not changed much are the developers..;). I have seen too many so called developers who know only to code IDE's like Eclipse, Netbeans, IntelliJ, etc. I respect them. I do not admonish them. In fact I am a master of developing swing applications in java. But I never wrote the code for the artifacts. I used the Netbeans UI designer for most parts of it. But to learn coding that stays with you forever and for hardcore coders, I guess editors like emacs and vim gives the ultimate pleasure.

I got  introduced into vim way late in my  programming career, i.e, almost 6 months back. But since then there is no looking back. I do most of my day to day operations using vim. I write codings in vim, I do my shell scripting in vim and the best part of it, I even read tweets from twitter and post tweet from vim and its fun. No gui and no hassles and no slow ram, processer and no distractions, just a terminal…

Installing Ruby on Rails (ROR) in Ubuntu 11.10

Ruby on Rails (ROR) is a very popular framework for developing web applications that uses Ruby language. Here are the steps to install ROR in Ubuntu 11.10. I have referred the contents from the book, "Beginning Rails 3" by "Cloves Carneiro Jr., and Rida Al Barazi".

1. sudo apt-get update
2. sudo apt-get install build-essential libssl-dev libreadline5 libreadline5-dev zlib1g zlib1g-dev (Essential Libraries Required to Build Ruby)
3. Created a local directory and use wget to download Ruby. 
  mkdir `/src && cd `/src
4. wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p376.tar.gz
5. tar -zxvf ruby-1.9.1-p376.tar.gz (Extract the Downloaded Ruby Package)
6. Inside the Extracted Ruby Folder give the following command to Compile and Install Ruby. ./configure && make && sudo make install 7. ruby --version (to check the current ruby version) Eg. ruby 1.9.1p376 (2009-12-07 revision 26041) [i686-linux] 8. Next, make sure the instance of Ruby that the shell i…