projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2e761a7
)
package contacts / "name per packages", RT#22185
author
Ivan Kohler
<ivan@freeside.biz>
Mon, 15 Apr 2013 00:09:11 +0000
(17:09 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Mon, 15 Apr 2013 00:09:11 +0000
(17:09 -0700)
httemplate/edit/process/quick-cust_pkg.cgi
patch
|
blob
|
history
diff --git
a/httemplate/edit/process/quick-cust_pkg.cgi
b/httemplate/edit/process/quick-cust_pkg.cgi
index
4ea4ace
..
0cc17d3
100644
(file)
--- a/
httemplate/edit/process/quick-cust_pkg.cgi
+++ b/
httemplate/edit/process/quick-cust_pkg.cgi
@@
-70,6
+70,9
@@
my $quantity = $1 || 1;
$cgi->param('refnum') =~ /^(\d*)$/
or die 'illegal refnum '. $cgi->param('refnum');
my $refnum = $1;
$cgi->param('refnum') =~ /^(\d*)$/
or die 'illegal refnum '. $cgi->param('refnum');
my $refnum = $1;
+$cgi->param('contactnum') =~ /^(\-?\d*)$/
+ or die 'illegal contactnum '. $cgi->param('contactnum');
+my $contactnum = $1;
$cgi->param('locationnum') =~ /^(\-?\d*)$/
or die 'illegal locationnum '. $cgi->param('locationnum');
my $locationnum = $1;
$cgi->param('locationnum') =~ /^(\-?\d*)$/
or die 'illegal locationnum '. $cgi->param('locationnum');
my $locationnum = $1;
@@
-109,6
+112,7
@@
my %hash = (
: ''
),
'refnum' => $refnum,
: ''
),
'refnum' => $refnum,
+ 'contactnum' => $contactnum,
'locationnum' => $locationnum,
'discountnum' => $discountnum,
#for the create a new discount case
'locationnum' => $locationnum,
'discountnum' => $discountnum,
#for the create a new discount case
@@
-142,6
+146,14
@@
if ( $quotationnum ) {
my %opt = ( 'cust_pkg' => $cust_pkg );
my %opt = ( 'cust_pkg' => $cust_pkg );
+ if ( $contactnum == -1 ) {
+ my $contact = FS::contact->new({
+ 'custnum' => scalar($cgi->param('custnum')),
+ map { $_ => scalar($cgi->param("contactnum_$_")) } qw( first last )
+ });
+ $opt{'contact'} = $contact;
+ }
+
if ( $locationnum == -1 ) {
my $cust_location = FS::cust_location->new_or_existing({
map { $_ => scalar($cgi->param($_)) }
if ( $locationnum == -1 ) {
my $cust_location = FS::cust_location->new_or_existing({
map { $_ => scalar($cgi->param($_)) }