if ( my $cell = $cost_matrix->{$tocode}{$fromcode} ) {
$from_to_input_def{value} = $cell->{cost};
$from_to_input_def{disabled} = 1 if $cell->{disable_transfer};
if ( my $cell = $cost_matrix->{$tocode}{$fromcode} ) {
$from_to_input_def{value} = $cell->{cost};
$from_to_input_def{disabled} = 1 if $cell->{disable_transfer};