Faktura table-sum option. pdf print only after book payment

This commit is contained in:
ragu 2023-01-30 20:59:19 +01:00
parent 7ce6cb6230
commit eac5a10050
8 changed files with 75 additions and 38 deletions

View file

@ -79,7 +79,7 @@ sub loop_sharees {
#every sharee client must have a merchant_id which associate a project
#if($op_name->{operatorApp} && ($users_serviceapp->{u_id} || ($return_merchant->{project_id} eq $op_name->{project}))){
#TODO, to reduce request time by ($return_merchant->{project_id} eq "Freiburg") do it only for shareeweb-sharee.copri.eu
#to reduce request time by ($return_merchant->{project_id} eq "Freiburg") we do it only for shareeweb-sharee.copri.eu
if($op_name->{operatorApp} && ($users_serviceapp->{u_id} || $return_merchant->{project_id} eq "Freiburg" || ($return_merchant->{project_id} eq $op_name->{project}))){
#$bw->log("--> LOOP-start ($return_merchant->{merchant_id}) jsonclient loop_sharees $key by operatorApp: $op_name->{operatorApp}, netloc: $netloc if($return_merchant->{project_id} eq $op_name->{project} || $users_serviceapp->{u_id} > 0)\n","","");
@ -105,6 +105,11 @@ sub loop_sharees {
if($q->param('request') && $q->param('request') =~ /stations_all|stations_available/){
foreach my $result (keys (%{ $response_in->{shareejson}->{stations} })) {
$fetch_hash->{$result} = $response_in->{shareejson}->{stations}->{$result};
#workaround, delete contributor test stations on global sharee project Freiburg
if($return_merchant->{project_id} eq "Freiburg" && $return_merchant->{project_id} ne $op_name->{project} && $fetch_hash->{$result}->{description} =~ /Contributor/i){
#$bw->log("delete contributor-station $result: $fetch_hash->{$result}->{description}","","");
delete $fetch_hash->{$result};
}
}
}
if($q->param('request') && $q->param('request') =~ /bikes_all|bikes_available/){

View file

@ -407,12 +407,12 @@ td {
$mandat_nr = " Mandatsreferenz: $ctt->{txt26}" if($ctt->{txt26} =~ /\w{2}-/);
my $invoice_time = $ctt->{invoice_time} || $ctt->{mtime};
my $update_ctt = {
table => "contenttrans",
pay_time => "$invoice_time",
};
#my $update_ctt = {
# table => "contenttrans",
# pay_time => "$invoice_time",
# };
#necersarry for non payone capture
$dbt->update_record($dbh,$update_ctt,$ctt) if(!$ctt->{pay_time});
#$dbt->update_record($dbh,$update_ctt,$ctt) if(!$ctt->{pay_time});
my $mtime = $lb->time4de("$invoice_time","");
my $position = "";

View file

@ -58,9 +58,16 @@ sub handler {
}
print FILE "$_: $valxx\n" if($debug);
}
if($table eq "content"){
if($table eq "users" && $R::faksum){
my $update_users = {
table => "users",
u_id => $users_dms->{u_id},
change => "no_time",
};
my $toggle = 1;
$toggle = 0 if($users_dms->{faksum});
$dbt->update_one($dbh,$update_users,"faksum=$toggle");
}elsif($table eq "content"){
my $sth = $db->search_json("$table","$lang","$search","$main_id");
while ( my $row = $sth->fetchrow_hashref ){
push @query_output, $row;