mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-10 22:16:26 +02:00
Vde and invoice closing
This commit is contained in:
parent
eafd393458
commit
39c28a9711
4 changed files with 14 additions and 43 deletions
|
@ -929,7 +929,7 @@ sub preinit(){
|
|||
|
||||
#collect sub-nodes
|
||||
#TODO
|
||||
my $main_ids = "300008,300009";#Rechnung,Storno
|
||||
my $main_ids = "300008,300009,300011";#Rechnung,Storno,Verkaufsjournal
|
||||
#my $main_ids = "$parent_trans->{main_id},";
|
||||
#$main_ids .= $db->collect_noderec($parent_trans->{main_id},$lang,"nothing") if($parent_trans->{main_id});
|
||||
#$main_ids =~ s/,$//;
|
||||
|
@ -941,13 +941,13 @@ sub preinit(){
|
|||
$sum_start = $lb->checkint($sum_start);
|
||||
$sum_kasse = $lb->checkint($sum_kasse);
|
||||
my $c_id4kasse = "";
|
||||
my $c_id4abschluss = $db->get_content6("$table","close_time","null","state","Kassenbestand","int09","$parent_trans->{parent_id}","","","$s_owner_id");
|
||||
my $c_id4abschluss = $db->get_content6("$table","close_time","null","state","Tagesabschluss","int09","$parent_trans->{parent_id}","","","$s_owner_id");
|
||||
if($journal_id){
|
||||
if($c_id4abschluss->{c_id} && $c_id4abschluss->{c_id} > 0){
|
||||
$c_id4kasse = $c_id4abschluss->{c_id};
|
||||
}else{
|
||||
$ct_name = "--- auto ct_name = c_id ---";
|
||||
$c_id4kasse = $db->insert_content2($table,$ct_name,$users_dms->{u_id},"Kassenbestand");
|
||||
$c_id4kasse = $db->insert_content2($table,$ct_name,$users_dms->{u_id},"Tagesabschluss");
|
||||
$i_rows += 1 if($c_id4kasse > 0);
|
||||
$db->update_content4change("contenttrans",$c_id4kasse,"$c_id4kasse");
|
||||
$db->update_content4change("contenttrans",$c_id4kasse,"",$parent_trans->{parent_id},"int09");#mandant_main_id
|
||||
|
|
|
@ -423,12 +423,10 @@ sub save_account(){
|
|||
}
|
||||
$u_rows = $dbt->update_one($dbh,$update_primary,"$_='$valxx'");
|
||||
}
|
||||
}elsif($_ eq "int12"){
|
||||
if($varenv{dbname} eq "sharee_primary"){
|
||||
$u_rows = $dbt->update_one($dbh,$update_primary,"$_=2");
|
||||
}else{
|
||||
$u_rows = $dbt->update_one($dbh,$update_primary,"$_=$valxx");
|
||||
}
|
||||
}elsif($_ eq "int12" && $varenv{dbname} ne "sharee_primary"){
|
||||
my $vde_on_fail = 0;
|
||||
$vde_on_fail = 2 if($valxx && $valxx == 1);
|
||||
$u_rows = $dbt->update_one($dbh,$update_primary,"$_=$vde_on_fail");
|
||||
}elsif($_ =~ /^int|barcode/){
|
||||
$u_rows = $dbt->update_one($dbh,$update_primary,"$_=$valxx");
|
||||
}elsif($_ eq "ct_name" && $R::base_edit){
|
||||
|
|
|
@ -987,7 +987,7 @@ sub tpl(){
|
|||
$betrag =~ s/\./,/;
|
||||
print $q->td({-class=>'tdint',-style=>"$txtstyle $set_style"},"$betrag"),"\n";
|
||||
}
|
||||
}elsif($key =~ /int02/ && $ct4rel->{$id}->{state} eq "Kassenbestand"){
|
||||
}elsif($key =~ /int02/ && $ct4rel->{$id}->{state} eq "Tagesabschluss"){
|
||||
print $q->td({-class=>'tdint',-style=>"$txtstyle $set_style"},$q->b("Anfangst. $ct4rel->{$id}->{$key}")),"\n";
|
||||
}elsif($key =~ /int03/ && "$table" eq "contenttrans"){
|
||||
print $q->td({-class=>'tdint',-style=>"$txtstyle $set_style"},""),"\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue