Tariff refactoring init

This commit is contained in:
Rainer Gümpelein 2022-04-12 11:21:19 +02:00
parent 9c0e5f78e8
commit 75c38a8721
16 changed files with 243 additions and 78 deletions

View file

@ -398,6 +398,15 @@ EOF
print $q->td({-class=>'left_italic_cms'},"$des"),"\n";
print $q->td({-class=>'content1_cms',-colspan=>'2'},$but->selector_class("$key","eselect","",$ctrel->{$key},@_lock_valxx));
}
elsif($key =~ /int01/ && "$size" eq "select" && $node_meta->{tpl_id} == 210){#tariff_unit
my @_unit_valxx = ();
while (my ($key, $value) = each %{ $dbt->{copri_conf}->{tariff_unit} }) {
push @_unit_valxx, "$key:$value";#[0.5:0,5 Std]
}
print $q->Tr();
print $q->td({-class=>'left_italic_cms'},"$des"),"\n";
print $q->td({-class=>'content1_cms',-colspan=>'2'},$but->selector_class("$key","eselect","",$ctrel->{$key},@_unit_valxx));
}
elsif($key =~ /int/ && "$size" eq "select"){
my @_valxx;
my $selsize="50px";

View file

@ -597,7 +597,7 @@ sub tpl(){
$s_hash = $dbt->{copri_conf}->{station_state} if($tpl_id == 225 && $key eq "int10");
$s_hash = $dbt->{copri_conf}->{lock_system} if($tpl_id == 205 && $key eq "int11");
$s_hash = $dbt->{copri_conf}->{sharing_type} if($tpl_id == 210 && $key eq "int18");
#$s_hash = $dbt->{copri_conf}->{tariff_unit} if($tpl_id == 210 && $key eq "int01");
$s_hash = $dbt->{copri_conf}->{tariff_unit} if($tpl_id == 210 && $key eq "int01");
$s_hash = { 1 => 1, 2 => 2, 3 => 3, 4 => 4 } if($tpl_id == 225 && $key eq "txt07");
#while (my ($key, $value) = each %{ $s_hash }) {
foreach my $s_key (sort keys (%{ $s_hash })) {

View file

@ -125,7 +125,7 @@ sub tpl(){
print $q->Tr();
if($key =~ /ct_name/){
print $q->td({-class=>'tdescr2'}, ""),"\n";
print $q->td({-class=>'tdval2'},"Project: $dbt->{operator}->{$varenv{dbname}}->{project} | Prefix: $dbt->{operator}->{$varenv{dbname}}->{oprefix} | DB: $dbt->{operator}->{$varenv{dbname}}->{database}->{dbname}"),"\n";
print $q->td({-class=>'tdval2'},"$dbt->{operator}->{$varenv{dbname}}->{title} | $dbt->{operator}->{$varenv{dbname}}->{oprefix} | $dbt->{operator}->{$varenv{dbname}}->{database}->{dbname}"),"\n";
}else{
print $q->td({-class=>'tdescr2'},"$des"),"\n";
print $q->td({-class=>'tdval2'}, "$value"),"\n";