From f413badbfe4676563d11b528838a21d9ceb8da14 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Wed, 6 Jul 2016 11:53:13 -0700 Subject: service label localization, internals and UI, #71347 --- httemplate/edit/process/elements/process.html | 21 ++++++++++++++++----- httemplate/edit/process/part_pkg.cgi | 5 +---- 2 files changed, 17 insertions(+), 9 deletions(-) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html index fd12c61d9..60aaf749a 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 @@ -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_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, ) @@ -309,10 +310,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 )], -- cgit v1.2.1 From a2c196921e984b7f1784fbb41c96a053ef68c9ee Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Tue, 19 Jul 2016 14:37:17 -0500 Subject: RT#6223: Billing process - pending packages - feature request [order quotation on hold] --- httemplate/edit/process/quotation_convert.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/process') 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'; } -- cgit v1.2.1