mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-02-22 19:56:29 +01:00
minor changes
This commit is contained in:
parent
eac5a10050
commit
6747fa4fc2
5 changed files with 29 additions and 19 deletions
|
@ -17,7 +17,7 @@ use Date::Calc qw(:all);
|
|||
use Scalar::Util qw(looks_like_number);
|
||||
use DateTime;
|
||||
use DateTime::Format::Pg;
|
||||
|
||||
use Data::Dumper;
|
||||
use Lib::Config;
|
||||
use Mod::Buttons;
|
||||
use Mod::Libenz;
|
||||
|
@ -79,6 +79,10 @@ sub preinit(){
|
|||
my $aconf = Config::General->new($api_file);
|
||||
my %apikeyconf = $aconf->getall;
|
||||
|
||||
open(FILE,">>$varenv{logdir}/Prelogic.log");
|
||||
print FILE "\n*--> $now_dt| u_id: $users_dms->{u_id}" . Dumper($q) . "\n";
|
||||
|
||||
|
||||
if(!$users_dms->{u_id}){
|
||||
return "failure::Fehler<br /> Die Anwender Authentifikation wurde unterbrochen.";
|
||||
}
|
||||
|
@ -242,7 +246,7 @@ sub preinit(){
|
|||
}elsif($ct_name && !$rel->{content_id}){
|
||||
return "failure::Für die Terminzuordnung bitte zuerst einen Verkauf Vorgang öffnen oder neu erzeugen.<br /> ::$varenv{wwwhost}/Verkauf::Zum Verkauf";
|
||||
}else{
|
||||
return "failure::Die Artikelnummer konnte nicht gefunden werden.<br /> ::$varenv{wwwhost}/Waren::Waren verwalten";
|
||||
return "failure::Die Artikelnummer konnte nicht gefunden werden.<br /> ::$varenv{wwwhost}/DMS/Waren::Waren verwalten";
|
||||
}
|
||||
}
|
||||
#####
|
||||
|
@ -562,7 +566,7 @@ sub preinit(){
|
|||
owner => $users_dms->{u_id},
|
||||
};
|
||||
|
||||
if(($node_faktura->{invoice_nr} > 0) && ("$ctt->{ct_name}" !~ /\d/ || "$R::set_main_id" != "$rel->{main_id}")){
|
||||
if($node_faktura->{invoice_nr} > 0 && $ctt->{c_id} > 0 && ($ctt->{ct_name} !~ /\d/ || $R::set_main_id != $rel->{main_id})){
|
||||
|
||||
my $nextNr = $node_faktura->{invoice_nr};
|
||||
$update_ctt->{ct_name} = "$nextNr";
|
||||
|
@ -578,8 +582,11 @@ sub preinit(){
|
|||
$update_ctt->{int12} = $node->{main_id};
|
||||
$update_ctt->{txt00} = $node->{node_name};
|
||||
$u_rows += $dbt->update_record($dbh,$update_ctt,$ctt);
|
||||
|
||||
print FILE "invoice_nr:$invoice_nr,$users_dms->{c_id4trans},$users_dms->{tpl_id4trans} by condition: ($node_faktura->{invoice_nr} > 0) && ($ctt->{ct_name} !~ /\d/ || $R::set_main_id != $rel->{main_id})\n";
|
||||
}
|
||||
|
||||
|
||||
#SET state alias Zahlung buchen
|
||||
if($R::set_state && !$R::close_time){
|
||||
my $state = $R::state || "";
|
||||
|
@ -773,6 +780,7 @@ sub preinit(){
|
|||
}
|
||||
$db->cleanup_users($users_dms->{u_id});
|
||||
}
|
||||
close(FILE);
|
||||
###
|
||||
return "$i_rows-$u_rows-$d_rows";
|
||||
}
|
||||
|
|
|
@ -440,10 +440,9 @@ EOF
|
|||
}
|
||||
|
||||
#it will takes only one dataset
|
||||
#if($node_meta->{ct_table} eq "contenttrans" && $c_id4trans && $c_id4trans =~ /^\d+$/){
|
||||
# $ct4rel = $db->collect_cid($table,$lang,$tplids,$R::rel_id,$R::barcode,"c_id",$c_id4trans);
|
||||
#}els
|
||||
if(!$start_chck && !$end_chck){
|
||||
if($node_meta->{ct_table} eq "contenttrans" && $c_id4trans && $c_id4trans =~ /^\d+$/ && $users_dms->{faksum}){
|
||||
$ct4rel = $db->collect_cid($table,$lang,$tplids,$R::rel_id,$R::barcode,"c_id",$c_id4trans);
|
||||
}elsif(!$start_chck && !$end_chck){
|
||||
|
||||
#collect search keys
|
||||
foreach my $postkey (@keywords){
|
||||
|
|
|
@ -326,7 +326,7 @@ sub tpl(){
|
|||
my $style = "color:red;" if($ctt->{int01} ne $sum_paid);
|
||||
my $opos = "";
|
||||
$opos = "OPOS" if($ctt->{int14} && $ctt->{int14} > 0);
|
||||
print $q->div({-style=>"padding:0.5em;font-size:0.81em;width:98%;text-align:right;"},"<span style='color:red;'>$opos</span> Buchung $vibuchen_mtime \"$ctt->{state}\" $ctt->{int01} €"),"\n";
|
||||
print $q->div({-style=>"padding:0.5em;font-size:0.81em;width:98%;text-align:right;"},"<span style='color:red;'>$opos</span> $vibuchen_mtime \"$ctt->{state}\" $ctt->{int01} €"),"\n";
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
@ -345,9 +345,9 @@ sub tpl(){
|
|||
my $send_invoice_checkbox = 0;
|
||||
#$send_invoice_checkbox = 0 if($ctt->{txt30});
|
||||
print $q->div({-class=>'element6',-style=>'float:right;'}, $q->b("$ctt->{txt00}"),
|
||||
" PDF drucken ",$but->checkbox("print_pdf","ct_trans","1","PDF drucken",""),
|
||||
" eMail senden ",$but->checkbox("1","send_invoice","$send_invoice_checkbox","eMail $ctt->{txt00}",""),
|
||||
" Zahlungsart ",
|
||||
": PDF drucken ",$but->checkbox("print_pdf","ct_trans","1","PDF drucken",""),
|
||||
" – eMail senden ",$but->checkbox("1","send_invoice","$send_invoice_checkbox","eMail $ctt->{txt00}",""),
|
||||
" – Zahlungsart ",
|
||||
$but->selector("state","250px",$kind_of_payment,@_paymentstate),
|
||||
$but->singlesubmit1("set_state","buchen")),
|
||||
"\n";
|
||||
|
|
|
@ -76,8 +76,8 @@ sub tpl(){
|
|||
|
||||
my $ctadr = $db->get_content1("contentadr",$ctt->{int10});
|
||||
my $buchen_mtime = $lb->time4de($ctt->{mtime});
|
||||
my $vibuchen_mtime = "";
|
||||
$vibuchen_mtime = "payone post " . $lb->time4de($ctt->{pay_time},1) . " . " if($ctt->{pay_time});
|
||||
my $vibuchen_mtime = $lb->time4de($ctt->{mtime},1);
|
||||
$vibuchen_mtime = "Payone post " . $lb->time4de($ctt->{pay_time},1) . " . " if($ctt->{pay_time});
|
||||
|
||||
my @tpl_order = ("txt01=Beschreibung","ct_name=Nummer","date_time=timerange","int03=Menge (Miet - Gratis Zeit)","int02=Preis","int07=Rabatt","int04=Gesamt");
|
||||
my $tplf = $db->get_tpl("201");#Kunden-Faktura, ex Firma
|
||||
|
@ -557,16 +557,16 @@ EOF
|
|||
my $style = "color:red;" if($ctt->{int01} ne $sum_paid);
|
||||
my $opos = "";
|
||||
$opos = "OPOS" if($ctt->{int14} && $ctt->{int14} > 0);
|
||||
print $q->div({-style=>"padding:0.5em;font-size:0.81em;width:98%;text-align:right;"},"<span style='color:red;'>$opos</span> Buchung $vibuchen_mtime \"$ctt->{state}\" $ctt->{int01} €"),"\n";
|
||||
print $q->div({-style=>"padding:0.5em;font-size:0.81em;width:98%;text-align:right;"},"<span style='color:red;'>$opos</span> $vibuchen_mtime \"$ctt->{state}\" $ctt->{int01} €"),"\n";
|
||||
}
|
||||
|
||||
if(!$ctt->{close_time}){
|
||||
my $send_invoice_checkbox = 1;
|
||||
$send_invoice_checkbox = 0 if($ctt->{txt30} || $ctt->{ct_name} =~ /\d-\d/);
|
||||
print $q->div({-class=>'element6',-style=>'float:right;'}, $q->b("$ctt->{txt00}"),
|
||||
" PDF drucken ",$but->checkbox("print_pdf","ct_trans","1","PDF drucken",""),
|
||||
" eMail senden ",$but->checkbox("1","send_invoice","$send_invoice_checkbox","eMail $ctt->{txt00}",""),
|
||||
" Zahlungart ",
|
||||
": PDF drucken ",$but->checkbox("print_pdf","ct_trans","1","PDF drucken",""),
|
||||
" – eMail senden ",$but->checkbox("1","send_invoice","$send_invoice_checkbox","eMail $ctt->{txt00}",""),
|
||||
" – Zahlungart ",
|
||||
$but->selector("state","250px",$kind_of_payment,@_paymentstate),
|
||||
$but->singlesubmit1("set_state","buchen")),
|
||||
"\n";
|
||||
|
|
|
@ -427,8 +427,11 @@ sub get_positions {
|
|||
#theft mailing
|
||||
if($c_id && $theftmove_count > $dbt->{copri_conf}->{theftalarm}->{move_count} && ($resp->{speed} > $dbt->{copri_conf}->{theftalarm}->{speed} || $resp->{attributes}->{distance} > $dbt->{copri_conf}->{theftalarm}->{meter})){
|
||||
#send mail
|
||||
system("$dbt->{copri_conf}->{basedir}/$op_name->{syshost}/src/scripts/mailTransportcms.pl '$op_name->{syshost}' 'send_alarm2hotline' '1' '$c_id' ''");
|
||||
print FILE "$dbt->{copri_conf}->{basedir}/$op_name->{syshost}/src/scripts/mailTransportcms.pl '$op_name->{syshost}' 'send_alarm2hotline' '1' '$c_id' ''\n\n";
|
||||
#max ~ 10 mails
|
||||
if($theftmove_count < 10){
|
||||
system("$dbt->{copri_conf}->{basedir}/$op_name->{syshost}/src/scripts/mailTransportcms.pl '$op_name->{syshost}' 'send_alarm2hotline' '1' '$c_id' ''");
|
||||
print FILE "$dbt->{copri_conf}->{basedir}/$op_name->{syshost}/src/scripts/mailTransportcms.pl '$op_name->{syshost}' 'send_alarm2hotline' '1' '$c_id' ''\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue