From 69e481a4a9191b9912d6bb8202627a5dc75f74ce Mon Sep 17 00:00:00 2001 From: Mitch Jackson Date: Thu, 11 Jan 2018 20:05:34 -0600 Subject: rt# 74031 implement svc_realestate --- httemplate/elements/menu.html | 6 ++- .../elements/select-realestate_location.html | 32 ++++++++++++ httemplate/elements/select-realestate_unit.html | 59 ++++++++++++++++++++++ .../elements/tr-select-realestate_location.html | 17 +++++++ httemplate/elements/tr-select-realestate_unit.html | 5 ++ 5 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 httemplate/elements/select-realestate_location.html create mode 100644 httemplate/elements/select-realestate_unit.html create mode 100644 httemplate/elements/tr-select-realestate_location.html create mode 100644 httemplate/elements/tr-select-realestate_unit.html (limited to 'httemplate/elements') diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index defcc494f..0a73d71a6 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -834,6 +834,11 @@ $config_misc{'Inventory classes and inventory'} = [ $fsurl.'browse/inventory_cla || $curuser->access_right('Edit global inventory') || $curuser->access_right('Configuration'); +$config_misc{'Real estate inventory'} = [ $fsurl.'browse/realestate_unit.html', 'Setup real estate inventory' ] + if $curuser->access_right('Edit realestate inventory') + || $curuser->access_right('Edit global inventory') + || $curuser->access_right('Configuration'); + $config_misc{'Upload targets'} = [ $fsurl.'browse/upload_target.html', 'Billing and payment upload destinations' ] if $curuser->access_right('Configuration'); @@ -1038,4 +1043,3 @@ sub submenu { } - diff --git a/httemplate/elements/select-realestate_location.html b/httemplate/elements/select-realestate_location.html new file mode 100644 index 000000000..001ed3e89 --- /dev/null +++ b/httemplate/elements/select-realestate_location.html @@ -0,0 +1,32 @@ +<%doc> + + Displays a selectbox populated with values from realestate_location. + key: realestate_location.realestatenum + value: realestate_location.location_title + + + +<% include( '/elements/select-table.html', + %opt, + table => 'realestate_location', + name_col => 'location_title', + hashref => { 'disabled' => '' }, + value => $select_value, + disable_empty => 1, + ) +%> + +<%init> + +# +# possible todo: +# I'd like to change the behavior of this select based on if +# a new item is being created, or an existing item being edited + +my %opt = @_; +my $select_value = $opt{'curr_value'} || $opt{'value'}; + +# use Data::Dumper qw(Dumper); +# print Dumper(\%opt); + + diff --git a/httemplate/elements/select-realestate_unit.html b/httemplate/elements/select-realestate_unit.html new file mode 100644 index 000000000..e189d5d99 --- /dev/null +++ b/httemplate/elements/select-realestate_unit.html @@ -0,0 +1,59 @@ +<%doc> + +Display a pair of select boxes for provisioning a realestate_unit +- Real Estate Location +- Real Estate Unit + +NOTE: + Records are always suppresed if + - realestate_location.disabled is set + - realestate_unit is provisioned to a customer [not working] + + If it becomes necessary, an option may be added to the template + to show disabled/provisioned records, but is not yet implemented + + +<& select-tiered.html, + 'tiers' => [ + { + + field => 'realestate_location', + table => 'realestate_location', + extra_sql => "WHERE realestate_location.disabled IS NULL " + . " OR realestate_location.disabled = '' ", + name_col => 'location_title', + empty_label => '(all)', + }, + { + field => 'realestatenum', + table => 'realestate_unit', + name_col => 'unit_title', + value_col => 'realestatenum', + link_col => 'realestatelocnum', + + # TODO: Filter units assigned to customers + # SQL below breaks the selectbox... why? + + # Also, can we assume if realestatenum doesn't appear in svc_realestate + # that the realestate_unit is unprovisioned to a customer? What indicator + # should be used to determine when a realestae_unit is not provisioned? + + # addl_from => " + # LEFT JOIN svc_realestate + # ON svc_realestate.realestatenum = realestate_unit.realestatenum + # ", + + #extra_sql => "WHERE svc_realestate.svcnum IS NULL ", + + disable_empty => 1, + debug => 1, + }, + ], + %opt, + 'prefix' => $opt{'prefix'}. $opt{'field'}. '_', #after %opt so it overrides +&> +<%init> + +my %opt = @_; + + diff --git a/httemplate/elements/tr-select-realestate_location.html b/httemplate/elements/tr-select-realestate_location.html new file mode 100644 index 000000000..1367886ed --- /dev/null +++ b/httemplate/elements/tr-select-realestate_location.html @@ -0,0 +1,17 @@ + + <% $opt{'label'} || 'Real Estate Location' %> + + <% include( '/elements/select-realestate_location.html', + 'curr_value' => $curr_value, + %opt + ) + %> + + + +<%init> + +my %opt = @_; +my $curr_value = $opt{'curr_value'} || $opt{'value'}; + + diff --git a/httemplate/elements/tr-select-realestate_unit.html b/httemplate/elements/tr-select-realestate_unit.html new file mode 100644 index 000000000..b1a4296d4 --- /dev/null +++ b/httemplate/elements/tr-select-realestate_unit.html @@ -0,0 +1,5 @@ +<& tr-td-label.html, @_ &> + +<& select-realestate_unit.html, @_ &> + + -- cgit v1.2.1 From 3b8a45fc69d6ed00c60afc10a20873623635938b Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Fri, 12 Jan 2018 15:54:35 -0500 Subject: RT# 78617 - added alert code that can be placed on any page. --- httemplate/elements/alert.html | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 httemplate/elements/alert.html (limited to 'httemplate/elements') diff --git a/httemplate/elements/alert.html b/httemplate/elements/alert.html new file mode 100644 index 000000000..620588b0c --- /dev/null +++ b/httemplate/elements/alert.html @@ -0,0 +1,4 @@ +% if ( $cgi->param('alert') ) { + <% mt($cgi->param('alert')) |h %> +

+% } \ No newline at end of file -- cgit v1.2.1 From 234cbf5b650cfd5616a81b55d86b8bbd0b23c558 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Fri, 12 Jan 2018 16:52:28 -0500 Subject: RT# 78617 - updated redirect to freeside_status to show update message --- httemplate/elements/alert.html | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 httemplate/elements/alert.html (limited to 'httemplate/elements') diff --git a/httemplate/elements/alert.html b/httemplate/elements/alert.html deleted file mode 100644 index 620588b0c..000000000 --- a/httemplate/elements/alert.html +++ /dev/null @@ -1,4 +0,0 @@ -% if ( $cgi->param('alert') ) { - <% mt($cgi->param('alert')) |h %> -

-% } \ No newline at end of file -- cgit v1.2.1 From 697515200e6e405272bd2d1cdf9784a990057334 Mon Sep 17 00:00:00 2001 From: Mitch Jackson Date: Fri, 19 Jan 2018 01:34:48 -0600 Subject: rt# 78547 Implement report listing future auto-bill charges --- httemplate/elements/menu.html | 2 ++ 1 file changed, 2 insertions(+) (limited to 'httemplate/elements') diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index 0a73d71a6..9b8b2cd1e 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -418,6 +418,8 @@ if( $curuser->access_right('Financial reports') ) { $report_financial{'Customer Accounting Summary'} = [ $fsurl.'search/report_customer_accounting_summary.html', 'Customer accounting summary report' ]; + $report_financial{'Upcoming Auto-Bill Transactions'} = [ $fsurl.'search/report_future_autobill.html', 'Upcoming auto-bill transactions' ]; + } elsif($curuser->access_right('Receivables report')) { $report_financial{'A/R Aging'} = [ $fsurl.'search/report_receivables.html', 'Accounts Receivable Aging report' ]; -- cgit v1.2.1 From e517b3733dd3d19a7af586c9f4b8cf9982a8b3d2 Mon Sep 17 00:00:00 2001 From: Mitch Jackson Date: Sat, 27 Jan 2018 21:21:59 -0600 Subject: RT# 73421 Add allow messages flag message_dest to contact_email --- httemplate/elements/contact.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'httemplate/elements') diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index faee7ead4..43e520155 100644 --- a/httemplate/elements/contact.html +++ b/httemplate/elements/contact.html @@ -42,7 +42,8 @@ % $value = join(', ', map $_->emailaddress, $contact->contact_email); % } elsif ( $field eq 'selfservice_access' % or $field eq 'comment' -% or $field eq 'invoice_dest' ) { +% or $field eq 'invoice_dest' +% or $field eq 'message_dest' ) { % $value = $X_contact->get($field); % } else { % $value = $contact->get($field); @@ -78,7 +79,7 @@ return false } -% } elsif ( $field eq 'invoice_dest' ) { +% } elsif ( $field eq 'invoice_dest' || $field eq 'message_dest' ) { % my $curr_value = $cgi->param($name . '_' . $field); % $curr_value = $value if !defined($curr_value); <& select.html, @@ -168,6 +169,7 @@ tie my %label, 'Tie::IxHash', unless ($opt{'for_prospect'}) { $label{'invoice_dest'} = 'Send invoices'; + $label{'message_dest'} = 'Send messages'; $label{'selfservice_access'} = 'Self-service'; } -- cgit v1.2.1 From e803d5f00368e951f7a4b82d5d390b53c4a6c827 Mon Sep 17 00:00:00 2001 From: Mitch Jackson Date: Tue, 30 Jan 2018 09:27:42 -0600 Subject: RT# 73422 Changes to report Customer Contacts --- .../elements/select-multiple-contact_class.html | 21 ++++++++++++++ .../elements/tr-select-multiple-contact_class.html | 32 ++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 httemplate/elements/select-multiple-contact_class.html create mode 100644 httemplate/elements/tr-select-multiple-contact_class.html (limited to 'httemplate/elements') diff --git a/httemplate/elements/select-multiple-contact_class.html b/httemplate/elements/select-multiple-contact_class.html new file mode 100644 index 000000000..81a71cc25 --- /dev/null +++ b/httemplate/elements/select-multiple-contact_class.html @@ -0,0 +1,21 @@ +<%doc> + +Display a multi-select box containing all Email Types listed in +the contact_class table. + +NOTE: + Don't confuse "Contact Type" (contact_email.classnum) with + "Customer Class" (cust_main.classnum) + + +<% include( '/elements/select-table.html', + table => 'contact_class', + hashref => { disabled => '' }, + name_col => 'classname', + field => 'classnum', + pre_options => [ 0 => '(No Type)' ], + multiple => 1, + all_selected => 1, + @_, + ) +%> diff --git a/httemplate/elements/tr-select-multiple-contact_class.html b/httemplate/elements/tr-select-multiple-contact_class.html new file mode 100644 index 000000000..5de129324 --- /dev/null +++ b/httemplate/elements/tr-select-multiple-contact_class.html @@ -0,0 +1,32 @@ +<%doc> + + Displays Contact Types as a multi-select box. + + If no non-disabled Contact Types have been defined in contact_class table, + renders a hidden input field with a blank value. + + + +% if ($has_types) { + + <% $opt{'label'} || emt('Contact Type') %> + + <% include( '/elements/select-multiple-contact_class.html', %opt ) %> + + +% } else { + +% } + +<%init> + +my %opt = @_; +$opt{field} ||= $opt{element_name} ||= 'classnum'; + +my $has_types =()= qsearch({ + table => 'contact_class', + hashref => { disabled => '' }, + extra_sql => ' LIMIT 1 ', +}); + + -- cgit v1.2.1 From 560af69840e7e3fcebf65d5d56ca4efc0851efec Mon Sep 17 00:00:00 2001 From: Mitch Jackson Date: Sat, 3 Feb 2018 20:16:47 -0600 Subject: RT# 73422 Fix report Customer Contacts --- httemplate/elements/tr-checkbox-multiple.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'httemplate/elements') diff --git a/httemplate/elements/tr-checkbox-multiple.html b/httemplate/elements/tr-checkbox-multiple.html index 4d754b007..baf18f916 100644 --- a/httemplate/elements/tr-checkbox-multiple.html +++ b/httemplate/elements/tr-checkbox-multiple.html @@ -1,3 +1,23 @@ +<%doc> + +Display a containing multiple checkboxes + +USAGE: + +<& /elements/tr-checkbox-multipe.html, + label => emt('Label'), + field => 'field_name', + options => ['opt1', 'opt2'], + labels => { + opt1 => 'Option 1', + opt2 => 'Option 2', + }, + value => { + opt2 => '1', # opt2 defaults as checked + } +&> + + <% include('tr-td-label.html', @_ ) %> > -- cgit v1.2.1