189 lines
5.1 KiB
Perl
189 lines
5.1 KiB
Perl
|
|
#!/usr/bin/perl
|
||
|
|
|
||
|
|
BEGIN { use lib '/usr/home/cfg' ; require push_inc ; }
|
||
|
|
|
||
|
|
require cfg ;
|
||
|
|
|
||
|
|
print "Content-type: text/html\n\n";
|
||
|
|
|
||
|
|
# unless ($useropts{it}{$username}) { print "<<<<<<<<<<<< MAINTENANCE IN PROGRESS >>>>>>>>>" ; exit ; }
|
||
|
|
|
||
|
|
#---------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||
|
|
|
||
|
|
use CGI::Carp qw(fatalsToBrowser);
|
||
|
|
use CGI;
|
||
|
|
use Mail::Sendmail;
|
||
|
|
use Fcntl qw(:flock);
|
||
|
|
use File::Copy;
|
||
|
|
use File::Basename;
|
||
|
|
use Date::Calc qw(:all);
|
||
|
|
use Excel::Writer::XLSX;
|
||
|
|
|
||
|
|
&today;
|
||
|
|
|
||
|
|
#---------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||
|
|
|
||
|
|
@ARGV = split(/\\*\&/, $ENV{'QUERY_STRING'});
|
||
|
|
$action = $ARGV[0] ;
|
||
|
|
|
||
|
|
our ($q) = CGI -> new() ;
|
||
|
|
our $iaction = $q -> param('iaction') || $action ;
|
||
|
|
our $isaved = $q -> param('isaved') || '' ;
|
||
|
|
|
||
|
|
our $debug = 1 ;
|
||
|
|
|
||
|
|
#-------- page opts --------------------------------------------------------------------------------------------------------------------------------------------------
|
||
|
|
|
||
|
|
&page_opts ;
|
||
|
|
|
||
|
|
#---------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||
|
|
|
||
|
|
our $srchscr = 1 ;
|
||
|
|
|
||
|
|
&db_open_ro ;
|
||
|
|
our $db_ignore_open_close = 1 ; # do one open and one close instead of repeating it
|
||
|
|
&report_screen if $iaction eq '' ;
|
||
|
|
|
||
|
|
if ($iaction eq 'report') {
|
||
|
|
&common_min_load_params ;
|
||
|
|
&report_ifields;
|
||
|
|
&list_screen ;
|
||
|
|
&screen3;
|
||
|
|
}
|
||
|
|
|
||
|
|
if ($iaction eq 'save') {
|
||
|
|
&common_min_load_params ;
|
||
|
|
&update ;
|
||
|
|
&report_ifields;
|
||
|
|
&list_screen ;
|
||
|
|
&screen3;
|
||
|
|
}
|
||
|
|
|
||
|
|
&common_min_action;
|
||
|
|
$db_ignore_open_close = 0 ; # do one open and one close instead of repeating it
|
||
|
|
&db_close_conn ;
|
||
|
|
|
||
|
|
exit;
|
||
|
|
|
||
|
|
#------------------------------------------------------------------------------------------
|
||
|
|
|
||
|
|
sub update {
|
||
|
|
|
||
|
|
&schedule_payments_update("troubleshoot_monitor") ;
|
||
|
|
|
||
|
|
} #------------------------------------------------------------------------------------------
|
||
|
|
|
||
|
|
sub report_ifields {
|
||
|
|
|
||
|
|
&schedule_payments_report_ifields("troubleshoot_monitor") ;
|
||
|
|
|
||
|
|
} #------------------------------------------------------------------------------------------
|
||
|
|
|
||
|
|
sub list_screen {
|
||
|
|
|
||
|
|
our $count_outstanding = 0 ;
|
||
|
|
|
||
|
|
&schedule_payments_list_screen("troubleshoot_monitor") ;
|
||
|
|
|
||
|
|
} #------------------------------------------------------------------------------------------
|
||
|
|
|
||
|
|
sub thead {
|
||
|
|
|
||
|
|
&common_min_thead ;
|
||
|
|
|
||
|
|
} #-------------------------------------------------------------------------------
|
||
|
|
|
||
|
|
sub page_opts {
|
||
|
|
|
||
|
|
our $glyphicon = 'list' ;
|
||
|
|
our $lcpage = 'troubleshoot-monitor-payment' ;
|
||
|
|
|
||
|
|
&common_page_name ;
|
||
|
|
|
||
|
|
our $table = 'shift_operator_ids' ;
|
||
|
|
$page_title = 'Troubleshoot Monitor Payments' ;
|
||
|
|
|
||
|
|
} #-------------------------------------------------------------------------------
|
||
|
|
|
||
|
|
sub report_screen {
|
||
|
|
|
||
|
|
&schedule_payments_report_screen("troubleshoot_monitor") ;
|
||
|
|
|
||
|
|
} #-------------------------------------------------------------------------------
|
||
|
|
|
||
|
|
sub screen3 {
|
||
|
|
|
||
|
|
&thead;
|
||
|
|
|
||
|
|
if ($isaved) { $alert = &common_min_alert('success',"$ucpage $isaved!",'ok') ; } else { &common_min_alert_type ; }
|
||
|
|
|
||
|
|
# my $page = "$lcpage\s" ;
|
||
|
|
|
||
|
|
my $page = "event-quotes" ;
|
||
|
|
|
||
|
|
if ($s{no}) { $page = $lcpage ; }
|
||
|
|
|
||
|
|
&common_min_table('id',$page,'list') ;
|
||
|
|
|
||
|
|
our $savjqy = 1 ;
|
||
|
|
|
||
|
|
# &common_min_extra_crumb("manage-$lcpage\s","Manage $ucfirstpage\s") ;
|
||
|
|
|
||
|
|
$extra_form_fields .= qq~
|
||
|
|
<input type="hidden" name="date_from" value="$i{date_from}">
|
||
|
|
<input type="hidden" name="date_to" value="$i{date_to}">
|
||
|
|
<input type="hidden" name="troubleshoot_monitor_id" value="$i{troubleshoot_monitor_id}">
|
||
|
|
<input type="hidden" name="paid_status" value="$i{paid_status}">~;
|
||
|
|
|
||
|
|
$print_box_content_rows .= &common_min_forms_end('','','save') if $count_outstanding ;
|
||
|
|
|
||
|
|
require _blank ;
|
||
|
|
|
||
|
|
exit ;
|
||
|
|
|
||
|
|
} #------------------------------------------------------------------------------------------
|
||
|
|
|
||
|
|
# sub screen4 {
|
||
|
|
|
||
|
|
# &common_min_alert_type ;
|
||
|
|
|
||
|
|
# print <<ENDOFTEXT;
|
||
|
|
# <!DOCTYPE html>
|
||
|
|
# <html lang="en">
|
||
|
|
# <head>
|
||
|
|
# <meta charset="utf-8">
|
||
|
|
# <title>$useropts{title}</title>
|
||
|
|
# <script src="$useropts{'bower_components'}/jquery/jquery.min.js"></script>
|
||
|
|
# </head>
|
||
|
|
# <body>
|
||
|
|
# <script>
|
||
|
|
|
||
|
|
# \$(document).ready(function(){ \$('#temp-calibrator-payment-form').submit(); })
|
||
|
|
|
||
|
|
# </script>
|
||
|
|
# </body>
|
||
|
|
|
||
|
|
# <form role="form" id="tempcalibrator-payments-report-form" method="post" action="tempcalibrator-payments-report">
|
||
|
|
# <input type="hidden" name="iaction" value="report">
|
||
|
|
# <input type="hidden" name="date_from" value="$i{date_from}">
|
||
|
|
# <input type="hidden" name="date_to" value="$i{date_to}">
|
||
|
|
# <input type="hidden" name="monitor_id" value="$i{monitor_id}">
|
||
|
|
# <input type="hidden" name="paid_status" value="$i{paid_status}">
|
||
|
|
# <input type="hidden" name="isaved" value="$success">
|
||
|
|
# </form>
|
||
|
|
|
||
|
|
# </html>
|
||
|
|
# ENDOFTEXT
|
||
|
|
# #
|
||
|
|
|
||
|
|
# exit ;
|
||
|
|
|
||
|
|
# } #------------------------------------------------------------------------------------------
|
||
|
|
|
||
|
|
use common ;
|
||
|
|
use report ;
|
||
|
|
use xlsxcreator ;
|
||
|
|
use today ;
|
||
|
|
use schedule ;
|
||
|
|
|
||
|
|
1;
|