diff options
author | ivan <ivan> | 2008-06-05 19:24:33 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-06-05 19:24:33 +0000 |
commit | 1203e278e2ec38fcf1468da2e4f10862004bebeb (patch) | |
tree | 0a9c3155181c6443f5e6faacfa4911e944435697 /FS/FS/cust_main.pm | |
parent | 3b54099d7b5532a411bb477006d78844c0597745 (diff) |
voxlinesystems CDRs and quantity bs
Diffstat (limited to 'FS/FS/cust_main.pm')
-rw-r--r-- | FS/FS/cust_main.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 787a2ef00..1f2fe886b 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -4675,9 +4675,10 @@ the error, otherwise returns false. sub charge { my $self = shift; - my ( $amount, $pkg, $comment, $taxclass, $additional, $classnum ); + my ( $amount, $quantity, $pkg, $comment, $taxclass, $additional, $classnum ); if ( ref( $_[0] ) ) { $amount = $_[0]->{amount}; + $quantity = exists($_[0]->{quantity}) ? $_[0]->{quantity} : 1; $pkg = exists($_[0]->{pkg}) ? $_[0]->{pkg} : 'One-time charge'; $comment = exists($_[0]->{comment}) ? $_[0]->{comment} : '$'. sprintf("%.2f",$amount); @@ -4686,6 +4687,7 @@ sub charge { $additional = $_[0]->{additional}; }else{ $amount = shift; + $quantity = 1; $pkg = @_ ? shift : 'One-time charge'; $comment = @_ ? shift : '$'. sprintf("%.2f",$amount); $taxclass = @_ ? shift : ''; @@ -4738,8 +4740,9 @@ sub charge { } my $cust_pkg = new FS::cust_pkg ( { - 'custnum' => $self->custnum, - 'pkgpart' => $pkgpart, + 'custnum' => $self->custnum, + 'pkgpart' => $pkgpart, + 'quantity' => $quantity, } ); $error = $cust_pkg->insert; |