diff options
Diffstat (limited to 'httemplate/edit/process')
37 files changed, 154 insertions, 48 deletions
diff --git a/httemplate/edit/process/bulk-cust_main_county.html b/httemplate/edit/process/bulk-cust_main_county.html index b7ff40fa7..b5a0258b1 100644 --- a/httemplate/edit/process/bulk-cust_main_county.html +++ b/httemplate/edit/process/bulk-cust_main_county.html @@ -12,7 +12,7 @@ <% include('/elements/header-popup.html', "Taxes ${action}ed") %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY> diff --git a/httemplate/edit/process/bulk-cust_svc-pkgnum.html b/httemplate/edit/process/bulk-cust_svc-pkgnum.html index f5cf7dd07..3c273069a 100644 --- a/httemplate/edit/process/bulk-cust_svc-pkgnum.html +++ b/httemplate/edit/process/bulk-cust_svc-pkgnum.html @@ -7,7 +7,7 @@ <% header(emt("Services moved")) %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY> </HTML> diff --git a/httemplate/edit/process/cgp_rule-simplified.html b/httemplate/edit/process/cgp_rule-simplified.html index 60769d4e6..24515d551 100644 --- a/httemplate/edit/process/cgp_rule-simplified.html +++ b/httemplate/edit/process/cgp_rule-simplified.html @@ -4,7 +4,7 @@ % } else { #success XXX better msg talking about vacation vs. redirect all <% include('/elements/header-popup.html', 'Rule updated') %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY> diff --git a/httemplate/edit/process/change-cust_pkg.html b/httemplate/edit/process/change-cust_pkg.html index 308ea8ffd..54cafbf18 100644 --- a/httemplate/edit/process/change-cust_pkg.html +++ b/httemplate/edit/process/change-cust_pkg.html @@ -5,7 +5,7 @@ <% header(emt("Package changed")) %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY> </HTML> diff --git a/httemplate/edit/process/commission_schedule.html b/httemplate/edit/process/commission_schedule.html new file mode 100644 index 000000000..50e0371da --- /dev/null +++ b/httemplate/edit/process/commission_schedule.html @@ -0,0 +1,36 @@ +<& elements/process.html, + 'table' => 'commission_schedule', + 'viewall_dir' => 'browse', + 'process_o2m' => { + 'table' => 'commission_rate', + 'fields' => [qw( cycle amount percent )], + }, + 'precheck_callback' => $precheck, + 'debug' => 1, +&> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $precheck = sub { + my $cgi = shift; + $cgi->param('reasonnum') =~ /^(-?\d+)$/ or die "Illegal reasonnum"; + + my ($reasonnum, $error) = $m->comp('/misc/process/elements/reason'); + if (!$reasonnum) { + $error ||= 'Reason required' + } + $cgi->param('reasonnum', $reasonnum) unless $error; + + # remove rate entries with no cycle selected + foreach my $k (grep /^commissionratenum\d+$/, $cgi->param) { + if (! $cgi->param($k.'_cycle') ) { + $cgi->delete($k); + } + } + + $error; +}; + +</%init> diff --git a/httemplate/edit/process/credit-cust_bill_pkg.html b/httemplate/edit/process/credit-cust_bill_pkg.html index 75900bde5..12b68c0f5 100644 --- a/httemplate/edit/process/credit-cust_bill_pkg.html +++ b/httemplate/edit/process/credit-cust_bill_pkg.html @@ -3,7 +3,7 @@ %} else { <& /elements/header-popup.html, 'Credit successful' &> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY></HTML> % } diff --git a/httemplate/edit/process/cust_credit-pkgnum.html b/httemplate/edit/process/cust_credit-pkgnum.html index 8941cbc73..56f7989a4 100755 --- a/httemplate/edit/process/cust_credit-pkgnum.html +++ b/httemplate/edit/process/cust_credit-pkgnum.html @@ -4,7 +4,7 @@ %} else { <% header(emt('Credit package changed')) %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY></HTML> diff --git a/httemplate/edit/process/cust_credit.cgi b/httemplate/edit/process/cust_credit.cgi index 39c6f1997..5d3028777 100755 --- a/httemplate/edit/process/cust_credit.cgi +++ b/httemplate/edit/process/cust_credit.cgi @@ -16,7 +16,7 @@ % <% header(emt('Credit successful')) %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY></HTML> diff --git a/httemplate/edit/process/cust_location-censustract.html b/httemplate/edit/process/cust_location-censustract.html index bc9cd4f31..6edaca3fd 100644 --- a/httemplate/edit/process/cust_location-censustract.html +++ b/httemplate/edit/process/cust_location-censustract.html @@ -5,7 +5,7 @@ <% header("Census tract changed") %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY> </HTML> diff --git a/httemplate/edit/process/cust_location.cgi b/httemplate/edit/process/cust_location.cgi index fd1b8740e..3a2388111 100644 --- a/httemplate/edit/process/cust_location.cgi +++ b/httemplate/edit/process/cust_location.cgi @@ -5,7 +5,7 @@ <% header("Location changed") %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY> </HTML> diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index d590fdef0..74f8f2382 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -1,5 +1,15 @@ % if ( $error ) { % $cgi->param('error', $error); +% # workaround for create_uri_query's mangling of unicode characters, +% # false laziness with FS::Record::ut_coord +% use charnames ':full'; +% for my $pre (qw(bill ship)) { +% foreach (qw( latitude longitude)) { +% my $coord = $cgi->param($pre.'_'.$_); +% $coord =~ s/\N{DEGREE SIGN}\s*$//; +% $cgi->param($pre.'_'.$_, $coord); +% } +% } % my $query = $m->scomp('/elements/create_uri_query', 'secure'=>1); <% $cgi->redirect(popurl(2). "cust_main.cgi?$query" ) %> % @@ -76,8 +86,8 @@ if ( ($cgi->param('same') || '') eq 'Y' ) { # but explicitly avoid setting ship_ fields my $new = new FS::cust_main ( { - map { ( $_, scalar($cgi->param($_)) ) } (fields('cust_main')), - map { ( "ship_$_", '' ) } (FS::cust_main->location_fields) + (map { ( $_, scalar($cgi->param($_)) ) } (fields('cust_main'))), + (map { ( "ship_$_", '' ) } (FS::cust_main->location_fields)) } ); warn Dumper( $new ) if $DEBUG > 1; @@ -188,6 +198,15 @@ if ( $cgi->param('residential_commercial') eq 'Residential' ) { } +# kind of a hack, but some tax data vendors require a status and others +# don't. +my $vendor = $conf->config('tax_data_vendor'); +if ( $vendor eq 'avalara' or $vendor eq 'suretax' ) { + if ( ! $cgi->param('taxstatusnum') ) { + $error ||= 'Tax status required'; + } +} + #perhaps this stuff should go to cust_main.pm if ( $new->custnum eq '' or $duplicate_of ) { diff --git a/httemplate/edit/process/cust_main_attach.cgi b/httemplate/edit/process/cust_main_attach.cgi index 09c18adcb..569500246 100644 --- a/httemplate/edit/process/cust_main_attach.cgi +++ b/httemplate/edit/process/cust_main_attach.cgi @@ -9,7 +9,7 @@ % $act = 'deleted' if($attachnum and $delete); <% header('Attachment ' . $act ) %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY></HTML> % } diff --git a/httemplate/edit/process/cust_main_county-add.cgi b/httemplate/edit/process/cust_main_county-add.cgi index fc8956b0c..fcc138f49 100755 --- a/httemplate/edit/process/cust_main_county-add.cgi +++ b/httemplate/edit/process/cust_main_county-add.cgi @@ -1,7 +1,7 @@ <% include('/elements/header-popup.html', 'Addition successful' ) %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY> diff --git a/httemplate/edit/process/cust_main_county-expand.cgi b/httemplate/edit/process/cust_main_county-expand.cgi index a10827621..42e46734a 100755 --- a/httemplate/edit/process/cust_main_county-expand.cgi +++ b/httemplate/edit/process/cust_main_county-expand.cgi @@ -1,7 +1,7 @@ <% include('/elements/header-popup.html', 'Addition successful' ) %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY> diff --git a/httemplate/edit/process/cust_main_note.cgi b/httemplate/edit/process/cust_main_note.cgi index 53e616a43..bb52db8f3 100755 --- a/httemplate/edit/process/cust_main_note.cgi +++ b/httemplate/edit/process/cust_main_note.cgi @@ -4,7 +4,7 @@ %} else { <% header('Note ' . ($notenum ? 'updated' : 'added') ) %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY></HTML> % } diff --git a/httemplate/edit/process/cust_pay-no_auto_apply.cgi b/httemplate/edit/process/cust_pay-no_auto_apply.cgi index ccbd2d7b5..4a5ee841a 100644 --- a/httemplate/edit/process/cust_pay-no_auto_apply.cgi +++ b/httemplate/edit/process/cust_pay-no_auto_apply.cgi @@ -15,7 +15,7 @@ Requires 'Apply payment' acl. <P STYLE="font-weight: bold;"><% emt($message) %></P> <P><% emt('Please wait while the page reloads.') %></P> <SCRIPT TYPE="text/javascript"> -window.top.location.reload(); +topreload(); </SCRIPT> % } diff --git a/httemplate/edit/process/cust_pay-pkgnum.html b/httemplate/edit/process/cust_pay-pkgnum.html index d9a92a1de..cefe970fe 100755 --- a/httemplate/edit/process/cust_pay-pkgnum.html +++ b/httemplate/edit/process/cust_pay-pkgnum.html @@ -4,7 +4,7 @@ %} else { <% header(emt('Payment package changed')) %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY></HTML> diff --git a/httemplate/edit/process/cust_pay.cgi b/httemplate/edit/process/cust_pay.cgi index 56d3f2ff1..15b26f9c6 100755 --- a/httemplate/edit/process/cust_pay.cgi +++ b/httemplate/edit/process/cust_pay.cgi @@ -14,7 +14,7 @@ % <% header(emt('Payment entered')) %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY></HTML> @@ -69,6 +69,6 @@ push @rights, 'Post cash payment' if $new->payby eq 'CASH'; die "access denied" unless $FS::CurrentUser::CurrentUser->access_right(\@rights); -my $error ||= $new->insert( 'manual' => 1 ); +my $error = $new->insert( 'manual' => 1 ); </%init> diff --git a/httemplate/edit/process/cust_pay_pending.html b/httemplate/edit/process/cust_pay_pending.html index 1bad6cffe..80bd14aaf 100644 --- a/httemplate/edit/process/cust_pay_pending.html +++ b/httemplate/edit/process/cust_pay_pending.html @@ -3,7 +3,7 @@ <FONT SIZE="+1" COLOR="#ff0000">Error: <% $error |h %></FONT> % } else { <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> % } </BODY> @@ -59,6 +59,15 @@ if ( $action eq 'delete' ) { $title = 'Pending payment completed (decline)'; } +} elsif ( $action eq 'reverse' ) { + + $error = $cust_pay_pending->reverse; + if ( $error ) { + $title = 'Error reversing pending payment'; + } else { + $title = 'Pending payment completed (reverse)'; + } + } else { die "unknown action $action"; diff --git a/httemplate/edit/process/cust_pkg_detail.html b/httemplate/edit/process/cust_pkg_detail.html index 132ff63c5..25fabd930 100644 --- a/httemplate/edit/process/cust_pkg_detail.html +++ b/httemplate/edit/process/cust_pkg_detail.html @@ -6,7 +6,7 @@ % } else { <% header($action) %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY></HTML> % } diff --git a/httemplate/edit/process/cust_pkg_discount.html b/httemplate/edit/process/cust_pkg_discount.html index 143611ef9..963546363 100644 --- a/httemplate/edit/process/cust_pkg_discount.html +++ b/httemplate/edit/process/cust_pkg_discount.html @@ -5,7 +5,7 @@ <% header("Discount applied") %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY> </HTML> diff --git a/httemplate/edit/process/cust_pkg_quantity.html b/httemplate/edit/process/cust_pkg_quantity.html index fb2657252..b60595583 100644 --- a/httemplate/edit/process/cust_pkg_quantity.html +++ b/httemplate/edit/process/cust_pkg_quantity.html @@ -5,7 +5,7 @@ <& /elements/header-popup.html, "Quantity changed" &> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY> </HTML> diff --git a/httemplate/edit/process/cust_pkg_salesnum.html b/httemplate/edit/process/cust_pkg_salesnum.html index aab37416a..c1cb26813 100644 --- a/httemplate/edit/process/cust_pkg_salesnum.html +++ b/httemplate/edit/process/cust_pkg_salesnum.html @@ -5,7 +5,7 @@ <& /elements/header-popup.html, "Sales Person changed" &> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY> </HTML> diff --git a/httemplate/edit/process/cust_refund.cgi b/httemplate/edit/process/cust_refund.cgi index 8977ced20..d4236bcdf 100755 --- a/httemplate/edit/process/cust_refund.cgi +++ b/httemplate/edit/process/cust_refund.cgi @@ -7,7 +7,7 @@ % <% header('Refund entered') %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY></HTML> diff --git a/httemplate/edit/process/cust_tax_adjustment.html b/httemplate/edit/process/cust_tax_adjustment.html index 204b5b9f7..fe232757f 100644 --- a/httemplate/edit/process/cust_tax_adjustment.html +++ b/httemplate/edit/process/cust_tax_adjustment.html @@ -4,7 +4,7 @@ % } else { <% header("Tax adjustment added") %> <SCRIPT TYPE="text/javascript"> - //window.top.location.reload(); + //topreload(); parent.cClick(); </SCRIPT> </BODY></HTML> diff --git a/httemplate/edit/process/detach-cust_pkg.html b/httemplate/edit/process/detach-cust_pkg.html index 782ffa5e0..34c580560 100644 --- a/httemplate/edit/process/detach-cust_pkg.html +++ b/httemplate/edit/process/detach-cust_pkg.html @@ -5,7 +5,7 @@ <% header(emt("Package detached")) %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY> </HTML> diff --git a/httemplate/edit/process/domain_record.cgi b/httemplate/edit/process/domain_record.cgi index 8369f7114..9d869d547 100755 --- a/httemplate/edit/process/domain_record.cgi +++ b/httemplate/edit/process/domain_record.cgi @@ -3,7 +3,7 @@ %} elsif ( $recnum ) { #editing <% header('Nameservice record changed') %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY></HTML> %} else { #adding diff --git a/httemplate/edit/process/elements/ApplicationCommon.html b/httemplate/edit/process/elements/ApplicationCommon.html index c7bdd3ea2..67fa89196 100644 --- a/httemplate/edit/process/elements/ApplicationCommon.html +++ b/httemplate/edit/process/elements/ApplicationCommon.html @@ -21,11 +21,12 @@ Examples: </%doc> %if ( $error ) { % $cgi->param('error', $error); -<% $cgi->redirect(popurl(2). $opt{error_redirect}. '?'. $cgi->query_string ) %> +% my $query = $m->scomp('/elements/create_uri_query'); +<% $cgi->redirect(popurl(2). $opt{error_redirect}. "?$query") %> %} else { <% header("$src_thing application$to sucessful") %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY> </HTML> diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html index fd12c61d9..76722c960 100644 --- a/httemplate/edit/process/elements/process.html +++ b/httemplate/edit/process/elements/process.html @@ -62,6 +62,8 @@ Example: 'fields' => [qw( fieldname fieldname2 )], }, + 'process_locale' => 'fieldname', # update entries in the _msgcat table + 'process_upload' => { 'process' => 'misc/mytable-import.html', # fields to pass to the back end job, besides the @@ -186,7 +188,7 @@ process(); <% include('/elements/header-popup.html', $opt{'popup_reload'} ) %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY> @@ -363,12 +365,21 @@ foreach my $value ( @values ) { } - if ( !$error && $opt{'process_o2m'} ) { - - my @process_o2m = ref($opt{'process_o2m'}) eq 'ARRAY' - ? @{ $opt{'process_o2m'} } - : ( $opt{'process_o2m'} ); + my @process_o2m; + if ( $opt{'process_o2m'} ) { + @process_o2m = ref($opt{'process_o2m'}) eq 'ARRAY' + ? @{ $opt{'process_o2m'} } + : ( $opt{'process_o2m'} ); + } + if ( $opt{'process_locale'} ) { + push @process_o2m, + { + 'table' => $table . '_msgcat', + 'fields' => [ 'locale', $opt{'process_locale'} ], + }; + } + if ( !$error ) { foreach my $process_o2m (@process_o2m) { diff --git a/httemplate/edit/process/part_event.html b/httemplate/edit/process/part_event.html index bac69241c..0293af886 100644 --- a/httemplate/edit/process/part_event.html +++ b/httemplate/edit/process/part_event.html @@ -39,8 +39,8 @@ split(/\0/, $value) }; } elsif ( $info->{'type'} eq 'freq' ) { - $value = '0' if !length($value); - $value .= $params->{$cgi_field.'_units'}; + $value = '0' if !length($value) and !$info->{'allow_blank'}; + $value .= $params->{$cgi_field.'_units'} if length($value); } #warn "value of $cgi_field is $value\n"; diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi index b8042026a..c4d150ba1 100755 --- a/httemplate/edit/process/part_pkg.cgi +++ b/httemplate/edit/process/part_pkg.cgi @@ -9,6 +9,7 @@ 'edit_ext' => 'cgi', 'precheck_callback' => $precheck_callback, 'args_callback' => $args_callback, + 'process_locale' => 'pkg', 'process_m2m' => \@process_m2m, 'process_o2m' => \@process_o2m, ) @@ -310,10 +311,6 @@ foreach my $amount_param ( grep /^usagepricepart(\d+)_amount$/, $cgi->param ) { my @process_o2m = ( { - 'table' => 'part_pkg_msgcat', - 'fields' => [qw( locale pkg )], - }, - { 'table' => 'part_pkg_usageprice', 'fields' => [qw( price currency action target amount )], diff --git a/httemplate/edit/process/prospect_main.html b/httemplate/edit/process/prospect_main.html index 7c8cc276e..b2ae88eba 100644 --- a/httemplate/edit/process/prospect_main.html +++ b/httemplate/edit/process/prospect_main.html @@ -1,5 +1,6 @@ <% include('elements/process.html', 'table' => 'prospect_main', + 'precheck_callback' => $precheck, 'args_callback' => $args_callback, 'agent_virt' => 1, 'process_o2m' => { @@ -11,6 +12,16 @@ %> <%init> +my $precheck = sub { + my $cgi = shift; + my $vendor = FS::Conf->new->config('tax_data_vendor'); + if ( $vendor eq 'avalara' or $vendor eq 'suretax' ) { + if ( ! $cgi->param('taxstatusnum') ) { + return 'Tax status required'; + } + } +}; + my $args_callback = sub { my( $cgi, $object ) = @_; diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index 8ee182141..00d17c8b1 100644 --- a/httemplate/edit/process/quick-charge.cgi +++ b/httemplate/edit/process/quick-charge.cgi @@ -1,10 +1,10 @@ % if ( $error ) { % $cgi->param('error', $error ); -<% $cgi->redirect($p.'quick-charge.html?'. $cgi->query_string) %> +<% $cgi->redirect($redirect) %> % } else { <% header(emt($message)) %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY></HTML> % } @@ -157,4 +157,14 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge } +my $redirect; +if ( $error ) { + $cgi->param('error', $error ); + $redirect = $p.'quick-charge.html?'. $cgi->query_string; +} elsif ( $quotation ) { + $redirect = $fsurl.'view/quotation.html?' . $quotation->quotationnum; +} else { + $redirect = $fsurl.'view/cust_main.cgi?custnum=' . $cust_main->custnum . ';show=last'; +} + </%init> diff --git a/httemplate/edit/process/quotation_convert.html b/httemplate/edit/process/quotation_convert.html index dc00a88d3..26b5294f7 100644 --- a/httemplate/edit/process/quotation_convert.html +++ b/httemplate/edit/process/quotation_convert.html @@ -10,9 +10,12 @@ my $quotation = qsearchs( 'quotation' => { quotationnum => scalar( $cgi->param('quotationnum') ), } ) or die 'unknown quotationnum'; +my $params = {}; +$$params{'onhold'} = $cgi->param('onhold') ? 1 : 0; + my $cust_main = $quotation->cust_main; if ( $cust_main ) { - my $error = $quotation->order; + my $error = $quotation->order(undef,$params); errorpage($error) if $error; #i should be part of the order transaction @@ -20,7 +23,7 @@ if ( $cust_main ) { $quotation->replace; } else { - $cust_main = $quotation->convert_cust_main; + $cust_main = $quotation->convert_cust_main( $params ); errorpage($cust_main) unless ref($cust_main);# eq 'FS::cust_main'; } diff --git a/httemplate/edit/process/quotation_pkg_detail.html b/httemplate/edit/process/quotation_pkg_detail.html index 9e4ac3222..5728832b2 100644 --- a/httemplate/edit/process/quotation_pkg_detail.html +++ b/httemplate/edit/process/quotation_pkg_detail.html @@ -6,7 +6,7 @@ % } else { <% header($action) %> <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); + topreload(); </SCRIPT> </BODY></HTML> % } @@ -26,8 +26,16 @@ my $quotation_pkg = qsearchs({ 'LEFT JOIN cust_main USING ( custnum )', 'hashref' => { 'quotationpkgnum' => $pkgnum }, 'extra_sql' => ' AND '. $curuser->agentnums_sql, +}) +|| qsearchs({ + 'table' => 'quotation_pkg', + 'addl_from' => 'LEFT JOIN quotation USING ( quotationnum )'. + 'LEFT JOIN prospect_main USING ( prospectnum )', + 'hashref' => { 'quotationpkgnum' => $pkgnum }, + 'extra_sql' => ' AND '. $curuser->agentnums_sql, }); + my @orig_details = $quotation_pkg->details(); my $action = 'Quotation details'. diff --git a/httemplate/edit/process/svc_dsl.html b/httemplate/edit/process/svc_dsl.html index 436ca766b..489c86916 100644 --- a/httemplate/edit/process/svc_dsl.html +++ b/httemplate/edit/process/svc_dsl.html @@ -25,7 +25,7 @@ my $precheck_callback = sub { my $psc = $part_svc->part_svc_column('password'); if ( $psc->columnflag eq 'F' ) { # enforce it here and skip password validation - $cgi->param('password', $psc->columnvalue; + $cgi->param('password', $psc->columnvalue); } else { my $newpass = $cgi->param('password'); if ( $old and $newpass ne $old->password ) { diff --git a/httemplate/edit/process/tower.html b/httemplate/edit/process/tower.html index 02362db6a..d14ac56f8 100644 --- a/httemplate/edit/process/tower.html +++ b/httemplate/edit/process/tower.html @@ -4,6 +4,7 @@ process_o2m => { 'table' => 'tower_sector', 'fields' => [qw( sectorname ip_addr height freq_mhz direction width + downtilt v_width margin sector_range )], }, |
