view · edit · sidebar · attach · print · history

20110610-testcase-update_bsv-ch_oddb-modification-ywdkund-bbmb_ch

<< | Index | >>


  1. Testcase update_bsv ch.oddb
  2. Modification ywdkund bbmb.ch

Goal/Estimate/Evaluation
  • modification-ywdkund / 70% / 50%
Milestones
  • testcase update_bsv
  • bbmb.ch update
    1. update import process
    2. update order process
Summary
Commits

Testcase update_bsv ch.oddb

  1. src/plugin/bsv_xml.rb (coverage: 98.96%)

Memo (vim, short cut, function key)

 :map <F4> :w<cr>:! ruby bsv_xml.rb<cr>
 :map <F5> :w<cr>:! rcov bsv_xml.rb<cr>
 :map , :w<cr>:! ruby bsv_xml.rb<cr>
 :map . :w<cr>:! rcov bsv_xml.rb<cr>

Modification ywdkund bbmb.ch

Test

masa@masa ~/ywesee/bbmb.ch $ cat ywskund
584674;584674;22;SD-Lie;;Hatapharm AG;;hoge hoge 11;;CH;8000;hogehoge;011 / 111 22 33;;;011 / 111 22 44;customer@ywesee.com;
masa@masa ~/ywesee/bbmb.ch $ bin/admin
ch.bbmb.globopharm> users.values.length
-> 6
ch.bbmb.globopharm> users.values[3]
-> #<BBMB::HospitalUser:0x7f5dc37ceac0>
ch.bbmb.globopharm> users.values[3].full_address
-> Hatapharm AG&nbsp;&nbsp;hoge hoge 118000&nbsp;hogehoge
ch.bbmb.globopharm> users.values[3].instance_eval('@attributes[:organisation]')
-> Hatapharm AG
ch.bbmb.globopharm> users.values[3].instance_eval('@attributes[:customer_ean13]')
->

After enter the EAN-Code from the interface

Result

ch.bbmb.globopharm> users.values[3].instance_eval('@attributes[:customer_ean13]')
-> 7601002030328

Consider

  • The EAN-Code is save in BBMB::HospitalUser@attributes[:customer_ean13]
  • BBMB::HospitalUser inherites BBMB::User class

Experiment ()

    USER_MAP = {
      0   =>  :customer_id,
      1   =>  :access_group,
      3   =>  :group_short,
      4   =>  :drtitle,
      5   =>  :organisation,
      6   =>  :address1,
      7   =>  :address2,
      8   =>  :address3,
      10  =>  :plz,
      11  =>  :location,
      12  =>  :phone_business,
      13  =>  :phone_mobile,
      14  =>  :phone_private,
      15  =>  :fax,
      16  =>  :email,
      17  =>  :customer_ean13,

Check ywskund

masa@masa ~/ywesee/bbmb.ch $ cat ~/ftp_share/YWESEE/Out/ywskund
584674;584674;22;SD-Lie;;Hatapharm AG;;hoge hoge 11;;CH;8000;hogehoge;011 / 111 22 33;;;011 / 111 22 44;customer@ywesee.com;1234567890123;

Run

  • bin/bbmbd
  • update (on bin/admin)
masa@masa ~/ywesee/bbmb.ch $ bin/admin
ch.bbmb.globopharm> update
-> 

Result

  • Console log
BbmbApp::update - updating admin@ywesee.com
update: update_stock
update_stock done
update: update_suppliers
update_suppliers done
update: update_users
update_users done
update: update_user_access
update_user_access done
update: update_group_access
update_group_access done
update: update_user_article_prices
Net::FTPPermError
/YWESEE/Out/ywskdsop
550 Can't open /YWESEE/Out/ywskdsop: No such file or directory
update_user_article_prices done
update: update_user_article_discounts
Net::FTPPermError
/YWESEE/Out/ywskdsor
550 Can't open /YWESEE/Out/ywskdsor: No such file or directory
update_user_article_discounts done
update: update_user_group_discounts
Net::FTPPermError
/YWESEE/Out/ywskdrab
550 Can't open /YWESEE/Out/ywskdrab: No such file or directory
update_user_group_discounts done
update: update_user_volume_prices
Net::FTPPermError
/YWESEE/Out/ywskdabs
550 Can't open /YWESEE/Out/ywskdabs: No such file or directory
update_user_volume_prices done
update: update_stock_atc
update_stock_atc done
update: update_sl
update_sl done
update: update_atc_classes
update_atc_classes done
update: update_fachinfos
update_fachinfos done

Before

After

Experiment (if there is the last column of EAN-Code in the ywskund file)

Check ywskund

masa@masa ~/ywesee/bbmb.ch $ cat ~/ftp_share/YWESEE/Out/ywskund
584674;584674;22;SD-Lie;;Hatakpharm AG;;hoge hoge 11;;CH;8000;hogehoge;011 / 111 22 33;;;011 / 111 22 44;customer@ywesee.com;

Run

  • reboot bin/bbmbd
  • udpate (on bin/admin)

Result

  • Success
  • It is no problem if I push the update before the ywskund file is updated

Commit

view · edit · sidebar · attach · print · history
Page last modified on June 14, 2011, at 03:20 PM