alter table master_app_production.customers add payment_condition_2_duty_type_code smallint(6) after payment_condition_2_code;
alter table master_app_production.customers add payment_condition_3_duty_type_code smallint(6) after payment_condition_3_code;

alter table master_app_production.suppliers add payment_condition_2_duty_type_code smallint(6) after payment_condition_2_code;
alter table master_app_production.suppliers add payment_condition_3_duty_type_code smallint(6) after payment_condition_3_code;

update master_app_production.customers set payment_condition_2_duty_type_code=1 where payment_condition_2_price is not NULL;
update master_app_production.customers set payment_condition_3_duty_type_code=1 where payment_condition_3_price is not NULL;

update master_app_production.suppliers set payment_condition_2_duty_type_code=1 where payment_condition_2_price is not NULL;
update master_app_production.suppliers set payment_condition_3_duty_type_code=1 where payment_condition_3_price is not NULL;
