sig rental fix

This commit is contained in:
ragu 2022-06-21 20:47:15 +02:00
parent c5dbb5bff6
commit 087fe3da9c

View file

@ -372,8 +372,16 @@ sub sig_booking {
print FILE "<--- $now_dt failure sig_booking sig_post $todo , reset sig_book hash to empty\n";
}
my $posref = {
table => "contenttranspos",
fetch => "one",
ca_id => "$ctadr->{c_id}",
txt11 => "$sig_book->{rentalId}",
};
my $ctpos2 = { c_id => 0 };
$ctpos2 = $dbt->fetch_tablerecord($dbh,$posref) if(1==1);
if($ctpos->{c_id}){
if($ctpos2->{c_id}){
my $rows = 0;
my $update_pos = {
table => "contenttranspos",
@ -384,7 +392,7 @@ sub sig_booking {
table => "content",
mtime => "now()",
owner => "169",
c_id => $ctpos->{cc_id},
c_id => $ctpos2->{cc_id},
};
#rentalId will be only on success!
@ -407,13 +415,13 @@ sub sig_booking {
}
#keep in mind, all other states will be done on REST, hopefully
$update_pos->{txt25} = "$ctpos->{txt25}\n$sig_book->{return_state}";# if($sig_book->{return_state});
$rows = $dbt->update_record($dbh,$update_pos,$ctpos);
print FILE "<--- rows: $rows, update_pos: $ctpos->{c_id}, with:" . Dumper($update_pos) . "\n";
$update_pos->{txt25} = "$ctpos2->{txt25}\n$sig_book->{return_state}";# if($sig_book->{return_state});
$rows = $dbt->update_record($dbh,$update_pos,$ctpos2);
print FILE "<--- rows: $rows, update_pos: $ctpos2->{c_id}, with:" . Dumper($update_pos) . "\n";
if($ctpos->{cc_id}){
if($ctpos2->{cc_id}){
$rows = $dbt->update_record($dbh,$update_content,$update_content);
print FILE "<--- rows: $rows, update_content: $ctpos->{cc_id}, with:" . Dumper($update_content) . "\n";
print FILE "<--- rows: $rows, update_content: $ctpos2->{cc_id}, with:" . Dumper($update_content) . "\n";
}
}