mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-02-22 11:46:27 +01:00
Adding fibu fee for operator accounting
This commit is contained in:
parent
7fca481632
commit
9da4bd0cb0
11 changed files with 111 additions and 60 deletions
|
@ -1499,7 +1499,7 @@ sub insert_pos(){
|
|||
if($ct->{template_id} && $ct->{template_id} == 205){#Leihrad_list
|
||||
$sth = $dbh->prepare("INSERT INTO contenttranspos (ct_id,cc_id,ca_id,ct_name,barcode,txt01,txt08,txt02,txt09,txt12,itime,start_time,end_time,int01,int02,int03,int06,int04,txt05,txt06,txt07,int10,int12,template_id,int13,owner,int07,txt04,int09,int17,int15,int11,int18,int19,txt17,txt18,int20,int25,int29,int34,txt22,txt11,int35,int36,int37,int42,time01,time02) VALUES ('$ctt_id','$ct->{c_id}','$ctadr->{c_id}','$ct_name','$ct->{barcode}','$ct->{txt01}','$user_name','$ct->{txt02}','$ctadr->{txt09}','$prefix',now(),now(),'$endRental','1','$unit_price','$menge','$station','$station','$ct->{txt06}','$ct->{txt06}','$ct->{txt07}','$status','$from_main_id','$from_template_id','$deviceId','$owner','$rabatt','$tariff_desc','$tariff_nr','$daymax_price','$abo_price','$ct->{int11}','$sharing_type','$bike_charge','$ct->{txt17}','$ct->{txt18}','1','$trackon','$bike_type_id','$staff','$sig_book->{bikeId}','$sig_book->{rentalId}','$unit_price1','$unit_price2','$start_price','$aa_station','$unit_time','$free_time') RETURNING c_id");
|
||||
}else{
|
||||
$sth = $dbh->prepare("INSERT INTO contenttranspos (ct_id,cc_id,ca_id,ct_name,barcode,txt08,txt09,itime,int01,int02,int03,txt01,txt06,txt07,int10,int12,template_id,owner) VALUES ('$ctt_id','$ct->{c_id}','$ctadr->{c_id}','$ct_name','$ct->{barcode}','$user_name','$ctadr->{txt09}',now(),'1','$unit_price','1','$ct->{txt01}','$ct->{txt06}','$ct->{txt07}','0','$from_main_id','$from_template_id','$owner') RETURNING c_id");
|
||||
$sth = $dbh->prepare("INSERT INTO contenttranspos (ct_id,cc_id,ca_id,ct_name,barcode,txt08,txt09,itime,int01,int02,int03,txt01,txt06,txt07,int10,int12,int16,template_id,owner) VALUES ('$ctt_id','$ct->{c_id}','$ctadr->{c_id}','$ct_name','$ct->{barcode}','$user_name','$ctadr->{txt09}',now(),'1','$unit_price','1','$ct->{txt01}','$ct->{txt06}','$ct->{txt07}','0','$from_main_id','$ct->{int16}','$from_template_id','$owner') RETURNING c_id");
|
||||
}
|
||||
my $rows = $sth->execute();
|
||||
my $last_id;
|
||||
|
@ -1689,8 +1689,6 @@ sub search_content(){
|
|||
$txt_where .= " and (ct.$key ilike '$valref->{$key}' OR ct.barcode $opref->{$key} $valref->{$key})";
|
||||
}elsif($key eq "ct_name"){
|
||||
$txt_where .= " and ct.$key ilike '$valref->{$key}'";
|
||||
}elsif($key =~ /int01/ && $table eq "contenttrans" && looks_like_number($valref->{$key})){
|
||||
$cpgroup_where .= " group by cp.ct_id HAVING sum(cp.int02) $opref->{$key} $valref->{$key}";
|
||||
}elsif($key =~ /_id|barcode|int\d+|sort|owner/ && (looks_like_number($valref->{$key}) || $valref->{$key} =~ /null|0/)){
|
||||
$txt_where .= " and ct.$key $opref->{$key} $valref->{$key}";
|
||||
}elsif($key =~ /txt|uri/){
|
||||
|
@ -1701,11 +1699,16 @@ sub search_content(){
|
|||
}elsif($key =~ /byte/){
|
||||
$txt_where .= " and ct.$key = '\\x$valref->{$key}'";
|
||||
}
|
||||
|
||||
#sum pos doesn't work anymore
|
||||
#if($key =~ /int01/ && $table eq "contenttrans" && looks_like_number($valref->{$key})){
|
||||
#$cpgroup_where .= " group by cp.ct_id HAVING sum(cp.int02) $opref->{$key} $valref->{$key}";
|
||||
#}
|
||||
}
|
||||
|
||||
if($key =~ /end_/ && $key =~ /time$/){
|
||||
$valref->{$key} .= " 23:59" if($valref->{$key} !~ /\d:\d/);
|
||||
}
|
||||
#if($key =~ /end_/ && $key =~ /time$/){
|
||||
#$valref->{$key} .= " 23:59" if($valref->{$key} !~ /\d:\d/);
|
||||
#}
|
||||
|
||||
|
||||
if(!$v_journal){
|
||||
|
|
|
@ -435,7 +435,7 @@ sub handler {
|
|||
$feedb = $pl->save_text2contenttrans($q,$users_dms,$R::c_id4trans);
|
||||
}
|
||||
$return .= "|";
|
||||
$return .= $pre->preinit($users_dms,$lang);#transactions logic
|
||||
$return .= $pre->preinit($q,$users_dms);#transactions logic
|
||||
}
|
||||
}elsif($R::ct_trans){
|
||||
$feedb->{message} = "failure::Abbruch. Schreibender Zugriff \"Faktura\" verweigert.";
|
||||
|
@ -550,7 +550,7 @@ sub handler {
|
|||
#int12=0 should be set after capture success in payment module
|
||||
|
||||
if(($users_sharee->{int04} != 1) && ($users_sharee->{txt08} =~ /\w\@\w/)){
|
||||
$tk->emailack($users_sharee->{c_id});
|
||||
$tk->emailack(\%varenv,$users_sharee->{c_id});
|
||||
}
|
||||
if(($users_sharee->{int13} != 1) && ($users_sharee->{txt07} =~ /\d{9}/ && length($users_sharee->{txt07}) <= 16)){
|
||||
$tk->smsack($users_sharee);
|
||||
|
@ -580,7 +580,7 @@ sub handler {
|
|||
if($users_sharee->{c_id} && $users_sharee->{txt34} && length($users_sharee->{txt34}) > 10 && $payable_check && $R::sharee_edit && $R::sharee_edit =~ /save_account|send_email|send_sms/){
|
||||
|
||||
if(($users_sharee->{int04} != 1 || $R::sharee_edit =~ /send_email/) && ($users_sharee->{txt08} =~ /\w\@\w/)){
|
||||
$tk->emailack($users_sharee->{c_id});
|
||||
$tk->emailack(\%varenv,$users_sharee->{c_id});
|
||||
}
|
||||
if(($users_sharee->{int13} != 1 || $R::sharee_edit =~ /send_sms/) && ($users_sharee->{txt07} =~ /\d{9}/ && length($users_sharee->{txt07}) <= 16)){
|
||||
$tk->smsack($users_sharee);
|
||||
|
@ -675,7 +675,7 @@ sub handler {
|
|||
|
||||
if($R::email && $R::sharee_edit =~ /password_forgotten/){
|
||||
my $hw_id = unpack ('H*', pack('Nc', time, $$ % 0xff));#old $co
|
||||
$tk->send_password($R::email,$hw_id,$aowner);
|
||||
$tk->send_password(\%varenv,$R::email,$hw_id,$aowner);
|
||||
}
|
||||
|
||||
#redirections
|
||||
|
|
|
@ -535,7 +535,7 @@ sub rpc {
|
|||
}else{#because of Prelogic logic set it empty if no capture
|
||||
$update_ctt->{int14} = 1;#OPOS
|
||||
$update_adr->{int12} = $vde_on_fail;#Vde
|
||||
#system(`$varenv->{basedir}/src/Mod/newsletter_tink.pl "$varenv->{basedir}" "$varenv->{wwwhost}" "send_capture_fail" "$ctadr->{c_id}" "$ctt->{ct_name}"`);
|
||||
#TOD send_capture_fail mail?
|
||||
}
|
||||
$update_ctt->{txt28} = $now_dt . " $todo\n" . $res->content . "\n" . $update_ctt->{txt28};
|
||||
}
|
||||
|
|
|
@ -107,13 +107,6 @@ sub manage_dmsusers {
|
|||
$valxx =~ s/,/./g;
|
||||
$valxx = 0 if(!looks_like_number($valxx));# set to 0 for using == operator
|
||||
$feedb->{u_rows} = $dbt->update_one($dbh,$dmsusers,"$_=$valxx");
|
||||
if($_ eq "int09"){
|
||||
if($valxx == 1){
|
||||
$dbt->update_one($dbh,$adref,"int09=1");
|
||||
}else{
|
||||
$dbt->update_one($dbh,$adref,"int09=null");
|
||||
}
|
||||
}
|
||||
}elsif($_ =~ /^txt\d+/){
|
||||
my @val = $q->param($_);
|
||||
$valxx = $q->escapeHTML("@val");
|
||||
|
@ -125,6 +118,7 @@ sub manage_dmsusers {
|
|||
$bw->log("insert DMS user to $varenv->{dbname}",$ctadr->{c_id},"");
|
||||
$feedb->{i_rows} = $dbt->insert_users($dbh,$ctadr->{c_id},$owner);
|
||||
$dbt->update_one($dbh,$adref,"int07=100");
|
||||
$dbt->update_one($dbh,$adref,"int09=1");
|
||||
}
|
||||
|
||||
return $feedb;
|
||||
|
@ -250,15 +244,13 @@ sub save_content {
|
|||
$feedb->{message} = "failure::Eingabefehler \"$valxx\", falsche Datum Uhrzeit Format";
|
||||
}
|
||||
}elsif($_ =~ /^int|barcode/){
|
||||
if(($valxx && $valxx =~ /\d/) || looks_like_number($valxx)){
|
||||
my $val = $q->param("$_");
|
||||
$valxx = $q->escapeHTML("$val");
|
||||
$valxx =~ s/,/./;
|
||||
$valxx =~ s/\s//g;
|
||||
if(looks_like_number($valxx)){
|
||||
if($valxx && looks_like_number($valxx)){
|
||||
$update_ct->{$_} = "$valxx";
|
||||
}else{
|
||||
$feedb->{message} = "failure::Eingabefehler \"$valxx\", hier sind nur numerische Werte erlaubt";
|
||||
}
|
||||
}elsif(!$valxx){
|
||||
}elsif(!$valxx || $valxx eq "null"){
|
||||
$update_ct->{$_} = "null";
|
||||
}else{
|
||||
$feedb->{message} = "failure::Eingabefehler \"$valxx\", hier sind nur numerische Werte erlaubt";
|
||||
|
|
|
@ -23,7 +23,6 @@ use Mod::Buttons;
|
|||
use Mod::Libenz;
|
||||
use Mod::Libenzdb;
|
||||
use Mod::DBtank;
|
||||
use Mod::Callib;
|
||||
use Mod::Payment;
|
||||
use Mod::Pricing;
|
||||
|
||||
|
@ -37,16 +36,15 @@ sub new {
|
|||
#Template
|
||||
sub preinit(){
|
||||
my $self = shift;
|
||||
my $q = shift;
|
||||
my $users_dms = shift;
|
||||
|
||||
my $q = new CGI;
|
||||
$q->import_names('R');
|
||||
my @keywords = $q->param;
|
||||
my $cf = new Config;
|
||||
my $lb = new Libenz;
|
||||
my $db = new Libenzdb;
|
||||
my $dbt = new DBtank;
|
||||
my $cb = new Callib;
|
||||
my $but = new Buttons;
|
||||
my $payone = new Payment;
|
||||
my $pri = new Pricing;
|
||||
|
@ -575,6 +573,7 @@ sub preinit(){
|
|||
|
||||
my $sum_paid = "null";
|
||||
my $sum_operatorcredit = "null";
|
||||
my $sum_fibugeb = "null";
|
||||
my $state = $R::state || "";
|
||||
$update_ctt->{state} = "$state";
|
||||
$update_ctt->{int14} = 2;#set OPOS
|
||||
|
@ -592,6 +591,12 @@ sub preinit(){
|
|||
$update_ctt->{int14} = "null";
|
||||
}
|
||||
|
||||
if($R::set_state eq "buchen" && $R::sum_fibugeb){
|
||||
$sum_fibugeb = $R::sum_fibugeb;
|
||||
$sum_fibugeb =~ s/,/\./;
|
||||
$update_ctt->{int08} = $sum_fibugeb;
|
||||
}
|
||||
|
||||
$u_rows += $dbt->update_record($dbh,$update_ctt,$ctt);
|
||||
|
||||
if($state =~ /payone/){
|
||||
|
@ -604,10 +609,10 @@ sub preinit(){
|
|||
$ctt->{int01} = 0;
|
||||
$ctt->{sequence} = $ctt->{int18} || 1;
|
||||
$ctt->{sequence}++;
|
||||
if($ctadr->{int03} == 1 && $ctt->{txt16} && $R::state =~ /SEPA/){#SEPA 0
|
||||
if($ctt->{txt16} && $R::state =~ /SEPA/){#SEPA 0
|
||||
my $payoneret = $payone->captureSEPA_main(\%varenv,$ctadr,$ctt,$users_dms->{u_id});
|
||||
}
|
||||
if($ctadr->{int03} == 2 && $ctt->{txt16} && $R::state =~ /Kreditkarte/){#CC 0
|
||||
if($ctt->{txt16} && $R::state =~ /Kreditkarte/){#CC 0
|
||||
my $payoneret = $payone->captureCC_main(\%varenv,$ctadr,$ctt,$users_dms->{u_id});
|
||||
}
|
||||
$ctt = $db->get_content1("contenttrans",$ctt->{c_id});
|
||||
|
@ -626,11 +631,11 @@ sub preinit(){
|
|||
$ctt->{sequence} = $R::payone_sequence || 1;
|
||||
|
||||
#SEPA capture
|
||||
if($ctadr->{int03} == 1 && $ctt->{txt16} && $R::state =~ /SEPA/){#SEPA
|
||||
if($ctt->{txt16} && $R::state =~ /SEPA/){#SEPA
|
||||
my $payoneret = $payone->captureSEPA_main(\%varenv,$ctadr,$ctt,$users_dms->{u_id});
|
||||
}
|
||||
#CC capture
|
||||
elsif($ctadr->{int03} == 2 && $ctt->{txt16} && $R::state =~ /Kreditkarte/){#CC
|
||||
elsif($ctt->{txt16} && $R::state =~ /Kreditkarte/){#CC
|
||||
my $payoneret = $payone->captureCC_main(\%varenv,$ctadr,$ctt,$users_dms->{u_id});
|
||||
}
|
||||
else{
|
||||
|
@ -710,11 +715,6 @@ sub preinit(){
|
|||
}
|
||||
|
||||
if(-f "$varenv{basedir}/pdf/$praefix-$ctt->{ct_name}.pdf" && (($R::set_state eq "buchen" && $R::send_invoice && $ctt->{int01} && $ctt->{int01} != 0) || ($ib_key eq "send_invoice_again"))){
|
||||
#sleep 3;#PDF invoice sending disabled because of partly empty invoices
|
||||
#
|
||||
#my $key_pdf;
|
||||
#$key_pdf = `/usr/bin/pdftotext $varenv{basedir}/pdf/$praefix-$ctt->{ct_name}.pdf - | grep "Seite:"`;
|
||||
#system(`$varenv{basedir}/src/Mod/newsletter_tink.pl "$varenv{basedir}" "$varenv{wwwhost}" "send_invoice" "$ctt->{int10}" "$ctt->{ct_name}"`);# if($key_pdf =~ /Seite:/);
|
||||
system("$varenv{basedir}/src/scripts/mailTransport.pl '$varenv{syshost}' 'send_invoice' '$ctt->{c_id}' '$praefix-$ctt->{ct_name}.pdf'");
|
||||
|
||||
}
|
||||
|
|
|
@ -537,11 +537,18 @@ sub operator_accounting2calc {
|
|||
foreach(@tplf_order){
|
||||
my ($key,$val,$size) = split /=/,$_;
|
||||
if($key =~ /int/){
|
||||
$oac->{int99} = $ctpos->{int01} if($key eq "int01" && $ctpos->{int01});#invoice capture brutto
|
||||
$oac->{int01} = $ctpos->{int01} / 119 * 100 if($key eq "int01" && $ctpos->{int01});#invoice capture netto
|
||||
my $invoice_brutto = 0;
|
||||
if($key eq "int01" && $ctpos->{int01}){
|
||||
$invoice_brutto = $ctpos->{int01};
|
||||
#substract Fibu Gebühren like Rücklastschrift or Mahnung
|
||||
$invoice_brutto = $ctpos->{int01} - $ctpos->{int08} if($ctpos->{int08} && $ctpos->{int08} > 0);
|
||||
$oac->{int99} = $invoice_brutto;
|
||||
#invoice capture netto
|
||||
$oac->{int01} = $invoice_brutto / 119 * 100;
|
||||
}
|
||||
$oac->{int01} = sprintf('%.2f', $oac->{int01});
|
||||
|
||||
if($ctpos->{state} =~ /Lastschrift/){
|
||||
if($ctpos->{state} =~ /Lastschrift|Überweisung/){
|
||||
$oac->{int93} = $oac->{int01} / 100 * $ctf->{$key} if($key eq "int01");#7,5%
|
||||
$oac->{int93} = sprintf('%.3f', $oac->{int93});
|
||||
$oac->{int98} = $oac->{int93} * 0.19 if($oac->{int93});#UmSt auf 7,5%
|
||||
|
|
|
@ -4,7 +4,7 @@ package Shareework;
|
|||
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
|
||||
#
|
||||
#disable for syntax check
|
||||
#use lib qw(/var/www/copri4/shareeapp-primary/src);
|
||||
#use lib qw(/var/www/copri-bike/shareeapp-primary/src);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
@ -766,27 +766,33 @@ sub smsack(){
|
|||
#Send email after payable check and !int04
|
||||
sub emailack(){
|
||||
my $self = shift;
|
||||
my $c_id = shift;
|
||||
my %varenv = $cf->envonline();
|
||||
system(`$varenv{basedir}/src/Mod/newsletter_tink.pl "$varenv{basedir}" "$varenv{wwwhost}" "emailack" "$c_id" ""`);
|
||||
my $varenv = shift;
|
||||
my $adr_id = shift || "";
|
||||
|
||||
system(`$varenv->{basedir}/src/Mod/newsletter_tink.pl "$varenv->{basedir}" "$varenv->{wwwhost}" "emailack" "$adr_id" ""`);
|
||||
#TODO
|
||||
#system("$dbt->{copri_conf}->{basedir}/$varenv->{syshost}/src/scripts/mailTransportcms.pl '$varenv->{syshost}' 'send_emailack' '$adr_id' ''");
|
||||
}
|
||||
|
||||
#Password forgotten send email
|
||||
sub send_password(){
|
||||
my $self = shift;
|
||||
my ($email,$coo,$owner) = @_;
|
||||
my %varenv = $cf->envonline();
|
||||
my $varenv = shift;
|
||||
my $email = shift || "";
|
||||
my $coo = shift || "";
|
||||
my $owner = shift || "";
|
||||
|
||||
$email = $q->escapeHTML($email);
|
||||
$email =~ s/\s//g;
|
||||
$bw->log("$varenv{basedir}/src/Mod/newsletter_tink.pl",$email,"");
|
||||
|
||||
my $pwmd5 = md5_hex($coo) || "";
|
||||
|
||||
if($email && $email =~ /\w\@\w/ && $pwmd5 && length($pwmd5) > 20 && $email !~ /$dbt->{copri_conf}->{test_accounts}/i){
|
||||
my $pwsha256=sha256_base64($pwmd5) || "";
|
||||
$db->updater("contentadr","1","1","txt04","$pwsha256","$owner","txt08","ilike","$email");
|
||||
system(`$varenv{basedir}/src/Mod/newsletter_tink.pl "$varenv{basedir}" "$varenv{wwwhost}" "send_password" "$email" "$coo"`);
|
||||
system(`$varenv->{basedir}/src/Mod/newsletter_tink.pl "$varenv->{basedir}" "$varenv->{wwwhost}" "send_password" "$email" "$coo"`);
|
||||
#TODO
|
||||
#system("$dbt->{copri_conf}->{basedir}/$varenv->{syshost}/src/scripts/mailTransportcms.pl '$varenv->{syshost}' 'send_password' '$c_id' ''");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ sub tpl(){
|
|||
my $pref = {
|
||||
table => "contenttrans",
|
||||
fetch => "one",
|
||||
template_id => "IN::(209,218)",
|
||||
template_id => "IN::(208,209,218)",
|
||||
c_id => $users_dms->{c_id4trans},
|
||||
};
|
||||
$ctt = $dbt->fetch_record($dbh,$pref);
|
||||
|
@ -436,7 +436,7 @@ EOF
|
|||
#3.
|
||||
$ctt->{txt23} = $q->unescapeHTML("$ctt->{txt23}") if($ctt->{txt23});
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdval5',-colspan=>'2'},$q->textarea(-class=>'etxt',-name=>'txt23', -default=>"$ctt->{txt23}", -rows=>8, -columns=>65)),"\n";
|
||||
print $q->td({-class=>'tdval5',-colspan=>'2'},$q->textarea(-class=>'etxt',-name=>'txt23', -default=>"$ctt->{txt23}", -rows=>8, -columns=>55)),"\n";
|
||||
|
||||
print $q->end_table,"\n";
|
||||
print "</td>\n";
|
||||
|
@ -458,7 +458,7 @@ EOF
|
|||
#3.
|
||||
$ctt->{txt12} = $q->unescapeHTML($ctt->{txt12}) || "";
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdval5',-colspan=>'2'},$q->textarea(-class=>'etxt',-name=>'txt12', -default=>"$ctt->{txt12}", -rows=>8, -columns=>65)),"\n";
|
||||
print $q->td({-class=>'tdval5',-colspan=>'2'},$q->textarea(-class=>'etxt',-name=>'txt12', -default=>"$ctt->{txt12}", -rows=>8, -columns=>55)),"\n";
|
||||
|
||||
print $q->end_table,"\n";
|
||||
print "</td></tr>\n";
|
||||
|
|
|
@ -546,7 +546,7 @@ EOF
|
|||
print $q->a({-class=>'elinkbutton',-style=>'margin:0 0 2px 20px;', -href=>'?accounting_select=1'},"1. Einzüge selektieren"),"\n";
|
||||
}
|
||||
print "<b>$months[$mon -1] $year</b>\n";
|
||||
print $q->span({-style=>'font-size:0.81em;'}," (1. selektiert Rechnungen mit Payone Einzug & kein OPOS & kein Storno & keine interne Bemerkung, alle anderen bitte manuell überprüfen und falls i.O. selektieren)"),"\n";
|
||||
print $q->span({-style=>'font-size:0.81em;'}," (1. selektiert Rechnungen mit Payone Einzug & kein OPOS & p-Saldo=0 & kein Storno & keine interne Bemerkung, alle anderen bitte manuell überprüfen und falls i.O. selektieren)"),"\n";
|
||||
print "</div>\n";
|
||||
}
|
||||
print $q->hidden(-name=>'mandant_main_id', -value=>"$dbt->{shareedms_conf}->{parent_id}"),"\n";
|
||||
|
@ -669,7 +669,7 @@ EOF
|
|||
$e_mtime = $searchref->{end_date_time};
|
||||
}
|
||||
|
||||
print $q->td({-nowrap=>1,-class=>"search_line_date"},$q->textfield(-id=>'datepicker1',-class=>'etxt',-name=>"s_start_$key",-default=>"$s_mtime",-size=>"8",-maxlength=>10),"-",$q->textfield(-id=>'datepicker2',-class=>'etxt',-name=>"s_end_$key",-default=>"$e_mtime",-size=>"8",-maxlength=>10)),"\n" if($key =~ /time$/);
|
||||
print $q->td({-nowrap=>1,-class=>"search_line_date"},$q->textfield(-id=>'datepicker1',-class=>'etxt',-name=>"s_start_$key",-default=>"$s_mtime",-size=>"8",-maxlength=>10),"<",$q->textfield(-id=>'datepicker2',-class=>'etxt',-name=>"s_end_$key",-default=>"$e_mtime",-size=>"8",-maxlength=>10)),"\n" if($key =~ /time$/);
|
||||
}
|
||||
|
||||
|
||||
|
@ -820,7 +820,11 @@ EOF
|
|||
#permissions
|
||||
if($users_dms_primary->{int03} == 2 && $users_dms->{int03} == 2){
|
||||
my $checked = 0;
|
||||
$checked = 1 if($R::accounting_select && $node_meta->{template_id} == 209 && $ct4rel->{$id}->{int01} > 0 && $ct4rel->{$id}->{state} =~ /payone/i && !$ct4rel->{$id}->{int14} && !$ct4rel->{$id}->{txt22} && $ct4rel->{$id}->{int18} eq "1");
|
||||
|
||||
if($R::accounting_select && $node_meta->{template_id} == 209 && $ct4rel->{$id}->{int01} > 0 && $ct4rel->{$id}->{state} =~ /payone/i && !$ct4rel->{$id}->{int14} && $ct4rel->{$id}->{int16} == 0 && !$ct4rel->{$id}->{txt22} && $ct4rel->{$id}->{int18} eq "1"){
|
||||
$checked = 1
|
||||
}
|
||||
|
||||
print $q->td({-style=>"background-color:silver;"}, $q->checkbox(-name=>"ck4ex", -checked=>"$checked", -value=>"$ct4rel->{$id}->{c_id}", -label=>'')),"\n";
|
||||
}else{
|
||||
print $q->td({-style=>"background-color:silver;"}," "),"\n";
|
||||
|
|
|
@ -160,6 +160,7 @@ EOF
|
|||
#my $scol = "c_id";#changed to itime because of Storno resorts
|
||||
my $scol = "itime";
|
||||
my $sum_parts19=0;
|
||||
my $sum_fibugeb=0;
|
||||
my $diff19 = 100 + 19;
|
||||
my $sum_umst19=0;
|
||||
my $i=0;
|
||||
|
@ -185,6 +186,7 @@ EOF
|
|||
}else{
|
||||
($gesamt,my $rabatt) = $pri->price2calc($cttpos->{$id});
|
||||
$sum_parts19 += $gesamt;
|
||||
$sum_fibugeb += $gesamt if($cttpos->{$id}->{int16});
|
||||
$gesamt = $pri->round($gesamt);
|
||||
$gesamt = sprintf('%.2f', $gesamt);
|
||||
}
|
||||
|
@ -509,6 +511,7 @@ EOF
|
|||
print $q->td({-class=>'tdsum'},"<b>$summe:</b>");
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"<b>$sum_paid €<b/>");
|
||||
print $q->hidden(-name=>'sum_paid', -override=>'1',-value=>"$sum_paid");
|
||||
print $q->hidden(-name=>'sum_fibugeb', -override=>'1',-value=>"$sum_fibugeb") if($sum_fibugeb);
|
||||
|
||||
print $q->end_table;
|
||||
print "</td><td> </td>";
|
||||
|
@ -564,7 +567,9 @@ EOF
|
|||
if($ctt->{int16} && $ctt->{int16} > 0){
|
||||
print $q->div({-style=>"padding:0.5em;font-size:0.81em;width:98%;text-align:right;"},"<span style='color:red;'>$opos</span> Summe $ctt->{int01} € gebucht per \"$ctt->{state}\", Payone Saldo $ctt->{int16} € vom $vibuchen_mtime "),"\n";
|
||||
}else{
|
||||
print $q->div({-style=>"padding:0.5em;font-size:0.81em;width:98%;text-align:right;"},"<span style='color:red;'>$opos</span> Summe $ctt->{int01} € gebucht per \"$ctt->{state}\" am $vibuchen_mtime "),"\n";
|
||||
my $fibutext = "";
|
||||
$fibutext = "<span style='color:silver;'>(Fibu Gebühr $ctt->{int08})</span>" if($ctt->{int08});
|
||||
print $q->div({-style=>"padding:0.5em;font-size:0.81em;width:98%;text-align:right;"},"<span style='color:red;'>$opos</span> Summe $ctt->{int01} € $fibutext gebucht per \"$ctt->{state}\" am $vibuchen_mtime "),"\n";
|
||||
}
|
||||
}else{
|
||||
print $q->div({-style=>"padding:0.5em;font-size:0.81em;width:98%;text-align:right;"},"<span style='color:silver;'>Summe ist nicht gebucht!</span>"),"\n";
|
||||
|
|
|
@ -64,14 +64,27 @@ my $sendref = {
|
|||
|
||||
#my $project = $dbt->{operator}->{$varenv{dbname}}->{project} || die "project not defined";
|
||||
my $oprefix = $dbt->{operator}->{$varenv{dbname}}->{oprefix} || "";
|
||||
|
||||
my $sendmail = {};
|
||||
|
||||
#send_emailack
|
||||
if($todo eq "send_emailack" && looks_like_number($adr_id)){
|
||||
$sendmail = send_emailack($todo,$sendref,$adr_id);
|
||||
}
|
||||
|
||||
#send_password
|
||||
if($todo eq "send_password" && looks_like_number($adr_id)){
|
||||
$sendmail = send_password($todo,$sendref,$adr_id);
|
||||
}
|
||||
|
||||
#send_cpdate_message, done by cronjob cpdate_check.pl
|
||||
$sendmail = send_cpupdate_message($todo,$sendref,$adr_id) if(($todo eq "send_cpupdate_message" || $todo eq "send_proactive_cpupdate_message") && looks_like_number($adr_id));
|
||||
if(($todo eq "send_cpupdate_message" || $todo eq "send_proactive_cpupdate_message") && looks_like_number($adr_id)){
|
||||
$sendmail = send_cpupdate_message($todo,$sendref,$adr_id);
|
||||
}
|
||||
|
||||
#send_alarm2hotline, done by Ilockit_cloud.pl
|
||||
$sendmail = send_alarm2hotline($sendref,$ct_id) if($todo eq "send_alarm2hotline" && looks_like_number($adr_id) && looks_like_number($ct_id));
|
||||
if($todo eq "send_alarm2hotline" && looks_like_number($adr_id) && looks_like_number($ct_id)){
|
||||
$sendmail = send_alarm2hotline($sendref,$ct_id);
|
||||
}
|
||||
|
||||
if($sendmail->{c_id}){
|
||||
sendmailjob($sendmail);
|
||||
|
@ -79,6 +92,27 @@ if($sendmail->{c_id}){
|
|||
print EMA "Error, can not sendmailjob without c_id\n";
|
||||
}
|
||||
|
||||
|
||||
#send_emailack
|
||||
sub send_emailack {
|
||||
my $todo = shift;
|
||||
my $sendref = shift;
|
||||
my $adr_id = shift || "";
|
||||
|
||||
#TODO
|
||||
return;
|
||||
}
|
||||
|
||||
#send_password
|
||||
sub send_password {
|
||||
my $todo = shift;
|
||||
my $sendref = shift;
|
||||
my $adr_id = shift || "";
|
||||
|
||||
#TODO
|
||||
return;
|
||||
}
|
||||
|
||||
#send_cpupdate_message
|
||||
sub send_cpupdate_message {
|
||||
my $todo = shift;
|
||||
|
|
Loading…
Add table
Reference in a new issue