summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-11-15 11:55:44 -0800
committerIvan Kohler <ivan@freeside.biz>2013-11-15 11:55:44 -0800
commit5d5987eb63dfb29f35e974feefdbf324a294d483 (patch)
tree68393da3edac0d5fd6546f563d20ba2f84409060 /FS
parente6bf8a2a4b6fd99e23d9c1916413a391f5ce09b0 (diff)
fix legacy link (fallout from RT#22596)
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/part_export/shellcommands.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/FS/FS/part_export/shellcommands.pm b/FS/FS/part_export/shellcommands.pm
index 15a4d5f44..e32315fe5 100644
--- a/FS/FS/part_export/shellcommands.pm
+++ b/FS/FS/part_export/shellcommands.pm
@@ -284,17 +284,19 @@ sub export_pkg_change {
my @fields = qw( pkgnum pkgpart agent_pkgid ); #others?
my @date_fields = qw( order_date start_date setup bill last_bill susp adjourn
- resume cancel uncancel expore contract_end );
+ resume cancel uncancel expire contract_end );
no strict 'vars';
{
no strict 'refs';
foreach (@fields) {
- ${"old_$_"} = $old_cust_pkg->getfield($_);
+ ${"old_$_"} = $old_cust_pkg ? $old_cust_pkg->getfield($_) : '';
${"new_$_"} = $new_cust_pkg->getfield($_);
}
foreach (@date_fields) {
- ${"old_$_"} = time2str('%Y-%m-%d', $old_cust_pkg->getfield($_));
+ ${"old_$_"} = $old_cust_pkg
+ ? time2str('%Y-%m-%d', $old_cust_pkg->getfield($_))
+ : '';
${"new_$_"} = time2str('%Y-%m-%d', $new_cust_pkg->getfield($_));
}
}