diff --git a/lib/NGCP/Schema/Result/contacts.pm b/lib/NGCP/Schema/Result/contacts.pm index 9d93e6b2..e80ffedb 100644 --- a/lib/NGCP/Schema/Result/contacts.pm +++ b/lib/NGCP/Schema/Result/contacts.pm @@ -1,6 +1,7 @@ package NGCP::Schema::Result::contacts; use Scalar::Util qw(blessed); use parent 'DBIx::Class::Core'; +use Geography::Countries ();#exported by default too our $VERSION = '2.007'; @@ -148,6 +149,11 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +sub country_name{ + my ($self) = @_; + return scalar Geography::Countries::country( $self->country ); +} + sub TO_JSON { my ($self) = @_; return { diff --git a/lib/NGCP/Schema/Result/invoices.pm b/lib/NGCP/Schema/Result/invoices.pm index 38c69480..fc2fc4dd 100644 --- a/lib/NGCP/Schema/Result/invoices.pm +++ b/lib/NGCP/Schema/Result/invoices.pm @@ -45,6 +45,9 @@ __PACKAGE__->add_columns( { data_type => "double precision", default_value => 0, is_nullable => 0 }, "data", { data_type => "blob", is_nullable => 1 }, + "sent_date", + { data_type => "datetime", is_nullable => 1, datetime_undef_if_invalid => 1, }, + ); __PACKAGE__->set_primary_key("id");