MT#5879 Implement countr name in controller.

mr3.3.1
Irina Peshinskaya 11 years ago
parent 1ab3500062
commit 3ee4f3e61d

@ -9,6 +9,7 @@ use NGCP::Panel::Utils::Contract;
use NGCP::Panel::Utils::InvoiceTemplate; use NGCP::Panel::Utils::InvoiceTemplate;
use NGCP::Panel::Utils::Invoice; use NGCP::Panel::Utils::Invoice;
use NGCP::Panel::Form::Invoice::Invoice; use NGCP::Panel::Form::Invoice::Invoice;
use Geography::Countries qw/country/;
sub auto :Private { sub auto :Private {
my ($self, $c) = @_; my ($self, $c) = @_;
@ -250,8 +251,8 @@ sub create :Chained('inv_list') :PathPart('create') :Args() :Does(ACL) :ACLDetac
$vars->{customer} = { $customer->get_inflated_columns }; $vars->{customer} = { $customer->get_inflated_columns };
$vars->{custcontact} = { $customer->contact->get_inflated_columns }; $vars->{custcontact} = { $customer->contact->get_inflated_columns };
$vars->{custcontact}->{country} = $customer->contact->country_name(); $vars->{custcontact}->{country} = country($vars->{custcontact}->{country} || '');
$vars->{rescontact}->{country} = $customer->contact->reseller->contract->contact->country_name(); $vars->{rescontact}->{country} = country($vars->{rescontact}->{country} || '');
$vars->{billprof} = { $billing_profile->get_inflated_columns }; $vars->{billprof} = { $billing_profile->get_inflated_columns };
$vars->{invoice} = { $vars->{invoice} = {

Loading…
Cancel
Save