<< 20160902-fix-vetoquinol-smtp-ssl-error-fix-xmlconv-and-bbmb-flavored-issue | Index | 20160831-urgent-debug-sandoz-xmlconv-bbmb-ch >>
Redirect issues again in bbmb.ch.
We have to migrate these applications to 2.3.1 (sbsm-1.3.0).
Currently production has various changes in each boot script and trans_handler.yml for these bbmb applications.
I've just upgraded {virbac|vetoquinol|sandoz}.bbmb.ch applications with Ruby 2.3.1.
And then arranged these files.
#!/bin/sh exec 2>&1 exec sudo -u bbmb /usr/local/bin/ruby231 \ -I/var/www/sandoz.bbmb.ch/lib \ -rydim/invoice \ /usr/local/bin/bbmbd config=/var/www/sandoz.bbmb.ch/etc/config.yml
--- shortcut: '/': 'language': 'de'
#!/bin/sh exec 2>&1 exec sudo -u bbmb /usr/local/bin/ruby231 \ -I/var/www/virbac.bbmb.ch/lib \ -rydim/invoice \ /usr/local/bin/bbmbd config=/var/www/virbac.bbmb.ch/etc/config.yml
--- shortcut: '/': 'language': 'de'
#!/bin/sh exec 2>&1 exec sudo -u bbmb /usr/local/bin/ruby231 \ -I/var/www/vetoquinol.bbmb.ch/lib \ -rydim/invoice \ /usr/local/bin/bbmbd config=/var/www/vetoquinol.bbmb.ch/etc/config.yml
--- shortcut: '/': 'language': 'de'
Why updater of sandoz.bbmb.ch does not update price for product which has pharmacode 2508406.
# order: last line does not have valid price 99,,01092016,92,6443023,7680578850073,44050158,2,15.32,99, 99,,01092016,92,5153984,7680594160064,44038123,2,185.22,99, 99,,01092016,92,2508406,7680555250186,44045701,2,0.00,99,
[36] 2.3.1-p112(#<BBMB::Util::ProductImporter>)> ODBA.cache.retrieve_from_index('bbmb_model_customer_customer_id', '').find {|c| \ c.customer_id == '99' }.orders.last.positions.map {|p| p.product }.last.pcode => "2508406"
Updater looks good. I think problem is Order inject.
# injection process [6] 2.3.1-p112(#<BBMB::Util::Server>)> Model::Product.find_by_pcode(info[:pcode]).pcode => "2508406" [7] 2.3.1-p112(#<BBMB::Util::Server>)> Model::Product.find_by_pcode(info[:pcode]).price => nil # But this product has price. [9] 2.3.1-p112(#<BBMB::Util::Server>)> ODBA.cache.retrieve_from_index('bbmb_model_product_pcode', '').find {|p| \ p.pcode == '2508406' }.price => #<BBMB::Util::Money:0x007f36c5442fc0 @credits=2462>
There are 2 products in index. Thi is problem.
# this is imported / updated by updater script [10] 2.3.1-p112(#<BBMB::Util::Server>)> ODBA.cache.retrieve_from_index('bbmb_model_product_pcode', '').find {|p| \ p.pcode == '2508406' }.odba_id => 510040 # find_by_pcode returns other object [12] 2.3.1-p112(#<BBMB::Util::Server>)> BBMB::Model::Product.find_by_pcode(info[:pcode]).odba_id => 509969
Then, I've just delete these Product (with Persistence#odba_delete
method). and then started updater script.
It has worked expectedly.
# This is bin/admin (command) $ /usr/local/bin/ruby231 /usr/local/bin/bbmb_admin config=/var/www/sandoz.bbmb.ch/etc/config.yml ch.bbmb.sandoz>
# How to delete ODBA Object ch.bbmb.sandoz> BBMB::Model::Product.find_by_pcode('2508406').odba_delete
# check in injection process [2] 2.3.1-p112(#<BBMB::Util::Server>)> product.price => #<BBMB::Util::Money:0x007f36c5442fc0 @credits=2462>
And then use non flavored trans handler at following sites: (feature)