mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 15:16:38 +02:00
coupon select and feedback
This commit is contained in:
parent
d2ef211f68
commit
7656e9d291
7 changed files with 67 additions and 58 deletions
|
@ -343,17 +343,7 @@ td {
|
|||
$ctf = $db->get_content1("contentuser","$mandant_main_id");
|
||||
#my $umst1619 = $lb->umst_breaking($ctt,"");
|
||||
|
||||
my $txt20 = $ctt->{txt20};
|
||||
my $max_timestamp = "210001012359";
|
||||
if($node->{node_name} !~ /journal/){
|
||||
if($txt20 =~ /(\d{2})\.(\d{2})\.(\d{4})$/){
|
||||
$max_timestamp = $3 . $2 . $1 . "2359";
|
||||
}elsif($ctf->{txt80} =~ /(\d{2})\.(\d{2})\.(\d{4})$/){
|
||||
$max_timestamp = $3 . $2 . $1 . "2359";
|
||||
}
|
||||
}
|
||||
|
||||
my $max_sum = $ctf->{int03} || "10000";
|
||||
my @tpl_order = ("txt01=Beschreibung","ct_name=Nummer","date_time=Mietzeit","int03=Menge","int02=Preis","int07=Rabatt","int04=Gesamt");
|
||||
my ($cttpos,$rows) = $db->collect_contentpos("contenttrans",$c_id);
|
||||
foreach my $id (keys(%$cttpos)){
|
||||
|
@ -406,21 +396,21 @@ td {
|
|||
foreach my $id (sort { $cttpos->{$b}->{$scol} cmp $cttpos->{$a}->{$scol} } keys(%$cttpos)){
|
||||
my $cttpos_timestamp = $1 . $2 . $3 . "0000" if($cttpos->{$id}->{itime} =~ /(\d+)\-(\d+)\-(\d+)/);
|
||||
|
||||
my $gesamt = 0;
|
||||
my $rabatt = "";
|
||||
my $einzel = $cttpos->{$id}->{int02};
|
||||
my $menge = $cttpos->{$id}->{int03} || 0;
|
||||
my $unit = $cttpos->{$id}->{txt03};
|
||||
my $gesamt = 0;
|
||||
my $rabatt = "";
|
||||
my $einzel = $cttpos->{$id}->{int02};
|
||||
my $menge = $cttpos->{$id}->{int03} || 0;
|
||||
my $unit = $cttpos->{$id}->{txt03};
|
||||
|
||||
($gesamt,$rabatt) = $pri->price2calc($cttpos->{$id});
|
||||
$gesamt = $lb->round($gesamt);
|
||||
$gesamt = $lb->cashme($gesamt,",");
|
||||
($gesamt,$rabatt) = $pri->price2calc($cttpos->{$id});
|
||||
|
||||
#max. Rechnungspositionen
|
||||
if(($gesamt == 0) && ($cttpos_timestamp <= $max_timestamp || $ctt->{int05} == 1) && ($sum_parts19 <= $max_sum)){
|
||||
if($gesamt == 0){
|
||||
$nullcount++;
|
||||
}
|
||||
if(($gesamt != 0) && ($cttpos_timestamp <= $max_timestamp || $ctt->{int05} == 1) && ($sum_parts19 <= $max_sum)){
|
||||
|
||||
if($gesamt != 0){
|
||||
$gesamt = $lb->round($gesamt);
|
||||
$gesamt = $lb->cashme($gesamt,",");
|
||||
|
||||
$j++;
|
||||
if($j<=$max_table_wc || $break_table_wc){
|
||||
|
@ -453,10 +443,10 @@ td {
|
|||
}else{
|
||||
$ct_pos = "$cttpos->{$id}->{ct_name}";
|
||||
}
|
||||
print $q->td({-class=>'tdint'},"$ct_pos "),"\n";
|
||||
print $q->td({-class=>'tdint',-nowrap=>'1'},"$ct_pos "),"\n";
|
||||
}
|
||||
if($key =~ /txt01/){
|
||||
print "<td class='tdtxt'>\n";
|
||||
print "<td class='tdtxt' nowrap=1>\n";
|
||||
if($cttpos->{$id}->{$key}){
|
||||
$cttpos->{$id}->{$key} =~ s/\<br \/\>/; /g;
|
||||
print "$cttpos->{$id}->{$key}<br />\n";
|
||||
|
@ -481,7 +471,7 @@ td {
|
|||
$cttpos->{$id}->{int26} =~ s/\./,/;
|
||||
$co2saving .= "bei $cttpos->{$id}->{int26} KM";
|
||||
}
|
||||
print $q->td({-class=>'tdint'},"$co2saving");
|
||||
print $q->td({-class=>'tdint',-nowrap=>'1'},"$co2saving");
|
||||
}
|
||||
if($key =~ /int03/){
|
||||
$cttpos->{$id}->{$key} =~ s/\./,/;
|
||||
|
@ -498,16 +488,9 @@ td {
|
|||
}
|
||||
|
||||
if($key =~ /int04/){
|
||||
if($gesamt == "0"){
|
||||
$gesamt="";
|
||||
}else{
|
||||
$gesamt .= " €";
|
||||
$gesamt =~ s/\./,/;
|
||||
}
|
||||
$gesamt .= " €";
|
||||
if($rabatt != 0){
|
||||
my $proz="%";
|
||||
$proz = "€" if($cttpos->{$id}->{int08} == 1);
|
||||
print $q->td({-nowrap=>'1',-class=>'tdint'},"(Rabatt $rabatt $proz) $gesamt"),"\n";
|
||||
print $q->td({-nowrap=>'1',-class=>'tdint'},"(Rabatt $rabatt) $gesamt"),"\n";
|
||||
}else{
|
||||
print $q->td({-nowrap=>'1',-class=>'tdint'},"$gesamt"),"\n";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue