./basic.case
open /billing/callc/logout
type login_username admin
type login_psw admin1
clickAndWait commit
verifyTextPresent Succesfully logged in
open /billing/test/load_delta_sql/sql/update_default_curencies
open /billing/currencies/currencies
clickAndWait id=icon_chech_curr_upd_disable_10000
assertTextPresent Currency update disabled
open /billing/currencies/edit/10000
type id=exchange_rate 2.5
clickAndWait css=input[type="image"]
assertTextPresent Currency details updated
clickAndWait id=icon_cross_curr_upd_enable_10000
assertTextPresent Currency update enabled
clickAndWait id=icon_cross_curr_active_3
assertTextPresent Currency enabled
clickAndWait id=icon_chech_curr_upd_disable_3
open /billing/currencies/edit/3
type id=exchange_rate 0.2
clickAndWait css=input[type="image"]
assertTextPresent Currency details updated
clickAndWait id=icon_cross_curr_upd_enable_3
assertTextPresent Currency update enabled
open /billing/users/personal_details
select id=user[currency_id] label=ALL
clickAndWait name=commit
assertTextPresent Personal details changed
open /billing/services/list
verifyTextPresent Selfcost
verifyText id=self_price_1 0.0000
open /billing/services/edit/1
verifyTextPresent Self Cost (ALL)
type id=service[price] 10
verifyValue id=service[selfcost_price] 0.0
type id=service[selfcost_price] 2
clickAndWait name=commit
waitForTextPresent Service was successfully updated
verifyText id=self_price_1 2.0000
open /billing/services/new
type id=service_name Service one time fee
click id=service_servicetype_one_time_fee
waitForValue id=service[price] 0.0
type id=service[price] 5.0
type id=service[selfcost_price] 110.0
clickAndWait name=commit
waitForTextPresent Service was successfully created
verifyText id=self_price_2 110.0000
open /billing/services/new
type id=service_name Service periodic fee
click id=service_servicetype_periodic_fee
verifyElementPresent name=service[periodtype]
type id=service[price] 3.0
type id=service[selfcost_price] #@$%^
clickAndWait name=commit
waitForTextPresent Service was successfully created
verifyText id=self_price_3 0.0000
open /billing/services/new
type id=service_name Service flat-rate
click id=service_servicetype_flat_rate
waitForValue id=service[price] 0.0
type id=service[price] 5.0
type id=service[selfcost_price] sgdfvh
type id=service_quantity 3
clickAndWait name=commit
waitForTextPresent Service was successfully created
verifyText id=self_price_4 0.0000
open /billing/services/edit/2
type id=service[price] 45
type id=service[selfcost_price] 45
clickAndWait name=commit
verifyTextPresent Service was successfully updated
verifyText id=self_price_2 45.0000
open /billing/stats/profit
select id=date_from_year label=2011
select id=date_from_month label=October
select id=date_from_day label=1
select id=date_till_year label=2011
select id=date_till_month label=October
select id=date_till_day label=31
clickAndWait name=commit
waitForText id=number_calls_profit 0.0000
waitForText id=subscription_profit 8.0000
waitForText id=number_total_profit 8.0000
open /billing/services/subscription_new/3
select id=subscription_service_id label=Test_periodic_service, Price: 10.0
select id=activation_start_year label=2009
clickAndWait name=commit
open /billing/stats/profit
select id=date_from_year label=2011
select id=date_from_month label=October
select id=date_from_day label=1
select id=date_till_year label=2011
select id=date_till_month label=October
select id=date_till_day label=31
clickAndWait name=commit
waitForText id=number_calls_profit 0.0000
waitForText id=subscription_profit 16.0000