diff options
author | Ivan Kohler <ivan@freeside.biz> | 2017-06-02 11:03:39 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2017-06-02 11:03:39 -0700 |
commit | bd756736dc14bcb0fdb8c4819dc273c584541258 (patch) | |
tree | 52e15feb22b201a1a5740554ad7a9867a1ac57c3 | |
parent | a6fdc051a4920122c2302191be4855cfa7440e80 (diff) |
skip non-linked cust_main_invoice records, RT#75629
-rwxr-xr-x | bin/create-billing-contacts-v3 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/create-billing-contacts-v3 b/bin/create-billing-contacts-v3 index a4e7e122b..c8ccd59ba 100755 --- a/bin/create-billing-contacts-v3 +++ b/bin/create-billing-contacts-v3 @@ -39,7 +39,9 @@ print "Found email destinations: ".scalar(@invoice_dests)."\n"; my %email_used; foreach my $invoice_dest (@invoice_dests) { - my $cust_main = $invoice_dest->cust_main; + my $cust_main = $invoice_dest->cust_main + or next; #cust_main_invoice.custnum points to non-existant customer? + #will need to be fixed before v4 upgrade, but this can still run.. my $last = $cust_main->get('last'); my $first = $cust_main->get('first'); my $email = $invoice_dest->dest; |