projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enswitch CDR format changes 30992 and 33014
[freeside.git]
/
httemplate
/
misc
/
xmlhttp-cust_bill_pkg-calculate_taxes.html
diff --git
a/httemplate/misc/xmlhttp-cust_bill_pkg-calculate_taxes.html
b/httemplate/misc/xmlhttp-cust_bill_pkg-calculate_taxes.html
index
9935046
..
4558682
100644
(file)
--- a/
httemplate/misc/xmlhttp-cust_bill_pkg-calculate_taxes.html
+++ b/
httemplate/misc/xmlhttp-cust_bill_pkg-calculate_taxes.html
@@
-1,8
+1,8
@@
-<%
to_json($return) %>
+<%
encode_json($return) %>\
<%init>
my $curuser = $FS::CurrentUser::CurrentUser;
<%init>
my $curuser = $FS::CurrentUser::CurrentUser;
-die "access denied" unless $curuser->access_right('
Post credit
');
+die "access denied" unless $curuser->access_right('
Credit line items
');
my $DEBUG = 0;
my $DEBUG = 0;
@@
-62,15
+62,7
@@
if ( $sub eq 'calculate_taxes' ) {
push @cust_bill_pkg, $cust_bill_pkg;
push @cust_bill_pkg, $cust_bill_pkg;
- my $part_pkg = $cust_bill_pkg->part_pkg;
- $cust_main->_handle_taxes( $part_pkg,
- $taxlisthash,
- $cust_bill_pkg,
- $cust_bill_pkg->cust_pkg,
- $cust_bill_pkg->cust_bill->_date,
- $cust_bill_pkg->cust_pkg->pkgpart,
- );
-
+ $cust_main->_handle_taxes( $taxlisthash, $cust_bill_pkg );
}
if ( @cust_bill_pkg ) {
}
if ( @cust_bill_pkg ) {
@@
-89,7
+81,10
@@
if ( $sub eq 'calculate_taxes' ) {
foreach my $taxline ( @$listref_or_error ) {
my $amount = $taxline->setup;
my $desc = $taxline->desc;
foreach my $taxline ( @$listref_or_error ) {
my $amount = $taxline->setup;
my $desc = $taxline->desc;
- foreach my $location ( @{$taxline->cust_bill_pkg_tax_location}, @{$taxline->cust_bill_pkg_tax_rate_location} ) {
+ foreach my $location (
+ @{$taxline->get('cust_bill_pkg_tax_location')},
+ @{$taxline->get('cust_bill_pkg_tax_rate_location')} )
+ {
my $taxlocnum = $location->locationnum || '';
my $taxratelocnum = $location->taxratelocationnum || '';
$location->cust_bill_pkg_desc($taxline->desc); #ugh @ that kludge
my $taxlocnum = $location->locationnum || '';
my $taxratelocnum = $location->taxratelocationnum || '';
$location->cust_bill_pkg_desc($taxline->desc); #ugh @ that kludge