Friday, April 26, 2013

Ruby on Rails Fedena School Management System

To get started with fedena school erp management system i done the following steps 

1. First need to ruby 1.8.7 because the rails version was used as 2.3.5
2. Just to save your time from running an app. i got some errors because of version of 2.3.5. so i Changed it to version 2.3.11. and then downgrade my system gems to 1.3.5. then run the rake db:migrate . and after that feed a tables with rake db:seed.
3. Then run the rails server . 

Now i am attaching the screenshots of the application so that we will get a basic idea of the application.

My first screenshot will be of manageusers
Where i can find the users with just type a letter in text box.

My second screenshot will be of users dashboard.
As you can see from where you can manage attendance, human resource,admissions etc.

My third screenshot will be of creation of Course with batches.

My fourth screenshot will be of admission. 
Where an user can take an admission. 

My fifth screenshot will be of attendance  

My sixth screenshot will be of settings 

And my last but not least screenshot is of eventcalendar. 

Also it has lots of features. some are free and some are paid. 
I personellay like the way its organised the view pages with ajax stype. and an layout used. also the coding is really good because in any of the controller there is no unwanted line of code. 

Wednesday, April 17, 2013

Odoo OpenERP 7 Hotel Management

Hotel Management module incorporates addresses key functionalities in hospitality industry. It includes following functions :

1.Room Reservations 
2.Transportation Management  
3.Restaurant Management   
4.Laundry Management   
5.Banquet Hall Booking    
  
Room Reservations (at Reception)  
This enables user to book room through walk-in enquiries/ and through web booking form.
 

Web Based Booking Form:
This enables user to book room through internet.Booking form is featured with Paypal and authorised .net integration




Transport Management
Management can maintain a fleet record for internal as well as third party service providers. Invoicing can be maintained with the instruction maintained at the time of room booking

Restaurant Management
Restaurant Management module not only maintain table orders but also efficiently maintain inventory at different locations. It is linked to KOT preparation as well. User can link restaurant bills with are occupied room no. so that payment can be received from the customer at the time of checkout. 


Laundry Management
Efficiently maintain billing and inventory movement for laundry requests. It maintains separate workflow for internal and Room wise laundry requests


Banquet Hall Booking
User can generate multiple quotation for each of the lead generated by marketing department with unlimited permutation combination of service / product offerings for various events.



Housekeeping Work Management
User can maintain / schedule various housekeeping works for each of the house keeper. similarly, We can maintain a track of repair / replacement request generated so far with expense made for it.


Friday, April 12, 2013

Common wealth bank payment

To make a credit card payment in Australia there is one bank named as common wealth bank. which accepts credit cards payments..
To accepts a payment i do the following steps
# Send requests to the gateway's test servers
# #first set everything in test mode. later just need to change this environment to production.but for that we need to talk with bank service center to get the details of current live account and its credentials mapped with this account
  
cardexpdate=Date.civil(params["credit_card"]["expiring_date(1i)"].to_i,params["credit_card"]["expiring_date(2i)"].to_i) amount_in_cents = amount_in_cents 

uri = URI.parse("https://migs.mastercard.com.au/vpcdps?vpc_Version=1&vpc_Command=pay&vpc_AccessCode=tttttttttt&vpc_MerchTxnRef=#{params[:credit_card][:user_id]}&vpc_Merchant=Ttttttttttttt&vpc_OrderInfo=#{params[:credit_card][:user_id]}&vpc_Amount=#{amount_in_cents.to_i}&vpc_CardNum=#{no}&vpc_cardExp=#{cardexpdate.strftime('%y%m')}&vpc_locale=en")  

  http = Net::HTTP.new(uri.host, uri.port)
#http.use_ssl = true
#http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(uri.request_uri)
response = http.request(request)
responsearray=response.body.split("&")
responsearray.each do |res|
if res.split("=")[0] == "vpc_Message"
if res.split("=")[1] =="Approved"
              self.state = 'online_validated'
                    self.save
              #invoice.validating
   elsif res.split("=")[1] =="Declined"
       self.state = 'Declined'
                   self.save
      elsif res.split("=")[1] =="Unspecified+Failure"
self.state = "Unspecified+Failure"
                          self.save
              elsif res.split("=")[1] =="Referred"
                               self.state = "Referred"
                                self.save
            elsif res.split("=")[1] =="Timed+Out"
self.state = "Timed+Out"
                  self.save
            elsif res.split("=")[1] =="Expired+Card"
            self.state = "Expired+Card"
                    self.save
          elsif res.split("=")[1] =="Insufficient+Funds"
self.state = "Insufficient+Funds"
                    self.save
else
self.state = res.split("=")[1]
                    self.save
end
end
end

Thursday, April 11, 2013

Odoo OpenERP 7 Login using Google Accounts with OAUTH Module

This Blog Deals with Login in OpenERP with Google Account and Google App Domain Account details so that you need not to create user in OpenERP Manually.

Before Starting further discussion Install Following Module in Database: 
1. OAuth2 Authentication
2. Sign up with OAuth2 Authentication
3. Open-ID Authentication.
4. Sign Up
 

                    In this blog we will see how we can log into OpenERP Using your Google Id and Google APPS Domain.   

Login With Google Account:  
                             First of All Change Some General Setting under Settings>>Configuration >>General Settings  

                           Check Option Allow external users to sign up also specify Template for New User. What Ever User you specify here who's access rights will be applied to every new user created after login through Google Account ID.
 

 Also Check Activate the public portal option and restart Server with --db-filter option as  
 $: ./openerp-server -db-filter=Your_Database_Name (for manual start up of server) 

 
After Starting OpenERP Server with –-db-flter Option On OpenERP Login Screen you will see Other Login Options Available like Login in with Google,Google APP Domains,Launchpad,Open-ID.

 Login in With Google Option: 

Before Using this option we need to get Client Id from Google API Console. Login to Google API Console and Create New Project Over there. you will get Client ID and also set Up Redirect URL to your local host (Note: I am running my OpenERP at portal 8077).

Now in OpenERP under Settings>>Users>>Oauth Providers Edit Google Oauth Option and Specify Client Id you get from Google API console. Also Check Allowed Check Box and Keep other things as it is.

On Login Screen Click on Login In With Google button which will Redirect you to Google login screen enter your Google credentials and grant access to OpenERP. 


After Allowing Access you will be Redirect to OpenERP System . 


Login With Google APP Domain: 
Go to Settings>>Users>>Users Open any User Record and then Enter Open-ID Details of that User. Here Open-ID URL is Google App Domain URL and Open-ID Email is Email id of User on that Domain.


Now on login screen select Google App Login option here specify Google App Domain you want to login with like pragtech.co.in or example.net and then click on Log in button. 

You will be redirected to Domain which you entered in Google App Domain. 
Enter your user-name & Password and then Click on Allow button to grant permission. After successful login you will be redirect to OpenERP System.

Difference between Google Login and Google App Domain login is that in Google login User is created automatically in system while in Google App login we have to assign Open-ID URL and Email Id to existing user . In Pragmatic we have created feature by which user is created automatically in Google App Domain Login also.


Odoo OpenERP 7 Medical Hospital Healthcare Management


 

We are please to annouce the upgrade of the OpenERP Medical module for OpenERP V7. Here are some screenshots of it.

1.Creating a Hospital record



2.Creating a Patient record


3.Creating a Physician record


4.Creating Prescription for the patient


5.Record of the in-patient (patient who is hospitalized)


6.Creating a lab test report


7.Lab report in pdf format


8.Creating appointments for the patient


9. Creating a Health Center Building record. This features help to maintain the hierarchy of the hospital.



10.Creating a record for Ward with in the building.



11.Creating record for beds in the hospital.


12.List of the diseases already present in the Medical Module according to ICD-10.

Sunday, April 7, 2013

Testing with ruby on rails with cucumber

Testing with ruby on rails with cucumber
For testing a rails application i use cucumber . cucumber uses a Gherkin language. what need to be done here is first need to define Feature.Feature means a short description of what we are going to test.then need to write a Scenario . Scenario are a small steps which normally a user follows when he visits a web pages.like click on link or click on buttons and fills a text fields etc . so the user interacts with web pages and the same steps will be written in the scenario.
        The next step we need to follow is to write a code for executing this steps and that will be written in step defination folder.i am writing an example for executing a Sign up feature. as follows. so in featues folder i am writing a sign_up.feature file


Feature: Sign up
As an unauthorized user
I want to signup with my details
So that I can login

Scenario: Password doesn't match confirmation
Given I am on the signup page
When I fill in all user details
Then I should see a success flash notice 

And now in step_definitions folder i am writing a sign_up.rb
Given(/^I am on the signup page$/) do
visit "/user/new"

When(/^I fill in all user details$/) do
fill_in "user_email", :with => "good@example.com"
fill_in "user_password", :with => "good123"
fill_in "user_password_confirmation", :with => "good123"
fill_in "user_city", :with => "pune"
fill_in "user_weight", :with => "82"
fill_in "user_height", :with => "5.6"
fill_in "user_last_name", :with => "pathak"
fill_in "user_first_name", :with => "kedar"
click_button "Create User"


Then(/^I should see a success flash notice$/) do page.html.should match(/Sing Up successfully. Pending for approval/i)

 

Refinery CMS

An open source Ruby on Rails content management system for Rails 3.
 Steps to Install Refinary CMS
  1. gem install refinerycms
  2. refinerycms path/to/my_new_app

That's All
Now when you run the application you can see your web site editor. Like you can do the crud of users or screenshot of adduser screen shot. You can reorder the menus and pages. .


 You can also edited Pages,Add Files and Images Which you want to show in Websites. 


I am adding a screenshot for how you can edit a page. You can switch to editor view and website view very easily by clicking a "switch to editor " and "switch to website" buttons.

Wednesday, April 3, 2013

Geocoder


Geocoder in ruby on rails is a gem which is used for storing an latitude and longitude of either an ip based or address based .

For Example While Storing Customers details we are asking to provide customer address which is stored in latitude and longitude format of given location. Now When we want to see all Customers in Particular area GeoCoder fetch customers list according to their latitude and longitude stored in Database.