mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 15:16:38 +02:00
merchant_message and some cad fixes
This commit is contained in:
parent
cf476a2154
commit
76afd28578
8 changed files with 47 additions and 26 deletions
|
@ -869,7 +869,7 @@ sub service_work {
|
|||
$return->{$article}->{$key}->{service_type} = "$service_type";
|
||||
$return->{$article}->{$key}->{work_val} = "1" if($key =~ /int/);
|
||||
$return->{$article}->{$key}->{work_val} = "::erledigt::" if($key =~ /txt/);
|
||||
$return->{$article}->{$key}->{mtime} = "2022-09-29 00:00";
|
||||
$return->{$article}->{$key}->{mtime} = "2023-02-16 00:00";
|
||||
$return->{$article}->{$key}->{user_name} = "init";
|
||||
$return->{$article}->{$key}->{owner} = "188";
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ use Apache2::Const -compile => qw(OK );
|
|||
use JSON;
|
||||
use Scalar::Util qw(looks_like_number);
|
||||
use Config::General;
|
||||
|
||||
use Time::Piece;
|
||||
use Lib::Config;
|
||||
use Mod::DBtank;
|
||||
use Mod::Basework;
|
||||
|
@ -665,7 +665,7 @@ elsif($q->param('request') eq "stations_available"){
|
|||
$user_agent_subversion = $3 if($user_agent =~ /3\.0\.(\d+)/);
|
||||
|
||||
#for tests only contributors with service-tour defined
|
||||
if($user_agent_subversion <= 398 && $authraw->{txt18} && $authraw->{c_id} =~ /$dbt->{copri_conf}->{contributors}/){
|
||||
if(1==2 && $user_agent_subversion <= 398 && $authraw->{txt18} && $authraw->{c_id} =~ /$dbt->{copri_conf}->{contributors}/){
|
||||
my $pref_ctu = {
|
||||
table => "contentuser",
|
||||
fetch => "one",
|
||||
|
@ -675,8 +675,24 @@ elsif($q->param('request') eq "stations_available"){
|
|||
$uadr = $dbt->fetch_tablerecord($dbh,$pref_ctu);
|
||||
$response->{merchant_message} = $uadr->{txt01};
|
||||
$response->{merchant_message} = $uadr->{txt02} if($q->param('lang') eq "en");
|
||||
$response->{merchant_message} .= "\n\nWill be disabled --> debug contributor App version ($user_agent)";
|
||||
$response->{merchant_message} .= "\n\nWill be disabled --> debug contributor user_device (" . $q->param('user_device') . ")";
|
||||
}
|
||||
#bayern-maintanance-message
|
||||
my $lnow = strftime("%Y-%m-%d %H:%M:%S", localtime(time));
|
||||
my $localtime = Time::Piece->strptime($lnow, "%Y-%m-%d %H:%M:%S");
|
||||
my $epoch_now = $localtime->epoch;
|
||||
my $maintanance_start = Time::Piece->strptime("2023-02-16 21:00:00", "%Y-%m-%d %H:%M:%S");
|
||||
my $maintanance_end = Time::Piece->strptime("2023-02-17 03:00:00", "%Y-%m-%d %H:%M:%S");
|
||||
my $epoch_start = $maintanance_start->epoch;
|
||||
my $epoch_end = $maintanance_end->epoch;
|
||||
if(1==1 && $return_merchant->{merchant_id} eq $dbt->{appsframe}->{LastenradBayern}->{merchant_id} && $epoch_now >= $epoch_start && $epoch_now <= $epoch_end){
|
||||
my $pref_ctu = {
|
||||
table => "contentuser",
|
||||
fetch => "one",
|
||||
ct_name => "bayern-maintanance-message",
|
||||
};
|
||||
my $uadr = { c_id => 0 };
|
||||
$uadr = $dbt->fetch_tablerecord($dbh,$pref_ctu);
|
||||
$response->{merchant_message} = $uadr->{txt01};
|
||||
}
|
||||
|
||||
$response = { %$response, %$auth };
|
||||
|
|
|
@ -1001,6 +1001,9 @@ sub save_service_desc {
|
|||
if($_ =~ /txt\d+/ && $valxx =~ /int\d+=[a-z-]+=checkbox=\d+=\d/i){
|
||||
$update_ctuser->{$_} = "$valxx";
|
||||
$tpl_order_desc .= ",$valxx";
|
||||
}else{
|
||||
$update_ctuser->{$_} = "";
|
||||
$tpl_order_desc .= "";
|
||||
}
|
||||
}
|
||||
print FILE "update contentuser c_id:$c_id\n" . Dumper($update_ctuser) . "\n";
|
||||
|
|
|
@ -87,9 +87,9 @@ sub preinit(){
|
|||
return "failure::Fehler<br /> Die Sitzung wurde unterbrochen.";
|
||||
}
|
||||
|
||||
if((!looks_like_number($R::c_id4trans) || !looks_like_number($R::tpl_id4trans)) && $R::ct_trans !~ /delete_trans/ && !$R::v_abschluss){
|
||||
if((!looks_like_number($R::c_id4trans) || !looks_like_number($R::tpl_id4trans)) && ($R::ct_trans !~ /delete_trans|new_trans/) && !$R::v_abschluss){
|
||||
print FILE Dumper($q);
|
||||
return "failure::Fehler<br /> Daten ID's nicht vollständig ($R::c_id4trans || $R::tpl_id4trans)";
|
||||
return "failure::Fehler<br /> Daten ID's nicht vollständig (if((!looks_like_number($R::c_id4trans) || !looks_like_number($R::tpl_id4trans)) && ($R::ct_trans !~ /delete_trans|new_trans/) && !$R::v_abschluss))";
|
||||
}
|
||||
|
||||
#international buttons
|
||||
|
@ -626,8 +626,6 @@ sub preinit(){
|
|||
$ctt = $db->get_content1("contenttrans",$ctt->{c_id});
|
||||
$ctt->{sequence} = $R::payone_sequence || 1;
|
||||
|
||||
#only if int14 = OPOS (set by preauthorization)
|
||||
#if($ctt->{int14})#TODO doupleclick
|
||||
if($state !~ /Zahlungseingang/){
|
||||
#SEPA capture
|
||||
if($ctadr->{int03} == 1 && $ctt->{txt16} && $R::state =~ /SEPA/){#SEPA
|
||||
|
@ -652,6 +650,10 @@ sub preinit(){
|
|||
$update_ctt->{pay_time} = "now()";
|
||||
$u_rows += $dbt->update_record($dbh,$update_ctt,$ctt);
|
||||
$db->updater($table,"ct_name",$ctt->{barcode},"int14","null","","","","","");#delete OPOS also on basic invoice
|
||||
}elsif($ctt->{txt00} eq "Rechnung" && $R::sum_paid <= 0){
|
||||
$update_ctt->{int14} = "null";
|
||||
$update_ctt->{pay_time} = "now()";
|
||||
$u_rows += $dbt->update_record($dbh,$update_ctt,$ctt);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue