Mass changes to pricelist

Hello.

  When we first imported prices into OpenVPMS, we just mass imported all of our supplier's products.  This has worked well for a while, but we would now like to narrow down our price-list, as we obviously don't stock all products that our supplier trades in.

Is there a simple way to change all of the products in our price-list from "active" to "inactive" and then we can manually select which products we want to be active?

I Suspect this will involve sql query, or Kettle, but I wanted to check before we go down that route.

Cheers.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Mass changes to pricelist

Cahir - you need an SQL queries like the following:

select * from entities e
where
e.arch_short_name like 'product.%'
and e.active = 1
and e.name like 'zz%';

update entities e
set e.active = 0
where e.arch_short_name like 'product.%'
and e.active = 1
and e.name like 'zz%';

I always write these in pairs - one to look at what will be affected and one to do the work. The top one checks that I have the selection correct, the bottom one does the work.

For obvious reasons I did not want to deactivate all the products in my test system - hence the "and e.name like 'zz%'" clause.  For your 'do all' case, just remove this.

Regards, Tim G

Syndicate content