mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 07:06:38 +02:00
Mietpreis refactoring
This commit is contained in:
parent
e6ca75a66a
commit
74ecbbd2a8
11 changed files with 169 additions and 242 deletions
|
@ -24,6 +24,7 @@ use Date::Calc qw(:all);
|
|||
use Scalar::Util qw(looks_like_number);
|
||||
use Storable;
|
||||
use Mod::APIfunc;
|
||||
use Mod::Pricing;
|
||||
use Data::Dumper;
|
||||
|
||||
sub new {
|
||||
|
@ -48,6 +49,7 @@ sub tpl(){
|
|||
my $but = new Buttons;
|
||||
my $dbt = new DBtank;
|
||||
my $apif = new APIfunc;
|
||||
my $pri = new Pricing;
|
||||
|
||||
my %varenv = $cf->envonline();
|
||||
my $script = $q->script_name();
|
||||
|
@ -65,7 +67,6 @@ sub tpl(){
|
|||
|
||||
$path =~ s/\/login|\/user|\/manager|\/admin|\/$//;
|
||||
my $user_agent = $q->user_agent();
|
||||
my $fullurl = $users_dms->{fullurl};
|
||||
my $saved_query = $q->url(-query=>1);
|
||||
my %ib = $but->ibuttons();
|
||||
my $main_id = $node_meta->{main_id};
|
||||
|
@ -196,7 +197,7 @@ sub tpl(){
|
|||
my $ctb = $db->get_content1("contentuser","$users_dms->{owner}");
|
||||
|
||||
|
||||
my ($umsatz,$edit,$new_key,$copy_key,$save_key,$delete_key,$c_id4csv);
|
||||
my ($edit,$new_key,$copy_key,$save_key,$delete_key,$c_id4csv);
|
||||
my $ct4rel = {};
|
||||
my $ct4rel_parts = {};
|
||||
my $k=0;
|
||||
|
@ -206,9 +207,6 @@ sub tpl(){
|
|||
print "<div id='Content4list'>\n";
|
||||
|
||||
my $v_journal = $R::v_journal || "";
|
||||
#if($path =~ /(\w+journal)/){
|
||||
# $v_journal = "$1" ;
|
||||
#}
|
||||
if($node_meta->{main_id} == $dbt->{shareeconf_dms}->{invoicejournal}){
|
||||
$v_journal = $node_meta->{node_name};
|
||||
}
|
||||
|
@ -323,15 +321,6 @@ sub tpl(){
|
|||
$tplids = "205,224,225,210,226,227,228,229" if(($table !~ /contentadr|contenttrans|contenttver|contentnel/) && !$export);
|
||||
$tplids = 205 if($path =~ /Waren$/);#Defaults to only Verleih_list
|
||||
|
||||
#collect depends Reparatur_list (AWs) template
|
||||
my $ct_aw; my $ct4aw;
|
||||
if($v_journal){
|
||||
$ct4aw = $db->collect_cid("content",$lang,"199");
|
||||
foreach my $aw_id (keys (%$ct4aw)){
|
||||
$ct_aw .= "$ct4aw->{$aw_id}->{c_id}|"
|
||||
}
|
||||
$ct_aw =~ s/\|$//;
|
||||
}
|
||||
|
||||
my $s_ct_name = $q->escapeHTML($R::s_ct_name) || "";
|
||||
my $s_barcode = $q->escapeHTML($R::s_barcode) || "";
|
||||
|
@ -353,7 +342,6 @@ sub tpl(){
|
|||
if($v_journal){
|
||||
$offset=0;
|
||||
$limit=10000;
|
||||
$umsatz = "AW";
|
||||
}
|
||||
|
||||
#Waren-nodes für Umsatz-Auswertung
|
||||
|
@ -374,8 +362,10 @@ sub tpl(){
|
|||
$lb->failure("Fehler! Es fehlen wichtige Einstellungen. ....journal-ID!");
|
||||
}
|
||||
my $kt_sum=0;
|
||||
my $ct_name_set1;my $ct_name_set2;
|
||||
my $ct_ids;my $ct_aw_ids; my $last_ab;
|
||||
my $ct_name_set1;
|
||||
my $ct_name_set2;
|
||||
my $ct_ids;
|
||||
my $last_ab;
|
||||
|
||||
if($R::detail_search && $R::detail_search eq "suchen"){
|
||||
$offset = 0;
|
||||
|
@ -473,10 +463,6 @@ sub tpl(){
|
|||
#collect invoice ids in kontext of parts
|
||||
foreach my $cp_id (keys (%$ct4rel_parts)){
|
||||
$ct_ids .= "$ct4rel_parts->{$cp_id}->{ct_id}," if($R::detail_search && ($R::s_kontext && $R::s_kontext eq "Waren" || $export eq "FiBu"));
|
||||
#pre collect of trans for AW
|
||||
if(($umsatz eq "AW") && "$ct_aw" && ($ct4rel_parts->{$cp_id}->{cc_id} =~ /$ct_aw/)){
|
||||
$ct_aw_ids .= "$ct4rel_parts->{$cp_id}->{ct_id}|";#
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -503,7 +489,6 @@ sub tpl(){
|
|||
if($v_journal && $v_journal =~ /journal/){
|
||||
my ($a_check,$b_check,$c_check,$d_check,$f_check,$g_check);
|
||||
$a_check = "1" if($R::s_kontext && $R::s_kontext eq "Waren");
|
||||
$umsatz="Summe der gefundenen Waren" if($R::s_kontext && $R::s_kontext eq "Waren");
|
||||
$b_check = "1" if($R::s_kontext && $R::s_kontext eq "Beleg" || !$R::s_kontext);
|
||||
my @_s_time_defaults = ("0,manuelle Eingabe in \"bearbeitet\"","7,1 Woche","14,2 Wochen","28,4 Wochen","365,1 Jahr");
|
||||
#print $q->div({-style=>'float:left;background-color:silver;'}," <b>Suchzeitraum:</b> ",$but->selector("selected_start_mtime","130px","$R::selected_start_mtime",@_s_time_defaults));
|
||||
|
@ -681,7 +666,7 @@ sub tpl(){
|
|||
}
|
||||
#print $q->end_form,"\n";
|
||||
|
||||
my $sum_bar="0";my $sum_ec="0";my $sum_kredit="0";my $sum_abb="0";my $sum_ueb="0";my $sum_geka="0";my $sum_paypal="0";my $sum_SEPApayone="0";my $sum_CCpayone="0";my $sum_ausfall="0";my $sum_kasse="0";my $sum_start="0";my $close_time="";my $payment_time="";my $sum_waren;my $sum_verkauf;my $sum_kaution;my $sum_aw;my $sum_am;my $sum_park; my $sum_radd;my $sum_wst_ek=0; my $sum_wst_vk=0; my $sum_verleih;
|
||||
my $sum_bar="0";my $sum_ec="0";my $sum_kredit="0";my $sum_abb="0";my $sum_ueb="0";my $sum_geka="0";my $sum_paypal="0";my $sum_SEPApayone="0";my $sum_CCpayone="0";my $sum_ausfall="0";my $sum_kasse="0";my $sum_start="0";my $close_time="";my $payment_time="";my $sum_waren;my $sum_verkauf;my $sum_kaution;my $sum_am;my $sum_park; my $sum_radd;my $sum_wst_ek=0; my $sum_wst_vk=0; my $sum_verleih;
|
||||
my $nr=0;my $nx=0;
|
||||
my $check_kaution=0;
|
||||
my $rabatt_key; my $kost_key;
|
||||
|
@ -715,18 +700,18 @@ sub tpl(){
|
|||
$sum_wst_vk += $ct4rel->{$id}->{int02} * $ct4rel->{$id}->{int03};
|
||||
}
|
||||
|
||||
#AWs Faktor from Firma
|
||||
if($table eq "content" && $ctf->{int02} != 0 && $ct4rel->{$id}->{int09} != 0){
|
||||
$ct4rel->{$id}->{int02} = $ctf->{int02} * $ct4rel->{$id}->{int09};
|
||||
$ct4rel->{$id}->{int02} = $lb->cashme($ct4rel->{$id}->{int02});
|
||||
}
|
||||
|
||||
# check sum_pos and sum_buchen
|
||||
my $sum_pos=0;
|
||||
#if($v_journal && $ct4rel->{$id}->{state} ne "Kassenbestand"){
|
||||
my $pricing = {};
|
||||
my $counting = {};
|
||||
if($ct4rel->{$id}->{state} ne "Kassenbestand"){
|
||||
foreach my $cpid (keys (%$ct4rel_parts)){
|
||||
if(($ct4rel->{$id}->{c_id} eq $ct4rel_parts->{$cpid}->{ct_id}) && (looks_like_number($ct4rel_parts->{$cpid}->{int02}) && $ct4rel_parts->{$cpid}->{int02} != 0) && (looks_like_number($ct4rel_parts->{$cpid}->{int03}) && $ct4rel_parts->{$cpid}->{int03} != 0)){
|
||||
if($ct4rel->{$id}->{c_id} eq $ct4rel_parts->{$cpid}->{ct_id}){
|
||||
|
||||
if($ct4rel_parts->{$cpid}->{int35} && $ct4rel_parts->{$cpid}->{start_time} && $ct4rel_parts->{$cpid}->{end_time}){
|
||||
($pricing,$counting) = $pri->counting_rental(\%varenv,$ct4rel_parts->{$cpid},"calc_price");
|
||||
}elsif((looks_like_number($ct4rel_parts->{$cpid}->{int02}) && $ct4rel_parts->{$cpid}->{int02} != 0) && (looks_like_number($ct4rel_parts->{$cpid}->{int03}) && $ct4rel_parts->{$cpid}->{int03} != 0)){
|
||||
|
||||
if($ct4rel_parts->{$cpid}->{int07} != 0){
|
||||
my $rabatt_eur = $ct4rel_parts->{$cpid}->{int07};
|
||||
$rabatt_eur = $ct4rel_parts->{$cpid}->{int02} * $ct4rel_parts->{$cpid}->{int03} * $ct4rel_parts->{$cpid}->{int07}/100 if($ct4rel_parts->{$cpid}->{int08} != 1);#wenn int08 != 1 alias €
|
||||
|
@ -735,7 +720,8 @@ sub tpl(){
|
|||
}else{
|
||||
$sum_pos += $ct4rel_parts->{$cpid}->{int02} * $ct4rel_parts->{$cpid}->{int03};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
my $sum_chk = $ct4rel->{$id}->{int01};
|
||||
$sum_pos = $lb->round($sum_pos);
|
||||
|
@ -981,9 +967,9 @@ sub tpl(){
|
|||
$ct4rel->{$id}->{start_time} = $lb->time4de($ct4rel->{$id}->{start_time},"1") if($ct4rel->{$id}->{start_time});
|
||||
$ct4rel->{$id}->{end_time} = $lb->time4de($ct4rel->{$id}->{end_time},"1") if($ct4rel->{$id}->{end_time});
|
||||
print $q->td({-class=>'tdtxt',-style=>"$txtstyle $set_style", -nowrap=>1},"$ct4rel->{$id}->{start_time} - $ct4rel->{$id}->{end_time}"),"\n";
|
||||
}elsif($key =~ /int01/ && $node_meta->{node_name} eq "Faktura"){
|
||||
}elsif($key =~ /int01/ && ($node_meta->{parent_id} == $dbt->{shareedms_conf}->{faktura} || $node_meta->{main_id} == $dbt->{shareedms_conf}->{faktura})){
|
||||
if($ct4rel->{$id}->{state} eq "Kassenbestand"){
|
||||
print $q->td({-class=>'tdint',-style=>"$txtstyle $set_style"},$q->b("Tatsächl. $ct4rel->{$id}->{$key}")),"\n";
|
||||
print $q->td({-class=>'tdint',-style=>"$txtstyle $set_style"},""),"\n";
|
||||
}else{
|
||||
my $betrag = $ct4rel->{$id}->{$key} || "∑ $sum_pos";# pre counting
|
||||
$betrag = $ct4rel->{$id}->{$key} if($v_journal);
|
||||
|
@ -991,7 +977,7 @@ sub tpl(){
|
|||
print $q->td({-class=>'tdint',-style=>"$txtstyle $set_style"},"$betrag"),"\n";
|
||||
}
|
||||
}elsif($key =~ /int02/ && $ct4rel->{$id}->{state} eq "Tagesabschluss"){
|
||||
print $q->td({-class=>'tdint',-style=>"$txtstyle $set_style"},$q->b("Anfangst. $ct4rel->{$id}->{$key}")),"\n";
|
||||
print $q->td({-class=>'tdint',-style=>"$txtstyle $set_style"},""),"\n";
|
||||
}elsif($key =~ /int03/ && "$table" eq "contenttrans"){
|
||||
print $q->td({-class=>'tdint',-style=>"$txtstyle $set_style"},""),"\n";
|
||||
}elsif($key =~ /mtime/ && $ct4rel->{$id}->{close_time}){
|
||||
|
@ -1129,7 +1115,7 @@ sub tpl(){
|
|||
#print $q->div({-style=>"position:absolute;margin-left:$daymarker;border-right: solid thin #86cb00;height:1.7em;"}," "),"\n";# if("$mon" eq "$mon_today");
|
||||
my $calpath = "Mietjournal";
|
||||
$calpath = "Alarmjournal" if($ct4rel->{$id}->{int13} == $cttpos->{$ctid}->{int13} && $cttpos->{$ctid}->{int10} == 7);
|
||||
print $q->div({-style=>"position:static;margin-left:$day_stpx;width:$rent_day_px;background-color:$scale_color"},$q->a({-class=>"linknav3",-style=>"$time_style",-href=>"$script/$users_dms->{fullurl}/$calpath/?cttpos_id=$cttpos->{$ctid}->{c_id}",-title=>"Im $calpath öffnen"},"$hh_en:$mm_en")),"\n";
|
||||
print $q->div({-style=>"position:static;margin-left:$day_stpx;width:$rent_day_px;background-color:$scale_color"},$q->a({-class=>"linknav3",-style=>"$time_style",-href=>"$varenv{wwwhost}/$calpath/?cttpos_id=$cttpos->{$ctid}->{c_id}",-title=>"Im $calpath öffnen"},"$hh_en:$mm_en")),"\n";
|
||||
print "</td>\n";
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>'padding-top:1px;'},""),"\n";
|
||||
|
@ -1165,44 +1151,6 @@ sub tpl(){
|
|||
$sum_bar -= $sum_parts;
|
||||
}
|
||||
|
||||
#Umsatz Fkt.
|
||||
#AW Material Summen
|
||||
$ct_aw_ids =~ s/\|$//;
|
||||
#if($umsatz eq "AW" && $ct4rel_parts->{$cpid}->{ct_name} eq $ctf->{txt51}){
|
||||
if($umsatz eq "AW" && $ct4rel_parts->{$cpid}->{cc_id} =~ /$ct_aw/){
|
||||
$sum_aw += $sum_parts;
|
||||
$sum_verkauf -= $sum_parts;
|
||||
#$pos_style .= "background-color:#a69100;";
|
||||
}elsif($ct4rel_parts->{$cpid}->{ct_id} =~ /$ct_aw_ids/){
|
||||
$sum_am += $sum_parts;
|
||||
$sum_verkauf -= $sum_parts;
|
||||
#$pos_style .= "background-color:#c69133;";
|
||||
}
|
||||
|
||||
if($umsatz eq "Rad-Station_Verkauf"){
|
||||
foreach my $nid (keys (%$w_nodes)){
|
||||
if($ct4rel_parts->{$cpid}->{int12} eq $w_nodes->{$nid}->{main_id}){
|
||||
if($w_nodes->{$nid}->{txt01} eq "Raddienst"){
|
||||
$sum_radd += $sum_parts;
|
||||
$sum_verkauf -= $sum_parts;
|
||||
#$pos_style .= "background-color:#a69100;";
|
||||
}elsif($w_nodes->{$nid}->{txt01} eq "Parkhaus"){
|
||||
$sum_park += $sum_parts;
|
||||
$sum_verkauf -= $sum_parts;
|
||||
#$pos_style .= "background-color:#a69100;";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if($umsatz eq "Rad-Station_Verleih"){
|
||||
#besser, anhand der Verleih-Kostenstelle
|
||||
foreach my $nid (keys (%$verleih_nodes)){
|
||||
if($ct4rel_parts->{$cpid}->{int12} eq $verleih_nodes->{$nid}->{main_id}){
|
||||
$sum_verleih += $sum_parts;
|
||||
#$pos_style .= "background-color:#a69100;";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my $parts_time = "";
|
||||
if($ct4rel_parts->{$cpid}->{start_time} && $ct4rel_parts->{$cpid}->{end_time}){
|
||||
|
@ -1404,72 +1352,6 @@ sub tpl(){
|
|||
}
|
||||
###
|
||||
|
||||
#AW 2020-01-29 disabled
|
||||
if(1==2 && $umsatz && $node_meta->{node_name} eq "Faktura"){
|
||||
my $sum_parts_all;
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdtxt',-style=>'text-align:center;background-color:silver;',-colspan=>"$m"},"Teil Umsätze");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-style=>'background-color:silver;'},"");
|
||||
|
||||
if("$R::s_kontext" eq "Waren"){
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},"Suchkontext Waren. Die Umsatz Summe der durch Suchbegriffe gefundenen Artikel");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_waren €");
|
||||
}
|
||||
|
||||
if($umsatz eq "Rad-Station_Verkauf"){
|
||||
$sum_radd = $lb->cashme($sum_radd);
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},"Raddienst Summe");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_radd €");
|
||||
$sum_park = $lb->cashme($sum_park);
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},"Parkhaus Summe");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_park €");
|
||||
}
|
||||
|
||||
if($umsatz eq "Rad-Station_Verleih"){
|
||||
$sum_verleih = $lb->cashme($sum_verleih);
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},$q->span({-style=>'color:silver;font-weight:normal;'},""),"Verleih Summe");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_verleih €");
|
||||
}
|
||||
|
||||
if($umsatz eq "AW"){
|
||||
$sum_aw = $lb->round($sum_aw);
|
||||
$sum_aw = $lb->cashme($sum_aw);
|
||||
$sum_am = $lb->round($sum_am);
|
||||
$sum_am = $lb->cashme($sum_am);
|
||||
$sum_verkauf = $lb->round($sum_verkauf);
|
||||
$sum_verkauf = $lb->cashme($sum_verkauf);
|
||||
$sum_parts_all += $sum_aw;
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},"Arbeits-Werte Summe");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_aw €");
|
||||
$sum_parts_all += $sum_am;
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},"Arbeits-Material Summe");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_am €");
|
||||
$sum_parts_all += $sum_verkauf;
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},"Verkaufs-Material Summe");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_verkauf €");
|
||||
$sum_parts_all = $lb->cashme($sum_parts_all);
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},"Gesamt Summe");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_parts_all €");
|
||||
}
|
||||
}
|
||||
|
||||
if($users_dms->{u_id}){
|
||||
if($v_journal =~ /bericht/ && $j_exist->{main_id}){
|
||||
print $q->Tr();
|
||||
|
|
|
@ -387,8 +387,7 @@ EOF
|
|||
#$u_name = $ct_users->{$ct4rel->{$id}->{$key}}->{txt01} || $ct4rel->{$id}->{$key};
|
||||
print $q->td({-class=>"$tdclass",-style=>"$tdstyle $set_style"},"$u_name"),"\n";
|
||||
}elsif($key eq "barcode" && $node_meta->{ct_table} eq "contentadrpos"){
|
||||
print $q->td({-class=>"$tdclass",-style=>"$tdstyle $set_style"},$q->a({-class=>"linknav3",-href=>"/$users_dms->{fullurl}/Waren/?detail_search=1\&s_barcode=$ct4rel->{$id}->{barcode}",-title=>"zum Rad "},"$ct4rel->{$id}->{barcode}")),"\n";
|
||||
#print $q->td({-class=>"$tdclass",-style=>"$tdstyle $set_style"},$q->a({-class=>"editnav",-href=>"/$users_dms->{fullurl}/Waren/?detail_search=1\&s_barcode=$ct4rel->{$id}->{barcode}",-title=>"zur Liste der Rad $ct4rel->{$id}->{barcode} Servicearbeiten"}, $q->img({-src=>"$varenv{metahost}/glyphicons/glyphicons-440-wrench.png", -style=>'height:1.3em;'}),"$ct4rel->{$id}->{barcode}")),"\n";
|
||||
print $q->td({-class=>"$tdclass",-style=>"$tdstyle $set_style"},$q->a({-class=>"linknav3",-href=>"$varenv{wwwhost}/Waren/?detail_search=1\&s_barcode=$ct4rel->{$id}->{barcode}",-title=>"zum Rad "},"$ct4rel->{$id}->{barcode}")),"\n";
|
||||
|
||||
}elsif($key eq "u_id" && $node_meta->{ct_table} eq "users"){
|
||||
my $adref = {
|
||||
|
|
|
@ -14,6 +14,7 @@ use DateTime;
|
|||
use DateTime::Format::Pg;
|
||||
use Date::Calc::Object qw(:ALL);
|
||||
use Scalar::Util qw(looks_like_number);
|
||||
use Data::Dumper;
|
||||
use Lib::Config;
|
||||
use Mod::Buttons;
|
||||
use Mod::Libenz;
|
||||
|
@ -217,7 +218,7 @@ EOF
|
|||
|
||||
#1. Spalte
|
||||
print $q->Tr(),"\n";
|
||||
print "<td class='tdtxt'>";
|
||||
print "<td class='tdtxt' nowrap>";
|
||||
if(($c_idpos == $cttpos->{$id}->{c_id}) && ($R::trans2edit && $R::trans2edit =~ /transpos/)){
|
||||
print $q->hidden(-name=>'c_idpos', -value=>"$cttpos->{$id}->{c_id}", -override=>'1');
|
||||
print $q->hidden(-name=>'cc_id', -value=>"$cttpos->{$id}->{cc_id}", -override=>'1');
|
||||
|
@ -265,7 +266,7 @@ EOF
|
|||
|
||||
}elsif($key =~ /int03/){
|
||||
if($cttpos->{$id}->{int35} && $cttpos->{$id}->{start_time} && $cttpos->{$id}->{end_time}){
|
||||
print $q->td({-class=>'tdint'},"$pricing->{real_clock}"),"\n";
|
||||
print $q->td({-class=>'tdint',nowrap=>1},"$pricing->{real_clock} $pricing->{freed_time}"),"\n";
|
||||
}else{
|
||||
print $q->td({-colspan=>'1',-class=>'element',-style=>"$txtstyle $set_style"},$q->textfield(-class=>'etxt',-style=>"$txtstyle",-name=>"col_$key",-default=>"$cttpos->{$id}->{$key}", -override=>'1',-size=>"$isize",-maxlength=>10, -autofocus=>1)),"\n";
|
||||
}
|
||||
|
@ -317,7 +318,7 @@ EOF
|
|||
print $q->span({-style=>"$txtstyle $set_style"},"Mietzeit: ",
|
||||
$q->textfield(-id=>'datepicker1',-class=>'etxt',-name=>"start_date",-default=>"$s_dd.$s_mo.$s_yy",-size=>"8",-maxlength=>10),
|
||||
$q->textfield(-class=>'etxt',-name=>"s_hh",-default=>"$s_hh",-size=>"1",-maxlength=>2),":",
|
||||
$q->textfield(-class=>'etxt',-name=>"s_mi",-default=>"$s_mi",-size=>"1",-maxlength=>2)," – ",
|
||||
$q->textfield(-class=>'etxt',-name=>"s_mi",-default=>"$s_mi",-size=>"1",-maxlength=>2)," → ",
|
||||
$q->textfield(-id=>'datepicker2',-class=>'etxt',-name=>"end_date",-default=>"$e_dd.$e_mo.$e_yy",-size=>"8",-maxlength=>10),
|
||||
$q->textfield(-class=>'etxt',-name=>"e_hh",-default=>"$e_hh",-size=>"1",-maxlength=>2),":",
|
||||
$q->textfield(-class=>'etxt',-name=>"e_mi",-default=>"$e_mi",-size=>"1",-maxlength=>2)),"\n";
|
||||
|
@ -359,10 +360,10 @@ EOF
|
|||
print $q->td({-class=>'tdint'},"$co2saving");
|
||||
|
||||
}
|
||||
#int03 on parts, int35 on rental
|
||||
#yes, int03=Menge on parts, int35=unit_price1 on rental
|
||||
elsif($key =~ /int03/){
|
||||
if($cttpos->{$id}->{int35} && $cttpos->{$id}->{start_time} && $cttpos->{$id}->{end_time}){
|
||||
print $q->td({-class=>'tdint'},"$pricing->{real_clock}"),"\n";
|
||||
print $q->td({-class=>'tdint',-nowrap=>1},"$pricing->{real_clock} $pricing->{freed_time}"),"\n";
|
||||
}else{
|
||||
$cttpos->{$id}->{$key} =~ s/\./,/;
|
||||
print $q->td({-class=>'tdint'},"$cttpos->{$id}->{$key}"),"\n";
|
||||
|
@ -383,10 +384,10 @@ EOF
|
|||
}
|
||||
}elsif($key =~ /int04/){
|
||||
if($pricing->{total_price}){
|
||||
print $q->td({-class=>'tdint'},"$pricing->{total_price} €"),"\n";
|
||||
print $q->td({-class=>'tdint',-nowrap=>1},"$pricing->{total_price} €"),"\n";
|
||||
}else{
|
||||
$gesamt =~ s/\./,/;
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$gesamt €"),"\n";
|
||||
print $q->td({-class=>'tdint',-nowrap=>1},"$gesamt €"),"\n";
|
||||
}
|
||||
}elsif($key =~ /int07/){
|
||||
if(!$cttpos->{$id}->{int35}){
|
||||
|
@ -418,7 +419,16 @@ EOF
|
|||
}
|
||||
if($cttpos->{$id}->{itime} =~ /(\d{4})-(\d{2})-(\d{2})\s(\d{2}):(\d{2})/){
|
||||
print $q->span("$dbt->{copri_conf}->{bike_state}->{$cttpos->{$id}->{int10}} → $dbt->{copri_conf}->{lock_state}->{$cttpos->{$id}->{int20}} → $u_name / $u_name_end"),"\n";
|
||||
print "<br />\n";
|
||||
my $pos_id = "";
|
||||
if($users_dms->{u_id} && $users_dms->{u_id} =~ /1842/){
|
||||
my $pos_details = "";
|
||||
foreach my $did (sort keys (%{$pricing->{rentalog}})){
|
||||
$pos_details .= $did . " = " . $pricing->{rentalog}->{$did} . "</br>" if($pricing->{rentalog}->{$did});
|
||||
}
|
||||
#$pos_details = Dumper($pricing->{rentalog});
|
||||
$pos_id = $q->div({-class=>"popup",-onclick=>"toggle_box('$id')"},"$cttpos->{$id}->{c_id}", $q->span({-class=>"popuptext",-id=>"$id"},"$pos_details"));
|
||||
}
|
||||
print "$pos_id<br />\n";
|
||||
}
|
||||
}
|
||||
if($cttpos->{$id}->{txt01} || $cttpos->{$id}->{int09}){
|
||||
|
@ -439,7 +449,7 @@ EOF
|
|||
my $start_time = $lb->time4de($cttpos->{$id}->{start_time},"1");
|
||||
my $end_time = $lb->time4de($cttpos->{$id}->{end_time},"1");
|
||||
print "<br />\n";
|
||||
print $q->span({-style=>"$time_style"}, "Mietzeit: $start_time – $end_time"),"\n";
|
||||
print $q->span({-style=>"$time_style"}, "Mietzeit: $start_time → $end_time"),"\n";
|
||||
}
|
||||
print "</td>\n";
|
||||
}elsif($key =~ /txt/){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue